Generate a Redemption Code for Subscription Redemption
This API generates a subscription-related redemption code within the mobile application. Using this API, guests can generate the subscription-related redemption code from the mobile application and use it at the POS or in the online ordering app to redeem subscription-related benefits.
- Type: stringAcceptrequired
Advertises which content types the client can understand
- Type: stringContent
- Type requiredSet this header to application/json
- Type: stringx
-pch -digest requiredSignature generated using the request path, body, and OAuth secret provided by the business. For details, see signature.
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringAccept
- Timezone Used to indicate the time zone in which you would like the date and time information in the response to be formatted
- Type: stringUser
- Agent requiredUsed to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
- Type: stringAccept
- Language Preferred language
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: stringsubscription
_id requiredID of the subscription for which the redemption code has to be generated
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/redemptions/subscription \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-pch-digest: ' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Accept-Timezone: Etc/UTC' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--header 'Accept-Language: en' \
--data '{
"client": "CLIENT_GOES_HERE",
"subscription_id": "23"
}'
{
"redemption_status": "redeemable",
"created_at": "2023-05-09T07:44:38Z",
"redeemable_id": null,
"location_id": 304252,
"redemption_image_url": "REDEMPTION_IMAGE_URL_GOES_HERE",
"redemption_message": "",
"updated_at": "2023-05-09T07:44:38Z",
"redeemable_description": null,
"redeemable_image_url": "REDEEMABLE_IMAGE_URL_GOES_HERE",
"subscription_id": "498699",
"subscription_plan_id": 44,
"subscription_plan_name": "Super Value Subscription",
"subscription_plan_description": "10% discount on entire receipt amount (capped at $20) | Redeemable Once Per Day",
"subscription_plan_image_url": "SUBSCRIPTION_PLAN_IMAGE_URL_GOES_HERE",
"redemption_type": "SubscriptionRedemption",
"redemption_id": 515404156,
"redemption_tracking_code": "8066490",
"expiring_at": "2023-05-09T07:54:38Z",
"redeemable_name": "REDEEMABLE_NAME_GOES_HERE",
"redeemed_value": null
}