List customers
Customers with type, group and territory, filtered by name.
GET https://cotlet.dev/api/v1/erpnext/customers
read
Returns customers in the order ERPNext lists them. Use the customer ID from each item in create_sales_invoice, list_sales_invoices and create_payment_entry. The search matches part of the Customer Name. Pages hold up to 100 customers; pass next_cursor back as cursor for the next page.
Parameters
| Name | Type | Description |
|---|---|---|
| search string | string | Part of the Customer Name. |
| customer_group string | string | Customer Group name from your site. |
| territory string | string | Territory name from your site. |
| limit integer | integer | Records per page. Default: 20. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl https://cotlet.dev/api/v1/erpnext/customers \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("erpnext", "list_customers") const result = await cotlet.call('erpnext', 'list_customers'); cotlet call erpnext list_customers Example response
{
"customers": [
{
"customer": "Northwind Studio",
"customer_name": "Northwind Studio",
"customer_type": "Company",
"customer_group": "Commercial",
"territory": "United States"
},
{
"customer": "Lumen Dental",
"customer_name": "Lumen Dental",
"customer_type": "Company",
"customer_group": "Commercial",
"territory": "United States"
}
],
"next_cursor": null
}