Applicable Offers (Redemptions 1.0)
Returns applicable offers based on the check details.
Headers
- 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.)
Body
- 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: "pos" or "kiosk"enumchannelrequired
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.
- Type: stringemailrequired
Email address of the user
- Type:requiredProperties: 8
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
item_amountforMline items inmenu_itemsminus theitem_amountforDline items;S,T, andPline items are excluded. See the description of theD,S,T, andPitems in themenu_items.menu_item_typerequest parameter. The value of this parameter should matchsubtotal_amount.Note: We do not recommend sending either brand or Punchh discounts as line items in any Redemptions 1.0 requests. See the description of the D item in the
menu_item_typerequest parameter. For multiple redemptions, include previously applied offers asDline items in subsequent requests. See Multiple Redemptions Example for processing multiple discounts.⚠️ Important: During check-in, loyalty points and visits are calculated based on the individual item amounts in the
menu_itemsarray, not directly fromreceipt_amount. - 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, calculated as the sum of
item_amountforMline items inmenu_itemsminus theitem_amountforDline items;S,T, andPline items are excluded. See the description of theD,S,T, andPitems in themenu_items.menu_item_typerequest parameter. Same asreceipt_amount. For historical reasons, include this parameter along withreceipt_amountin the API request.
Responses
- 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"
}
}
]