Loyalty API

List the transactions for a customer

GET

The Loyalty API is currently in beta.

Please contact our Support Team via our JIRA Service Desk for access to the Beta. If you don’t have access, please contact your account administrator for assistance.

Not yet integrated with Primer and interested in learning more? Contact us.

Create an API key with the loyalty-transactions:read scopes.

Get all your loyalty transactions. You can filter by connectionId (recommended) and by customerId and orderId.

Additionally provide a limit to restrict the number of transactions in the response, and an offset to determine where to start.

Query parameters

connectionIdstringOptional
Filter transactions by customer Id.
customerIdstringOptional
Filter transactions by customer Id.
orderIdstringOptional
Filter transactions by orderId.
limitintegerOptional
Limit the number of returned results
offsetintegerOptional
The number of items to skip before returning results

Response

This endpoint returns an object
items
list of objectsOptional
The list of loyalty transactions
total
integerOptional
The total number of available results
limit
integerOptional
The limit of the paged result
offset
integerOptional
The offset of the paged result

Errors

GET
$curl https://api.sandbox.primer.io/loyalty-transactions \
> -H "X-API-KEY: <apiKey>"
Response
1{
2 "items": [
3 {
4 "date": "2023-01-01T12:00:00.00000",
5 "id": "t101",
6 "connectionId": "waon-123",
7 "customerId": "waon-customer-123",
8 "orderId": "order-123",
9 "connectionTransactionId": "waonTx1",
10 "connectionName": "WOAN",
11 "type": "REDEMPTION",
12 "value": 200
13 }
14 ],
15 "total": 54,
16 "limit": 2,
17 "offset": 0
18}