Customer endpoints sit under
/api/brands/{brand}/customers/ with moduleAccess:customers middleware. Authenticate with EF-Access-Key.Contacts. Brands now use Contacts instead of email-based customer records: one record per person, with a stable 26-character
public_id. A brand that has not been moved yet keeps the email-based behaviour described below. On a brand that uses Contacts:GET customersreturns one row per contact, addspublic_id,lifecycle(customerorlead),email_status,sms_status,tagsand"source": "mysql", and filters withlifecycle=customer|lead(type=abandonstill works and meanslead).qmatches names and emails.GET customers/{key}/detailsaccepts apublic_idas well as an email, and adds acontactobject.- Emails, phones, names and postal codes are masked unless the API key’s user has the
contacts.view_piipermission (j***@g***.com,***4567,J***). Responses carrycan_view_pii. - The
contactsendpoints below become available. Before the switch they answer404with{"error": "contacts_not_enabled"}.
List Customers
Subset of columns to return. Allowed values:
customer_email, customer_name, customer_first_name, customer_last_name, customer_phone, customer_country, customer_state, customer_city, last_order_date, first_order_date, total_orders, total_revenue, total_refunds, total_chargebacks, lifetime_value, order_frequency, products_purchased, is_abandoned_customer, abandoned_valuecURL
Quick Access Stats
Returns customer counts by type, useful for dashboard badges.cURL
Get Customer Details
Retrieve the full profile for a single customer by email address. Includes lifetime stats, order history, subscriptions, and notes.cURL
Python
Export Customers
Queue a CSV export of customer records. An email is sent when the export is ready.cURL
Contacts endpoints
Available once the brand uses Contacts. Reading needscustomers.view; editing, merging and undoing need customers.update.
List contacts
newest (default), oldest, revenue_high, revenue_low, orders_high, orders_low, created_new, created_oldGET /api/brands/{brand}/contacts/counts returns {"all": 1842, "customer": 1205, "lead": 637} for the same filters.
Get a contact
{"contact": {...}} with the contact’s fields, emails, phones, consent, merges, field_locks, version and can_view_pii. If publicId belongs to a contact that was merged away, the response adds redirect_public_id (the contact it was merged into) and returns that contact.
cURL
Update a contact
field_locks) so later orders and imports do not overwrite it. Emails and phones are not editable here.
cURL
403 pii_permission_required, 409 version_conflict, 409 contact_merged (with redirect_public_id), 422 invalid_country.
Merge two contacts
{publicId} survives. Its own values are kept; empty fields are filled from the absorbed contact, and the absorbed contact’s emails, phones, consent records and tags move to it. Returns {"merge_id": 812, "contact": {...}}.
Errors: 404 absorbed_not_found, 422 same_contact, 422 merge_failed.
Undo a merge
{"undone": true, "survivor_public_id": "...", "absorbed_public_id": "..."}.
Errors: 404 merge_not_found, 422 undo_failed.
Notes
- Customer records are created automatically from conversion events; on brands using Contacts, only the fields listed under Update a contact can be changed
- The
{customerEmail}path parameter should be URL-encoded - Before a brand uses Contacts, sorting and filtering use Elasticsearch under the hood; large result sets may be slightly delayed
- The
columnsparameter controls both what is fetched and what is returned, reducing response size for large lists