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

Parameters: list_customers
NameTypeDescription
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
curl https://cotlet.dev/api/v1/woocommerce/customers \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("woocommerce", "list_customers")
Node.js
const result = await cotlet.call('woocommerce', 'list_customers');
CLI
cotlet call woocommerce list_customers

Example response

JSON

{
  "customers": [
    {
      "customer_id": 58,
      "name": "Jordan Lee",
      "email": "jordan.lee@example.com",
      "orders_count": 3,
      "total_spent": "142.00"
    }
  ],
  "total": 1,
  "total_pages": 1
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.