Applicable Offers (Redemptions 1.0)
Returns applicable offers based on the check details.
- Type: stringAuthorizationrequired
This is a combination of unique API key as well as business key (UUID) as the Authorization header.
- Type: stringAccept
- Language Short code for locale variant (e.g., fr-ca, es-ES, en-EN, etc.)
- Type: numberFormat: doubleamountrequired
Order amount before any taxes (sum of all amounts minus any discounts). This is the amount upon which loyalty points/visits are granted. The value of this parameter should be the same as that of subtotal_amount. For example, if the order amount is $10, parameters receipt_amount and subtotal_amount will hold the value 10. Say if a $2 discount has been applied to the same order, subtotal_amount and receipt_amount will become $8.
- Type: stringenumchannelrequired
Channel through which the order was placed. If a channel is defined in the Receipt Qualifier condition under Offers > Qualification Criteria in the Punchh platform, the API returns the list of offers applicable to the transaction after evaluating the value set for the channel. Possible values: pos, kiosk.
values- pos
- kiosk
- Type: stringemailrequired
Email address of the user
- Type: array object[] · Menu Items (Array Object)required
This object contains one or more menu items added to an order. See How To Send Menu Items to Punchh
- Type: numberFormat: doublereceipt
_amount requiredOrder amount before taxes, calculated as the sum of all item amounts minus any discounts. This is the amount used to calculate loyalty points/visits. The value of this parameter should match
subtotal_amount. For example, if the order amount is $10, bothreceipt_amountandsubtotal_amountwill be 10. If a $2 discount is applied, both will be 8. - Type: stringreceipt
_datetime requiredTimestamp of receipt per ISO 8601 format including TZ offset from UTC (YYYY-MM-DDThh:mm:ss-±hh:mm)
- Type: numberFormat: doublesubtotal
_amount requiredOrder amount before taxes (sum of all item amounts minus any discounts). Same as
receipt_amount. For historical reasons, include this parameter along withreceipt_amountin the API request.
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/redemptions/applicable_offers \
--request POST \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'Accept-Language: en' \
--header 'Content-Type: application/json' \
--data '{
"email": "test@example.com",
"receipt_amount": 300,
"menu_items": [
{
"item_name": "Whiterice",
"item_qty": 1,
"item_amount": 2.86,
"menu_item_type": "M",
"menu_item_id": "3419",
"menu_family": "800",
"menu_major_group": "152",
"serial_number": "1.0"
},
{
"item_name": "Brownrice",
"item_qty": 1,
"item_amount": 7.86,
"menu_item_type": "M",
"menu_item_id": "3418",
"menu_family": "800",
"menu_major_group": "152",
"serial_number": "2.0"
}
],
"amount": 300,
"subtotal_amount": 300,
"receipt_datetime": "2020-03-06T15:01:55.704Z",
"channel": "pos"
}'
[
{
"discount_amount": 10,
"menu_items": [],
"reward": {
"created_at": "2020-01-30T13:26:40Z",
"description": "",
"discount_amount": 0,
"end_date_tz": null,
"id": 1425570,
"image": "IMAGE_URL_GOES_HERE",
"name": "Test QC static discounrt",
"points": 0,
"redeemable_properties": null,
"start_date_tz": "2020-01-30T13:26:40Z",
"status": "unredeemed",
"updated_at": "2020-01-30T13:26:40Z"
}
},
{
"discount_amount": 10,
"menu_items": [],
"reward": {
"created_at": "2020-01-30T13:41:40Z",
"description": "",
"discount_amount": 0,
"end_date_tz": null,
"id": 1425572,
"image": "IMAGE_URL_GOES_HERE",
"name": "Test QC static discounrt",
"points": 0,
"redeemable_properties": null,
"start_date_tz": "2020-01-30T13:41:40Z",
"status": "unredeemed",
"updated_at": "2020-01-30T13:41:40Z"
}
},
{
"discount_amount": 10,
"menu_items": [],
"reward": {
"created_at": "2020-01-30T13:57:07Z",
"description": "",
"discount_amount": 0,
"end_date_tz": null,
"id": 1425574,
"image": "IMAGE_URL_GOES_HERE",
"name": "Test QC static discounrt",
"points": 0,
"redeemable_properties": null,
"start_date_tz": "2020-01-30T13:57:07Z",
"status": "unredeemed",
"updated_at": "2020-01-30T13:57:07Z"
}
}
]