List customers
Customers with email, order count and total spent. Contains personal data.
GET https://cotlet.dev/api/v1/woocommerce/customers
read
Lists registered customers with their email, number of orders and total spent. Search by name or email. The result contains personal data of your customers, so it is returned only to a role that can see orders, and your agent should not forward it to tools you do not trust. Guest buyers appear on their orders, not here.
Parameters
| Name | Type | Description |
|---|---|---|
| search string | string | Part of a name or an email. |
| limit integer | integer | Results per page. Default: 10. |
| page integer | integer | Page number, starting at 1. Default: 1. |
Request
curl https://cotlet.dev/api/v1/woocommerce/customers \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("woocommerce", "list_customers") const result = await cotlet.call('woocommerce', 'list_customers'); cotlet call woocommerce list_customers Example response
{
"customers": [
{
"customer_id": 58,
"name": "Jordan Lee",
"email": "jordan.lee@example.com",
"orders_count": 3,
"total_spent": "142.00"
}
],
"total": 1,
"total_pages": 1
}