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: string
Accept requiredAdvertises which content types the client can understand
- Type: string
Content - Type requiredSet this header to application/json
- Type: string
x -pch -digest requiredSignature generated using the request path, body, and OAuth secret provided by the business. For details, see signature.
- Type: string
Authorization requiredUsed to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. Note: When authentication is performed using Advanced Authentication, you must include theid_tokenin theid-tokenheader and theaccess_tokenin theAuthorizationheader. See Access Punchh APIs Using Access and ID tokens - Type: string
Accept - Timezone Used to indicate the time zone in which you would like the date and time information in the response to be formatted
- Type: string
User - 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: string
Accept - Language Preferred language
- Type: string
id -token A token that contains identity information about the authenticated user. It is used to verify the user’s identity and is required only when authentication is performed using Advanced Authentication. This token alone does not grant access to Punchh APIs. To access the APIs, you must include the
id_tokenin theid-tokenheader and theaccess_tokenin theAuthorizationheader. See Access Punchh APIs Using Access and ID tokens
- Type: string
client requiredOAuth client ID provided by the business
- Type: string
subscription _id requiredID of the subscription for which the redemption code has to be generated
- Type: object
200 - Type: stringFormat: date-time
created _at Date and time when the redemption was created in the system
- Type: stringFormat: date-time
expiring _at Date and time when the redemption_tracking_code expires and the end-user cannot use it at the POS
- Type: integer
location _id Location ID associated with redemption at which the redemption code is generated. If no location ID is provided, then it returns the location ID for the default location.
- Type: string
redeemable _description Description of the redeemable
- Type: integer
redeemable _id Unique ID of the redeemable
- Type: string
redeemable _image _url URL of the image depicting the redeemable. It can be displayed in the mobile app.
- Type: string
redeemable _name Name of the redeemable
- Type: string
redeemed _value - In the case of a business with banked_currency, a currency value will be returned. For example, 10 would mean $10.
- In the case of a business without banked_currency, points will be returned. For example, 10 would mean 10 points.
- For subscriptions, a null value will be returned.
- Type: integer
redemption _id Unique ID of the redemption that has been created
- Type: string
redemption _image _url URL of the image depicting the redeemable. It can be displayed in the mobile app.
- Type: string
redemption _message A descriptive message that tells the user what the user has redeemed
- Type: string
redemption _status Status of the redemption. Any one of these values is returned:
- redeemable: The redemption can be redeemed at the POS.
- expired: The redemption has expired and becomes unusable for the end-user.
- honoured: The redemption has already been processed successfully and redeemed by the end-user at the POS.
- cancelled: The redemption can be voided by an end-user by approaching the POS in case a redemption is done by mistake and the end-user wants to cancel it.
- Type: string
redemption _tracking _code Code that an end-user must provide at the POS to receive the redeemed reward
- Type: string
redemption _type The parameter value helps the mobile application differentiate between older redemption types and subscription redemption. Valid value: SubscriptionRedemption
- Type: string
subscription _id Unique ID of the subscription for which redemption is done
- Type: string
subscription _plan _description Description of the subscription plan from which the subscription is issued
- Type: integer
subscription _plan _id System-generated unique ID of a subscription plan created in the Punchh platform
- Type: string
subscription _plan _image _url Image URL of the subscription plan from which the subscription is issued
- Type: string
subscription _plan _name Name of the subscription plan from which the subscription is issued
- Type: stringFormat: date-time
updated _at Date and time when the redemption was updated in the system
- Type: object
400 - Type: object
errors required
- Type: object
401 - Type: object
errors
- Type: object
412 - Type: object
errors
- Type: object
422 - Type: string
error
{
"redemption_status": "string",
"created_at": "2023-05-09T07:44:38Z",
"redeemable_id": 1,
"location_id": 1,
"redemption_image_url": "string",
"redemption_message": "string",
"updated_at": "2023-05-09T07:44:38Z",
"redeemable_description": "string",
"redeemable_image_url": "string",
"redemption_id": 1,
"redemption_tracking_code": "string",
"expiring_at": "2023-05-09T07:54:38Z",
"redeemable_name": "string",
"redeemed_value": "string",
"subscription_id": "string",
"subscription_plan_id": 1,
"subscription_plan_name": "string",
"subscription_plan_description": "string",
"subscription_plan_image_url": "string",
"redemption_type": "string"
}