Remove Item From Discount Basket (Redemptions 2.0)
- Delete one or more discounts from a discount basket.
- The Punchh system will not have any validation based on points adjustments as discounts are added.
- If a discount expires after being added to the discount basket, it is removed from the discount basket. When you make a call to the API, it validates the offers added to the discount basket. If one or more discounts are found to be honored, expired, perished, or archived, the API returns an error message indicating that these discounts cannot be honored. The API lists the invalid discounts in the
discount_basket_itemsobject with a message stating that the discount is invalid and returns a null value in thediscount_detailsobject.
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringAuthorizationrequired
This is a combination of unique API location key as well as business key (UUID) as the Authorization header.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringAccept
- Language Preferred language. Punchh supports multiple languages for the redeemable name, redeemable description, meta data for coupon, subscription plan name, and subscription description in the API response as per the locale specified in the Accept-Language request header. Possible values: es for Spanish, fr for French, fr-ca for French-Canada, en-CY for English-Cyprus, ro for Romania, es-US for Spanish United States, etc.
The locales for a business are configured in the Punchh platform under Administration > Business Profile > Address > Alternate Languages. In the Punchh platform, the admin of a business has to configure in the relevant language(s) 1) the redeemable name and redeemable description when creating/editing a redeemable under Offers > All Redeemables, 2) meta data for coupons when creating/editing a coupon campaign under Marketing Automation > Campaign Management, and 3) subscription plan name and subscription description when creating/editing a subscription plan under Wallets and Passes > Subscription Plans.
- Type: array integer[]discount
_basket _item _ids requiredDiscount basket IDs of the items that need to be removed from the discount basket
- Type: integeruser
_id requiredGuest user ID
- Type: stringexternal
_uid Unique identifier generated by the system to lock the discount basket and prevent duplicate transactions. This parameter is optional when reward locking is enabled for the business in the Punchh platform. Note: Contact your Punchh representative to update this configuration setting.
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/discounts/unselect \
--request DELETE \
--header 'Content-Type: application/json' \
--header 'User-Agent: IntegratorName/IntegrationType/VersionNumber' \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--data '{
"user_id": 11111111,
"external_uid": "EXTERNAL_UID_GOES_HERE",
"discount_basket_item_ids": [
469363,
541689,
489056
]
}'
{
"redemption_ref": "REDEMPTION_REF_GOES_HERE",
"locked": false,
"location_id": 20,
"created_at": "2024-05-21T15:14:02Z",
"discount_basket_items": [
{
"discount_basket_item_id": 469363,
"discount_type": "reward",
"discount_id": "41049646877",
"discount_value": null,
"created_at": "2024-05-24T08:36:52Z",
"discount_details": {
"item_id": 48188,
"name": "Sandwich Test | AK",
"campaign_name": "Mass Campaign Offer",
"image": "IMAGE_URL_GOES_HERE",
"points": null,
"base_amount": null,
"description": "",
"item_properties": "",
"meta_detail": null,
"start_date_tz": "2024-05-24T08:34:24Z",
"end_date_tz": "2024-06-30T03:15:00Z",
"created_at": "2023-08-18T08:29:36Z",
"auto_select": false
}
},
{
"discount_basket_item_id": 541689,
"discount_type": "reward",
"discount_id": "41378920421",
"discount_value": null,
"created_at": "2024-06-11T12:56:33Z",
"discount_details": {
"item_id": 48188,
"name": "Sandwich Test | AK",
"campaign_name": "Mass Campaign Offer",
"image": "IMAGE_URL_GOES_HERE",
"points": null,
"base_amount": null,
"description": "",
"item_properties": "",
"meta_detail": null,
"start_date_tz": "2024-05-31T13:25:08Z",
"end_date_tz": "2024-06-30T03:15:00Z",
"created_at": "2023-08-18T08:29:36Z",
"auto_select": false
}
}
]
}