sso_create_online_redemption

Create Online Redemption (Redemptions 1.0)

Redeems a card, reward, redeemable, or discount specified in the discount_type parameter against a receipt.

NOTE: When processing a redemption, DO NOT include the query parameter in the API request. Use this parameter only to check for possible redemptions.

Headers
  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • Authorization
    Type: string
    required

    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. 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

  • User-Agent
    Type: string
    required

    For details, see User Agent.

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

    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.

  • cc_last4
    Type: string

    Last 4 digits of credit card number

  • channel
    Type: stringenum

    Channel through which the redemption was requested. Possible values are: online_order, pos, web, mobile, dashboard, chatbot, and kiosk.

    • pos
    • web
    • online_order
    • mobile
    • dashboard
    • chatbot
    • kiosk
  • client
    Type: string
    required

    Client key of the business

  • discount_type
    Type: stringenum
    required

    Any one of these values: card_completion || reward || redeemable || discount_amount || redemption_code || subscription. For details, see Getting Started With Online Ordering APIs.

    • reward
    • card_completion
    • redeemable
    • discount_amount
    • redemption_code
    • subscription
  • email
    Type: string

    Email address of the user (required to be sent only in case of coupons and promos)

  • employee_id
    Type: string

    Employee ID

  • employee_name
    Type: string

    Employee name

  • external_uid
    Type: string

    Unique ID generated by your system. We use this to prevent duplicates in case the same transaction gets triggered twice.

  • menu_items
    Type: array Menu Items (Array Object)[]

    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

  • query
    Type: boolean

    Include this parameter only if you want to make a possible redemptions call. The parameter value must be true. If you want to process a redemption, do not include this parameter in the request.

  • receipt_amount
    Type: numberFormat: double
    required

    Order amount before taxes, calculated as the sum of all item amounts minus any discounts. This is the amount used to calculate loyalty points/visits. The value of this parameter should match subtotal_amount. For example, if the order amount is $10, both receipt_amount and subtotal_amount will be 10. If a $2 discount is applied, both will be 8.

Responses
  • 200
    Type: object
    • campaign_name
      Type: string

      Name of the campaign through which the guest received the offer

    • category
      Type: string

      Category returned for redemption requested where values can be: redeemable, processed, expired, invalid, unassigned. Consider redemption valid only when the category is returned as redeemable.

    • max_applicable_quantity
      Type: string

      Maximum quantity that can be discounted. Note: This parameter will be returned for offers related to Price Rollback.

    • qualified_menu_items
      Type: array Menu Items (Array Object)[]

      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

    • qualifying_conditions
      Type: object

      The object lists all qualification criteria (both receipt-level and line-item) for submitted offers that failed while processing the redemption. This object is returned in the response only if the option to return the qualifying conditions for Redemption 1.0 APIs is enabled for the business in the Punchh platform. See the data object under Get Qualification Criteria Response in Platform Functions for descriptions of the parameters in qualifying_conditions.

    • redemption_amount
      Type: integer

      Total redemption amount that can be applied on the order

    • redemption_code
      Type: string

      Redemption code associated with redemption

    • redemption_id
      Type: integer

      Unique ID associated with the redemption. Save this in your system for future reference.

    • status
      Type: string

      Message that explains if the customer's redemption was successfully completed or not

  • 401

    Sending invalid credentials

  • 412

    Sending invalid Signature

  • 422
post/api/auth/redemptions/online_order
{
  "status": "string",
  "redemption_amount": 1,
  "category": "string",
  "qualified_menu_items": [
    {
      "item_name": "string",
      "item_qty": 1,
      "item_amount": 1,
      "menu_item_type": "string",
      "menu_item_id": 1,
      "menu_family": "string",
      "menu_major_group": "string",
      "serial_number": "string"
    }
  ],
  "redemption_id": 1,
  "redemption_code": "string",
  "max_applicable_quantity": "string",
  "campaign_name": "string",
  "qualifying_conditions": {}
}