Get Customer List

Retrieve a list of all customers with pagination.

🔒

Requires read_customer access scope.

The Get Customer List API retrieves a paginated list of all customers from the system. The response is paginated using cursor-based pagination for efficient data retrieval.

This API is especially useful for:

  1. filter customers by various criteria including creation time, last update time, specific customer IDs, email addresses, contact information, and more.

Request Parameters

Public Request Parameters

📘

Query Parameters

ParameterTypeRequiredDescriptionExample Value
cursorstringNoA cursor used for pagination to navigate through the customer list."eyJpZCI6IjEwMDAiLCJ..."
page_sizeint32NoSpecifies the number of customers to retrieve per page. The default value is 10, and the maximum allowed value is 250.20
idsarray of stringsNoA list of specific customer IDs to retrieve.["cust_001", "cust_002"]
created_at_minstringNoFilters customers created after this date. The date should be in UTC (0 timezone) and formatted as ISO-8601."2023-01-01T00:00:00Z"
created_at_maxstringNoFilters customers created before this date. The date should be in UTC (0 timezone) and formatted as ISO-8601."2023-12-31T23:59:59Z"
updated_at_minstringNoFilters customers last updated after this date. The date should be in UTC (0 timezone) and formatted as ISO-8601."2023-06-01T00:00:00Z"
updated_at_maxstringNoRetrieve customers last updated before this date. It's in UTC(0 timezone), formatted as ISO-8601."2023-10-31T23:59:59Z"
emailstringNoFilter customers by email."[email protected]"
contactstringNoFilter customers by contact information (email or phone)."+1234567890"

Response Explanation

Public Response Parameters

📘

Successful Response

FieldTypeExampleDescription
codestring"success"Status code of the response
messagestringDescriptive message of the response
customersarray of customer objectArray containing customer objects.
customers[].idstring2dd957e3-2051-4cdf-8584-9c0046b4d1aeUnique identifier for the customer.
customers[].first_namestringRyanCustomer's first name.
customers[].last_namestringZhanCustomer's last name.
customers[].namestringRyan ZhanFull name of the customer.
customers[].emailstring[email protected]Customer's email address.
customers[].phonestring+86 1231231234Customer's phone number.
customers[].phone_area_codestringnullPhone area code.
customers[].contact_typestringemailContact type, either email or phone.
customers[].accepts_marketingbooleantrueWhether the customer is subscribed to emails.
customers[].sourcestringnullSource of the customer data.
customers[].free_taxbooleanfalseWhether the customer is exempt from tax.
customers[].registeredbooleanfalseIndicates if the customer is registered.
customers[].orders_countinteger0Number of orders placed by the customer.
customers[].last_order_atstringnullTimestamp of the customer's last order.
customers[].total_spentstring0.00Total amount spent by the customer.
data.customer.tagsarray of string["New Customer"]array of tag strings.
customers[].created_atstring2024-04-17T11:10:33ZTimestamp when the customer was created.
customers[].updated_atstring2024-04-17T11:10:33ZTimestamp when the customer was last updated.
customers[].subscribed_flaginteger5Marketing subscription flag.
customers[].sms_subscribed_flaginteger5SMS marketing subscription flag.
customers[].accepts_sms_marketingbooleantrueWhether the customer is subscribed to SMS.
customers[].addressesarray of address objectsArray containing all customer addresses.
customers[].addresses[].idstring9ffa8dc0-25b8-4424-832e-bab46fcfeb20Unique identifier for the address.
customers[].addresses[].first_namestringJohnFirst name of the consignee.
customers[].addresses[].last_namestringSmithLast name of the consignee.
customers[].addresses[].companystring``Company name.
customers[].addresses[].citystringNew YorkCity of the address.
customers[].addresses[].provincestring``Province or state.
customers[].addresses[].countrystringUnited StatesCountry name.
customers[].addresses[].zipstring10001Postal or ZIP code.
customers[].addresses[].phonestring+1 123 456 7890Phone number associated with the address.
customers[].addresses[].address1string123 Main StreetPrimary street address.
customers[].addresses[].address2stringSuite 100Secondary street address.
customers[].addresses[].country_codestringUSISO country code.
customers[].addresses[].defaultbooleantrueIndicates if this is the default address.
data.has_morebooleantruetrue if there is more results, others else
data.cursorstring165618e4-3243-4cd7-abc3-1234567890abA cursor used for pagination to navigate through the list.

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!