API reference
Customers
On this page
Your contact list: customers, leads, subscribers and other people. Read only. Email and phone are masked unless the key has the personal details option. Consent, notes, tags and spend are never returned.
The customer (contact) object#
| Field | Type | Meaning |
|---|---|---|
id | integer | The contact id. |
name | string | The contact's name. A contact without a name shows as "Contact #id" while personal details are hidden. |
type | string | customer, lead, partner, subscriber, retailer, distributor, restaurant, bulk_buyer, consumer or other. |
status | string | active, inactive or archived. |
email | string or null | Email address. Masked (for example c***@example.com) unless the key has the personal details option. |
phone | string or null | Phone number. Masked (only the last 4 digits show) unless the key has the personal details option. |
city | string or null | City. |
state | string or null | State. |
orders_count | integer | How many orders the contact has placed. |
paid_orders_count | integer | How many of those orders are paid. |
last_order_at | string or null | When the contact last ordered (ISO 8601, UTC). |
created_at | string | When the contact was added (ISO 8601, UTC). |
updated_at | string | When the contact was last changed (ISO 8601, UTC). |
List customers (contacts)#
GET/api/v1/customersread:customers
Your contact list: name, type, status, order counts and dates. Email and phone are MASKED (a***@example.com, ******3210) unless the key has the personal details option. Consent, notes, tags and spend are never returned.
Without the personal details option, email and phone are masked (for example b***@example.com and ********0000).
Query parameters
| Name | Type | Meaning |
|---|---|---|
type | string | customer, lead, partner, subscriber, retailer, distributor, restaurant, bulk_buyer, consumer or other. |
status | string | active, inactive or archived. One of: active, inactive, archived |
limit | integer | Rows per page, 1 to 100 (default 25). per_page works too. |
page | integer | Page number, starting at 1. |
updated_since | string | Only rows changed at or after this time (ISO 8601, for example 2026-11-21T10:00:00Z, or a date). |
Example request
curl -s "https://yourstore.example.com/api/v1/customers?status=active&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$ch = curl_init('https://yourstore.example.com/api/v1/customers?status=active&limit=50');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
// $response['error']['code'] and $response['error']['message'] say what to fix
}// Node.js 18 or newer (fetch is built in). Save as call.mjs and run: node call.mjs
const res = await fetch('https://yourstore.example.com/api/v1/customers?status=active&limit=50', {
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const json = await res.json();
if (!res.ok) {
// json.error.code and json.error.message say what to fix
}# Python 3 with the requests library (pip install requests)
import requests
res = requests.get(
"https://yourstore.example.com/api/v1/customers?status=active&limit=50",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
data = res.json()
if not res.ok:
# data["error"]["code"] and data["error"]["message"] say what to fix
print(data["error"])Example answer (200 OK)
{
"data": [
{
"id": 55,
"name": "Sample Customer",
"type": "customer",
"status": "active",
"email": "b***@example.com",
"phone": "********0000",
"city": "Sample City",
"state": "Sample State",
"orders_count": 1,
"paid_orders_count": 1,
"last_order_at": "2026-11-21T10:15:00Z",
"created_at": "2026-11-21T10:15:00Z",
"updated_at": "2026-11-21T10:15:00Z"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1,
"last_page": 1
},
"links": {
"first": "https://yourstore.example.com/api/v1/customers?page=1",
"last": "https://yourstore.example.com/api/v1/customers?page=1",
"prev": null,
"next": null
}
}Errors
| Status | Code | When |
|---|---|---|
| 401 | missing_api_key, invalid_api_key, revoked_api_key, expired_api_key | The key is missing, not valid, revoked or expired. |
| 403 | insufficient_scope | The key does not have the read:customers scope. error.required_scope names it. (api_key_disabled and ip_not_allowed also give 403.) |
| 422 | validation_failed | updated_since could not be read as a date or time. |
| 429 | rate_limited | More requests than the key's limit in a minute. Wait for Retry-After. |
Example error answer (403):
{
"error": {
"code": "insufficient_scope",
"message": "This API key does not have the \"read:customers\" scope. Add it to the key in the admin (API & webhooks > API keys), or use a key that has it.",
"required_scope": "read:customers"
}
}Get a customer#
GET/api/v1/customers/{id}read:customers
One contact by id (masked unless the key has the personal details option).
Address parameters
| Name | Type | Meaning |
|---|---|---|
id | integer | The contact id (a whole number). |
Example request
curl -s "https://yourstore.example.com/api/v1/customers/7" \
-H "Authorization: Bearer YOUR_API_KEY"<?php
$ch = curl_init('https://yourstore.example.com/api/v1/customers/7');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
// $response['error']['code'] and $response['error']['message'] say what to fix
}// Node.js 18 or newer (fetch is built in). Save as call.mjs and run: node call.mjs
const res = await fetch('https://yourstore.example.com/api/v1/customers/7', {
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const json = await res.json();
if (!res.ok) {
// json.error.code and json.error.message say what to fix
}# Python 3 with the requests library (pip install requests)
import requests
res = requests.get(
"https://yourstore.example.com/api/v1/customers/7",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
data = res.json()
if not res.ok:
# data["error"]["code"] and data["error"]["message"] say what to fix
print(data["error"])Example answer (200 OK)
{
"data": {
"id": 55,
"name": "Sample Customer",
"type": "customer",
"status": "active",
"email": "b***@example.com",
"phone": "********0000",
"city": "Sample City",
"state": "Sample State",
"orders_count": 1,
"paid_orders_count": 1,
"last_order_at": "2026-11-21T10:15:00Z",
"created_at": "2026-11-21T10:15:00Z",
"updated_at": "2026-11-21T10:15:00Z"
},
"meta": {}
}Errors
| Status | Code | When |
|---|---|---|
| 401 | missing_api_key, invalid_api_key, revoked_api_key, expired_api_key | The key is missing, not valid, revoked or expired. |
| 403 | insufficient_scope | The key does not have the read:customers scope. error.required_scope names it. (api_key_disabled and ip_not_allowed also give 403.) |
| 404 | not_found | That contact does not exist. |
| 429 | rate_limited | More requests than the key's limit in a minute. Wait for Retry-After. |
Example error answer (403):
{
"error": {
"code": "insufficient_scope",
"message": "This API key does not have the \"read:customers\" scope. Add it to the key in the admin (API & webhooks > API keys), or use a key that has it.",
"required_scope": "read:customers"
}
}