Skip to content

Read entry history

Request

Entries come back newest first against an exclusive cursor. Page size is fixed at 50 and cursor is the only accepted parameter. next_cursor carries a value only when the page is full; otherwise it is null, which is how you know you have reached the end. This means a full-but-final page returns a non-null cursor whose follow-up page is empty. A non-positive cursor returns 400.

Entries Onward issues itself carry no caller ID, so they appear here with "shop_transaction_id": null and are not individually addressable.

Security
api_key
Path
shopRewardIdstringrequired

The ID of the parent discount that the reward is tied to — not the discount code, and not one of Onward's internal IDs. Read it from the customer's rewards array. Onward rewrites this value if it has to recreate a discount that was deleted, so treat a 404 here as a signal to re-read GET /customers/{shopCustomerId} and pick up the current value.

Example:1234567890
Query
cursorinteger, (int64), >= 1

Return entries with an ID below this value. Omit for the first page.

Headers
Acceptstringrequired

Accept must be application/json

Example:application/json
curl -i -X GET \
  'https://app.useonward.com/api/v1/rewards/1234567890/transactions?cursor=1' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Successful operation

Bodyapplication/json
transactionsArray of objects(RewardTransaction)required

Newest first. The nested reward is omitted here, since it would be identical on every row.

next_cursorinteger or null, (int64)required

Non-null only when the page is full, so a full-but-final page returns a cursor whose next page is empty.

Response
{ "transactions": [ { … } ], "next_cursor": 0 }