<- Loyalty API

Loyalty API

Search loyalty events

POST

 /v2/loyalty/events/search

Searches for loyalty events.

A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events.

Search results are sorted by created_at in descending order.

Permissions:LOYALTY_READ
Try in API Explorer
Link to section

Request body

Example code

Link to section

query

A set of one or more predefined query filters to apply when searching for loyalty events. The endpoint performs a logical AND to evaluate multiple filters and performs a logical OR on arrays
that specifies multiple field values.

Link to section

limit

integer(32-bit)

The maximum number of results to include in the response. The last page might contain fewer events. The default is 30 events.

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 your 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

events

The loyalty events that satisfy the search criteria.

Link to section

cursor

string

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