Customer List

🔒

Requires read_customer access scope.

Create a new customer and optionally assign a default address.

This API is especially useful for:

  1. Creating a new customer with contact information.
  2. Associating addresses (billing or shipping) during creation.
  3. Managing marketing subscription preferences.

Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain), ensuring all updates are applied to the correct store.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

ParameterTypeRequiredExampleDescription
idsstringNo701670d5-4afd-40b5-8d4f-7e0e55683849,da1bb9af-2489-40df-a15e-f54abd7fd86A comma-separated list of customer IDs.
limitint32No10Number of records to retrieve per page. Default is 10, maximum is 250.
pageint32No1Page number to retrieve. Default is 1.
created_at_minstringNo2016-01-18T23:41:00ZRetrieve customers created after this date. It's in UTC (0 timezone), formatted as ISO-8601
created_at_maxstringNo2016-01-18T23:41:00ZRetrieve customers created before this date. It's in UTC (0 timezone), formatted as ISO-8601
updated_at_minstringNo2016-01-18T23:41:00ZRetrieve customers last updated after this date. It's in UTC (0 timezone), formatted as ISO-8601
updated_at_maxstringNo2016-01-18T23:41:00ZRetrieve customers last updated before this date. It's in UTC (0 timezone), formatted as ISO-8601
emailstringNo[email protected]Filter customers by email.
contactstringNo[email protected]Filter customers by contact information (email or phone).

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

FieldTypeExampleDescription
customersarray of objectsArray containing customer objects.
customers[].idstring2dd957e3-2051-4cdf-8584-9c0046b4d1aeUnique identifier for the customer.
customers[].first_namestringRyanCustomer's first name.
customers[].last_namestringZhangCustomer's last name.
customers[].namestringRyan ZhangFull name of the customer.
customers[].emailstring[email protected]Customer's email address.
customers[].phonestring+8615014471143Customer'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.
customers[].tagsstringNew CustomerTags associated with the customer.
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[].default_addressaddress objectDefault address of the customer.
customers[].default_address.idstring9ffa8dc0-25b8-4424-832e-bab46fcfeb20Unique identifier for the default address.
customers[].default_address.first_namestringJohnFirst name of the consignee.
customers[].default_address.last_namestringSmithLast name of the consignee.
customers[].default_address.companystring``Company name.
customers[].default_address.citystringNew YorkCity of the address.
customers[].default_address.provincestring``Province or state.
customers[].default_address.countrystringUnited StatesCountry name.
customers[].default_address.zipstring10001Postal or ZIP code.
customers[].default_address.phonestring+1 123 456 7890Phone number associated with the address.
customers[].default_address.address1string123 Main StreetPrimary street address.
customers[].default_address.address2stringSuite 100Secondary street address.
customers[].default_address.country_codestringUSISO country code.
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.

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsarray["Context"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
invalid limit input, for example, input251 in limit."Exceeds maximum limit of 250"
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
406Not Acceptableinvalid input in created_at_minCreated at min time format error
invalid input in updated_at_maxUpdated at min time format error
invalid input in updated_at_maxUpdated at max time format error
invalid input in created_at_maxCreated at max time format error

API Structure Overview

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