post-api-auth-discounts-auto_select

Auto Redemption (Redemptions 2.0)

  • A discount should be automatically queued up in the discount basket if the auto-redemption feature is enabled for the business.
  • The business can configure the auto-redemption strategy.
  • If a discount expires after being added to the discount basket, it is removed from the discount basket. When you make a call to the API, it validates the discounts added to the discount basket. If one or more discounts are found to be honored, expired, perished, or archived, the API returns an error message indicating that these discounts cannot be honored. The API lists the invalid discounts in the discount_basket_items object with a message stating that the discount is invalid and returns a null value in the discount_details object.

Note: Auto-redemption currently supports only subscriptions and non-points-based rewards.

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

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • User-Agent
    Type: string
    required

    For details, see User Agent.

  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Accept-Language
    Type: string

    Preferred language. Punchh supports multiple languages for the redeemable name, redeemable description, meta data for coupon, subscription plan name, and subscription description in the API response as per the locale specified in the Accept-Language request header. Possible values: es for Spanish, fr for French, fr-ca for French-Canada, en-CY for English-Cyprus, ro for Romania, es-US for Spanish United States, etc.
    The locales for a business are configured in the Punchh platform under Administration > Business Profile > Address > Alternate Languages. In the Punchh platform, the admin of a business has to configure in the relevant language(s) 1) the redeemable name and redeemable description when creating/editing a redeemable under Offers > All Redeemables, 2) meta data for coupons when creating/editing a coupon campaign under Campaign Management, and 3) subscription plan name and subscription description when creating/editing a subscription plan under Wallet and Passes > Subscription Plans.

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

    Business date

  • client
    Type: string
    required

    Client key of the business

  • external_uid
    Type: string

    Unique identifier generated by the system to lock the discount basket and prevent duplicate transactions. This parameter is optional when reward locking is enabled for the business in the Punchh platform. Note: Contact your Punchh representative to update this configuration.

  • line_items
    Type: array Line Items (Array Object)[]

    List of line items

  • receipt_amount
    Type: numberFormat: float
    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 receipt per ISO 8601 format, including TZ offset from UTC (YYYY-MM-DDThh:mm:ss-±hh:mm)

  • subtotal_amount
    Type: numberFormat: float
    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.

  • transaction_no
    Type: string

    Transaction number

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

      Date/time when the first discount was selected, in YYYY-MM-DDThh:mm:ss format

    • discount_basket_items
      Type: array Discount Basket Items (Array Object)[]

      List of discounts. In the case of the Auto Redemption and Get Active Discount Basket APIs, the object lists invalid discounts with a message stating that the discount is invalid.

    • locked
      Type: boolean

      Indicates whether the discount basket is locked. A value of true means the basket is locked.

    • redemption_ref
      Type: string

      Transaction level identifier for all discount selections

  • 400
    Type: object
  • 404
    Type: object
  • 422
    Type: object
post/api/auth/discounts/auto_select
{
  "redemption_ref": "string",
  "locked": true,
  "created_at": "2025-12-19T16:30:10.408Z",
  "discount_basket_items": [
    {
      "discount_basket_item_id": 1,
      "discount_type": "string",
      "discount_id": "string",
      "discount_value": 1,
      "created_at": "2025-12-19T16:30:10.408Z",
      "message": "string",
      "discount_details": {
        "item_id": 1,
        "name": "string",
        "image": "string",
        "points": 1,
        "base_amount": 1,
        "description": "string",
        "item_properties": "string",
        "meta_detail": "string",
        "start_date_tz": "2025-12-19T16:30:10.408Z",
        "end_date_tz": "2025-12-19T16:30:10.408Z",
        "created_at": "2025-12-19T16:30:10.408Z",
        "auto_select": true,
        "campaign_name": "string",
        "max_applicable_quantity": 1
      }
    }
  ]
}