post-api2-mobile-redemptions-subscription

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.

Headers
  • Accept
    Type: string
    required

    Advertises which content types the client can understand

  • Content-Type
    Type: string
    required

    Set this header to application/json

  • x-pch-digest
    Type: string
    required

    Signature generated using the request path, body, and OAuth secret provided by the business. For details, see signature.

  • Authorization
    Type: string
    required

    Used 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 the id_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

  • Accept-Timezone
    Type: string

    Used to indicate the time zone in which you would like the date and time information in the response to be formatted

  • User-Agent
    Type: string
    required

    Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

  • Accept-Language
    Type: string

    Preferred language

  • id-token
    Type: string

    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_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

Body
application/json
  • client
    Type: string
    required

    OAuth client ID provided by the business

  • subscription_id
    Type: string
    required

    ID of the subscription for which the redemption code has to be generated

Responses
  • 200
    Type: object
    • created_at
      Type: stringFormat: date-time

      Date and time when the redemption was created in the system

    • expiring_at
      Type: stringFormat: date-time

      Date and time when the redemption_tracking_code expires and the end-user cannot use it at the POS

    • location_id
      Type: integer

      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.

    • redeemable_description
      Type: string

      Description of the redeemable

    • redeemable_id
      Type: integer

      Unique ID of the redeemable

    • redeemable_image_url
      Type: string

      URL of the image depicting the redeemable. It can be displayed in the mobile app.

    • redeemable_name
      Type: string

      Name of the redeemable

    • redeemed_value
      Type: string
      • 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.
    • redemption_id
      Type: integer

      Unique ID of the redemption that has been created

    • redemption_image_url
      Type: string

      URL of the image depicting the redeemable. It can be displayed in the mobile app.

    • redemption_message
      Type: string

      A descriptive message that tells the user what the user has redeemed

    • redemption_status
      Type: string

      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.
    • redemption_tracking_code
      Type: string

      Code that an end-user must provide at the POS to receive the redeemed reward

    • redemption_type
      Type: string

      The parameter value helps the mobile application differentiate between older redemption types and subscription redemption. Valid value: SubscriptionRedemption

    • subscription_id
      Type: string

      Unique ID of the subscription for which redemption is done

    • subscription_plan_description
      Type: string

      Description of the subscription plan from which the subscription is issued

    • subscription_plan_id
      Type: integer

      System-generated unique ID of a subscription plan created in the Punchh platform

    • subscription_plan_image_url
      Type: string

      Image URL of the subscription plan from which the subscription is issued

    • subscription_plan_name
      Type: string

      Name of the subscription plan from which the subscription is issued

    • updated_at
      Type: stringFormat: date-time

      Date and time when the redemption was updated in the system

  • 400
    Type: object
    • errors
      Type: object
      required
  • 401
    Type: object
    • errors
      Type: object
  • 412
    Type: object
    • errors
      Type: object
  • 422
    Type: object
    • error
      Type: string
post/api2/mobile/redemptions/subscription
{
  "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"
}