Exchange Points Product
/points_products/:id/rewards
curl --request POST \
--url https://api.thanx.com/points_products/:id/rewards \
--header 'Authorization: Bearer <token>'
Parameters
The points product ID
Response
Reward ID
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. For developers that do not communicate directly with the Olo APIs, this field can be ignored.
User ID
Merchant ID
Campaign ID
Reward State (available
, active
, used
)
Fine print for the reward
Staff instructions for the reward
Time the reward was given to the user in ISO8601-format
Time the reward was activated in ISO8601-format
Time the reward was marked as used in ISO8601-format
Time the reward will be automatically retired in ISO8601-format
This hash will be populated if the reward is ‘active’ or ‘used’ and the merchant uses coupon codes.
Details of how the reward was earned
Details of how the reward can be redeemed
{
"reward": {
"id": "222441e34626",
"olo_uid": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn",
"user_id": "werofsdf",
"merchant_id": "weroif",
"campaign_id": "85133c3c1258",
"state": "available",
"earn": {
"type": "points_exchange",
"text": "description"
},
"redeem": {
"type": "manual",
"text": "Garlic fries",
"window": 60,
"venue": "all"
},
"coupon_code": {
"code": null,
"type": null,
"display": null
},
"fine_print": "Can't be used for alcohol purchases",
"instructions": "Example staff instructions",
"available_at": "2019-12-25T19:00:00Z",
"activated_at": "2020-01-01T20:00:00Z",
"retire_at": null,
"used_at": null,
"images": {
"index": {
"small": "https://...png",
"large": "https://...png"
},
"detail": {
"small": "https://...png",
"large": "https://...png"
},
"advertising": {
"small": "https://...png",
"large": "https://...png"
}
}
}
}
curl --request POST \
--url https://api.thanx.com/points_products/:id/rewards \
--header 'Authorization: Bearer <token>'
{
"reward": {
"id": "222441e34626",
"olo_uid": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn",
"user_id": "werofsdf",
"merchant_id": "weroif",
"campaign_id": "85133c3c1258",
"state": "available",
"earn": {
"type": "points_exchange",
"text": "description"
},
"redeem": {
"type": "manual",
"text": "Garlic fries",
"window": 60,
"venue": "all"
},
"coupon_code": {
"code": null,
"type": null,
"display": null
},
"fine_print": "Can't be used for alcohol purchases",
"instructions": "Example staff instructions",
"available_at": "2019-12-25T19:00:00Z",
"activated_at": "2020-01-01T20:00:00Z",
"retire_at": null,
"used_at": null,
"images": {
"index": {
"small": "https://...png",
"large": "https://...png"
},
"detail": {
"small": "https://...png",
"large": "https://...png"
},
"advertising": {
"small": "https://...png",
"large": "https://...png"
}
}
}
}