Applicable Offers (Redemptions 1.0)

Returns all applicable rewards available to the user per the items added to the check

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

  • User-Agent
    Type: string
    required

    For details, see User Agent.

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

Body
application/json
  • channel
    Type: stringenum
    required

    Channel through which the order was placed. If a channel is defined in the Receipt Qualifier condition under Offers > Qualification Criteria in the Punchh platform, the API returns the list of offers applicable to the transaction after evaluating the value set for the channel. Possible values: online_order, web.

    values
    • online_order
    • web
  • client
    Type: string
    required

    Client key of the business

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

  • receipt_datetime
    Type: stringFormat: date-time
    required

    Timestamp of the receipt as per ISO 8601, in YYYY-MM-DDThh:mm:ssZ format

  • subtotal_amount
    Type: numberFormat: double
    required

    Order amount before taxes (sum of all item amounts minus any discounts). Same as receipt_amount. For historical reasons, include this parameter along with receipt_amount in the API request.

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

  • menu_items
    Type: 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

  • store_number
    Type: string

    Location where the redemption must be redeemed

Responses
  • application/json
  • 401

    Sending invalid credentials

  • 412

    Sending invalid Signature

  • 422

    The given reward can't be applied to the given receipt details

Request Example for get/api/auth/redemptions/applicable_offers
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/redemptions/applicable_offers \
  --header 'x-pch-digest: SIGNATURE_GOES_HERE' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --data '{
  "authentication_token": "",
  "client": "",
  "receipt_amount": 1,
  "subtotal_amount": 1,
  "receipt_datetime": "",
  "store_number": "",
  "menu_items": [
    {
      "item_name": "",
      "item_qty": 1,
      "item_amount": 1,
      "menu_item_type": "",
      "menu_item_id": "",
      "menu_family": "",
      "menu_major_group": "",
      "serial_number": ""
    }
  ],
  "channel": "online_order"
}'
[
  {
    "menu_items": [
      {
        "item_name": "Adult",
        "item_qty": 1,
        "item_amount": 100,
        "menu_item_type": "M",
        "menu_item_id": "1",
        "menu_family": "1",
        "menu_major_group": "1",
        "serial_number": "3.0"
      }
    ],
    "discount_amount": 2,
    "reward": {
      "created_at": "2023-04-03T05:42:02Z",
      "end_date_tz": null,
      "start_date_tz": "2023-04-03T05:42:02Z",
      "updated_at": "2023-04-03T05:42:02Z",
      "id": 1,
      "image": "IMAGE_URL_GOES_HERE",
      "status": "unredeemed",
      "points": 0,
      "discount_amount": 2,
      "description": "$2 Off Your Order. Participating locations only.",
      "name": "Redeemable - $2 Off Your Order",
      "redeemable_properties": null
    }
  },
  {
    "menu_items": [
      {
        "item_name": "Adult",
        "item_qty": 1,
        "item_amount": 100,
        "menu_item_type": "M",
        "menu_item_id": "1",
        "menu_family": "1",
        "menu_major_group": "1",
        "serial_number": "3.0"
      }
    ],
    "discount_amount": 2,
    "reward": {
      "created_at": "2023-04-03T05:46:32Z",
      "end_date_tz": null,
      "start_date_tz": "2023-04-03T05:46:32Z",
      "updated_at": "2023-04-03T05:46:32Z",
      "id": 2,
      "image": "IMAGE_URL_GOES_HERE",
      "status": "unredeemed",
      "points": 0,
      "discount_amount": 2,
      "description": "",
      "name": "2% off Subtotal Amount",
      "redeemable_properties": null
    }
  }
]