GET
/
rewards

Parameters

states
array[string]

Only rewards in these states will be returned. Valid options are: (available, active, used). The default is to return all rewards in these 3 states.

StateDescription
availableThis reward is available to use
activeThe user has activated this reward for use
usedThe reward has been used
merchant_id
string

Only return features for this merchant if you have access to multiple merchants

user_id
string

Only return rewards for this user. Note: the bearer token will be used to determine which user’s rewards are being requested when the request is made by a logged in user.

page
integer

The current page of paginated resources.

  • Default: 1.
per_page
integer

Number of records to be returned per API request.

  • Default: 10
  • Minimum: 1
  • Maximum: 100

Response

id
string

Reward ID

olo_uid
string

Developers that do not communicate directly with the Olo APIs can ignore this field.

The field is only present for merchants that have integrated with Olo. This UID should be used instead of the Reward ID when attempting to apply a reward to the basket when communicating directly with the Olo API.

This UID can also be used to match records (via the externalreference Olo rewards API attribute) being returned by the Olo API to relevant reward or points product records in the Thanx API.

user_id
string

User ID

merchant_id
string

Merchant ID

campaign_id
string

Campaign ID

state
enum

Reward State (available, active, used)

fine_print
string

Fine print for the reward

instructions
string

Staff instructions for the reward

available_at
string

Time the reward was given to the user in ISO8601-format

activated_at
string

Time the reward was activated in ISO8601-format

used_at
string

Time the reward was marked as used in ISO8601-format

retire_at
string

Time the reward will be automatically retired in ISO8601-format

coupon_code
string

This hash will be populated if the reward is 'active' or 'used' and the merchant uses coupon codes.

earn
string

Details of how the reward was earned

redeem
string

Details of how the reward can be redeemed

images
hash

Each of these values is a URL of the reward image with the aspect ratio preserved. Each property (EG: index.small) has a set width for all rewards, and the height varies based on the aspect ratio.

For example, if you import an image with the dimensions 1000x1000 (aspect ratio of 1:1), then the image for index.small has the dimensions 563x563 because it matches the original aspect ratio.

pagination
hash

Pagination information