Developers

Customers

Markdown

List customers

Store customers, oldest first, with phone, email, order count and total spent. Find one by phone or email.

GET/stores/{storeId}/v1/customers

phone accepts any Saudi form: 05…, 5…, 9665… or +9665…. email is an exact match. search looks in the name and email. To keep in sync, pass the time of your last sync in created_after, then listen for the customer events. orders_count and total_spent cover delivered orders that were not refunded. See Customers and loyalty.

Query parameters

limitinteger = 25
Number of items per page.
cursorstring
The meta.next_cursor value from the previous page. Valid for 15 minutes and bound to the same filters.
emailstring
An exact email. Upper and lower case count as the same.
phonestring
The phone in any form: 05xxxxxxxx or +9665xxxxxxxx.
searchstring
Search in the name and email.
created_afterstring (date-time)
Customers who signed up after this time.

Response

dataarray<object>required
idstringrequired
namestringrequired
first_namestring
last_namestring
phonestring | nullrequired
Phone number in E.164 format, such as +966512345678, or null if it is not a valid number.
emailstring | null (email)required
orders_countintegerrequired
Delivered orders that were not refunded.
total_spentstringrequired
The total of those orders in SAR.
last_order_atstring | null (date-time)
created_atstring (date-time)required
executionobject
Who executed the request: the app, version, installation and store. Field names here are camelCase.
appIdstring (uuid)
versionIdstring (uuid)
installationIdstring (uuid)
storeIdstring (uuid)
requestIdstring (uuid)
generationinteger
routeEpochinteger
appAuthEpochinteger
grantRevisioninteger
metaobjectrequired
has_moreboolean
limitinteger
next_cursorstring | null
consistencystring
live_keyset
request_idstring (uuid)

Errors

HTTPCodeMeaning
400INVALID_FILTERUnknown filter or invalid value.
400CURSOR_MISMATCHThe cursor was issued for different filters.
403SCOPE_REQUIREDThe token does not carry the required scope.
503APPS_SCOPE_RUNTIME_NOT_READYThe resource is not enabled on this merchant's store yet.

Shared codes are listed in Errors.

    ↑↓ moveEnter openEsc close