<- Loyalty API

Loyalty API

Search loyalty accounts

POST

 /v2/loyalty/accounts/search

Searches for loyalty accounts in a loyalty program.

You can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty query object or omit it entirely.

Search results are sorted by created_at in ascending order.

Permissions:LOYALTY_READ
Try in API Explorer
Link to section

Request body

Example code

Link to section

query

The search criteria for the request.

Link to section

limit

integer(32-bit)

The maximum number of results to include in the response. The default value is 30.

Link to section

cursor

string

A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query.

For more information, see Pagination.

Link to section

Response fields

Link to section

errors

Any errors that occurred during the request.

Link to section

loyalty_accounts

The loyalty accounts that met the search criteria,
in order of creation date.

Link to section

cursor

string

The pagination cursor to use in a subsequent request. If empty, this is the final response. For more information, see Pagination.