Skip to main content
Customer endpoints sit under /api/brands/{brand}/customers/ with moduleAccess:customers middleware. Authenticate with EF-Access-Key.
Customer records are built from conversion and tracking events (purchases, abandoned carts, chargebacks, form fills). They cannot be created via API directly; they are created automatically when conversions are recorded.
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 customers returns one row per contact, adds public_id, lifecycle (customer or lead), email_status, sms_status, tags and "source": "mysql", and filters with lifecycle=customer|lead (type=abandon still works and means lead). q matches names and emails.
  • GET customers/{key}/details accepts a public_id as well as an email, and adds a contact object.
  • Emails, phones, names and postal codes are masked unless the API key’s user has the contacts.view_pii permission (j***@g***.com, ***4567, J***). Responses carry can_view_pii.
  • The contacts endpoints below become available. Before the switch they answer 404 with {"error": "contacts_not_enabled"}.

List Customers

number
Results per page (1–100, default: 25)
string
Filter by customer type: customer (purchases only) or abandon (abandoned carts only)
string
Search by email, name, or phone
string
Sort field. Any of the sortable columns below.
string
asc or desc
array
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_value
cURL

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.
string
required
Customer’s email address (URL-encoded if it contains special characters)
boolean
Include full order history (default: true)
boolean
Include active subscriptions (default: true)
cURL
Python

Export Customers

Queue a CSV export of customer records. An email is sent when the export is ready.
array
Filter conditions (same keys as the list endpoint ?type, ?q, etc.)
array
Limit export to specific email addresses
array
Columns to include (subset of the allowed column list above)
cURL

Contacts endpoints

Available once the brand uses Contacts. Reading needs customers.view; editing, merging and undoing need customers.update.

List contacts

string
customer or lead
string
Search names and emails
string
Only contacts with a phone number containing these digits (other characters are ignored)
string
Only contacts with this tag
string
unknown, subscribed, unsubscribed or suppressed
string
unknown, subscribed or unsubscribed
string
newest (default), oldest, revenue_high, revenue_low, orders_high, orders_low, created_new, created_old
number
Page number (offset paging, with total and last_page in the response)
number
Results per page
GET /api/brands/{brand}/contacts/counts returns {"all": 1842, "customer": 1205, "lead": 637} for the same filters.

Get a contact

Returns {"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

string
First name (needs contacts.view_pii)
string
Last name (needs contacts.view_pii)
string
Two-letter country code
string
State or region
string
Postal code (needs contacts.view_pii)
string
IANA timezone, for example America/New_York
array
Replaces the contact’s tags
array
Field names to unlock, so incoming orders and imports may update them again
number
The version you read; a newer one on the server answers 409 version_conflict
Every field you set is locked (listed in field_locks) so later orders and imports do not overwrite it. Emails and phones are not editable here.
cURL
Errors: 403 pii_permission_required, 409 version_conflict, 409 contact_merged (with redirect_public_id), 422 invalid_country.

Merge two contacts

string
required
The public_id of the contact to merge into {publicId}
{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

Splits the two contacts again. Allowed for 180 days after the merge. Returns {"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 columns parameter controls both what is fetched and what is returned, reducing response size for large lists