Customers
Customers with lifetime spend and order statistics.
18 fields — 14 dimensions, 4 metrics. Date clauses (SINCE, UNTIL, DURING) use createdAt.
The live, authoritative list is always GET /v1/datasets — this page is regenerated from the same catalog, but the endpoint reflects exactly what is deployed.
Query it
FROM customers
SHOW customer_count
GROUP BY customer_name
SINCE -30d
See Querying with SoloQL for the language.
Fetch records
curl -H "Authorization: Bearer esk_live_..." \
"https://api.ecomsolo.com/v1/customers?page_size=50&fields=customer_name,email,first_name"
Any field marked ✅ below can be returned, requested via fields=, and used as an equality filter (?field=value). Fields marked aggregate only exist for COUNT-style questions and have no value on a single record — ask SoloQL for those. See Fetching records.
Fields
| Field | Type | Role | Records | Description |
|---|---|---|---|---|
customer_name | string | dimension | ✅ | Customer display name. |
email | string | dimension | ✅ | Customer email address. |
first_name | string | dimension | ✅ | Customer first name. |
last_name | string | dimension | ✅ | Customer last name. |
state | string | dimension | ✅ | Account state (enabled, disabled, invited, declined). |
locale | string | dimension | ✅ | Customer locale. |
tags | string | dimension | ✅ | Comma-separated customer tags. |
tax_exempt | boolean | dimension | ✅ | Whether the customer is tax exempt. |
verified_email | boolean | dimension | ✅ | Whether the email address is verified. |
accepts_marketing | boolean | dimension | ✅ | Whether the customer accepts email marketing. |
created_at | date | dimension | ✅ | When the customer was created. |
first_order_date | date | dimension | ✅ | Date of the customer's first order. |
last_order_date | date | dimension | ✅ | Date of the customer's most recent order. |
customer_count | number | metric | aggregate only | Number of customers in the group (document count — value_count on createdAt). Sums across stores. |
orders_count | number | metric | ✅ | Number of orders placed. |
total_spent | money | metric | ✅ | Lifetime amount spent. |
average_spent | money | metric | ✅ | Average lifetime spend per customer. Recomputed per group — never summed across stores. |
store | string | dimension | ✅ | The shop the record belongs to. Filter with WHERE store IN ('Shop name') or GROUP BY store. |