Applicable Offers (Redemptions 1.0)
Returns all applicable rewards available to the user per the items added to the check
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringAuthorizationrequired
You may pass the access_token instead of the authentication_token in Online Ordering endpoints to authorize the request. It must be supplied as
Bearer ACCESS_TOKEN_GOES_HERE.
Body
- Type: "online_order" or "web"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: online_order, web.
- Type: stringclientrequired
Client key of the business
- 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 create check-in or update check-in, loyalty points and visits are calculated based on the individual item amounts in the
menu_itemsarray, not directly fromreceipt_amount. - Type: stringFormat: date-timereceipt
_datetime requiredTimestamp of the receipt as per ISO 8601, in YYYY-MM-DDThh:mm:ssZ format
- 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. - Type: stringauthentication
_token The authentication token of the user. You can retrieve this from the response of a successful sign-in API call or through the SSO process.
- Type:Properties: 8
This object used in the API request contains one or more menu items added to an order. See How To Send Menu Items to Punchh
- Type: stringstore
_number Location where the redemption must be redeemed
Responses
- application/json
- 401
Sending invalid credentials
- 412
Sending invalid Signature
- 422
The given reward can't be applied to the given receipt details
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/redemptions/applicable_offers \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"authentication_token": "",
"client": "",
"receipt_amount": 1,
"subtotal_amount": 1,
"receipt_datetime": "",
"store_number": "",
"menu_items": [
{
"item_name": "",
"item_qty": 1,
"item_amount": 1,
"menu_item_type": "",
"menu_item_id": "",
"menu_family": "",
"menu_major_group": "",
"serial_number": ""
}
],
"channel": "online_order"
}'
[
{
"menu_items": [
{
"item_name": "Adult",
"item_qty": 1,
"item_amount": 100,
"menu_item_type": "M",
"menu_item_id": "1",
"menu_family": "1",
"menu_major_group": "1",
"serial_number": "3.0"
}
],
"discount_amount": 2,
"reward": {
"created_at": "2023-04-03T05:42:02Z",
"end_date_tz": null,
"start_date_tz": "2023-04-03T05:42:02Z",
"updated_at": "2023-04-03T05:42:02Z",
"id": 1,
"image": "IMAGE_URL_GOES_HERE",
"status": "unredeemed",
"points": 0,
"discount_amount": 2,
"description": "$2 Off Your Order. Participating locations only.",
"name": "Redeemable - $2 Off Your Order",
"redeemable_properties": null
}
},
{
"menu_items": [
{
"item_name": "Adult",
"item_qty": 1,
"item_amount": 100,
"menu_item_type": "M",
"menu_item_id": "1",
"menu_family": "1",
"menu_major_group": "1",
"serial_number": "3.0"
}
],
"discount_amount": 2,
"reward": {
"created_at": "2023-04-03T05:46:32Z",
"end_date_tz": null,
"start_date_tz": "2023-04-03T05:46:32Z",
"updated_at": "2023-04-03T05:46:32Z",
"id": 2,
"image": "IMAGE_URL_GOES_HERE",
"status": "unredeemed",
"points": 0,
"discount_amount": 2,
"description": "",
"name": "2% off Subtotal Amount",
"redeemable_properties": null
}
}
]