openapi: 3.2.0 info: title: Punchh Api2 API contact: name: Punchh Dev Support url: https://developers.punchh.com version: '1.0' description: 'Operations tagged Api2 across 6 of this provider''s published API definitions: punchh-mobile-redemptions-legacy-openapi.yml, punchh-mobile-redemptions-v2-openapi.yml, punchh-mobile-subscription-openapi.yml, punchh-platform-functions-headless-offers-openapi.yml, punchh-platform-functions-offers-ingestion-openapi.yml, punchh-platform-functions-subscription-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com tags: - name: Api2 paths: /api2/mobile/redemptions/{redemption_id}: parameters: - schema: type: integer format: int64 name: redemption_id in: path required: true description: Redemption ID returned when the redemption is created x-stoplight: id: 90fd89b67ddc1 delete: summary: Cancel Redemption (Redemptions 1.0) operationId: delete-api2-mobile-redemptions responses: '200': description: OK - Redemption successfully cancelled '404': description: Not Found content: application/json: schema: type: object properties: errors: type: string x-stoplight: id: m5t0iepx0dqg5 examples: Sending an invalid redemption ID: value: errors: This Redemption is an invalid redemption or It is not for this guest '422': description: Unprocessable Entity content: application/json: schema: type: object properties: errors: type: string x-stoplight: id: p3shfxdabejn2 examples: ' Cancelling an expired redemption': value: errors: This Redemption cannot be cancelled because the Redemption code has been expired Cancelling a cancelled redemption: value: errors: Redemption cancellation failed. This redemption has already been cancelled. Cancelling an honored redemption: value: errors: This Redemption cannot be cancelled because the Redemption code has been honoured / redeemed description: "Allows users to cancel their redemption if it has not been processed, enabling them to select a new one without waiting for the redemption code to expire. Once the redemption is processed, the user cannot cancel it.\n\nThe `cancel_redemption` response parameter in the [Program Meta](/docs/dev-portal-mobile/2617bed9b0e8e-program-meta) API indicates whether the user can revoke (cancel) the generated redemption code from the brand's app. This is controlled by hiding or displaying the cancel redemption button on the brand's app. Contact your Punchh representative to update this Punchh platform configuration.\n\n\n Cancel Redemption Failure Scenarios\n\nThe API returns an error if the discount associated with the redemption you want to cancel is invalid, already redeemed/honored, cancelled, or expired. \n\nView Cancelled Redemption Status \n\nThe Punchh platform displays the cancelled redemption on the user’s timeline and in the Account History tab. \n\nIf you have a redemption code for the cancelled redemption, you can use the [Search Redemption Code](/docs/dev-portal-platform-functions/ac8e06639a62c-search-redemption-code) API to verify the status of the cancelled redemption. " parameters: - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/punchh-app-device-id' - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/Accept-Language' requestBody: content: application/json: schema: type: object properties: client: type: string x-stoplight: id: htkodzobkpi6f description: OAuth client ID provided by the business required: - client examples: Example: value: client: CLIENT_GOES_HERE redemption_id: 490636366 description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/redemptions/banked_currency: post: responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/redemption_details' examples: default: value: redemption_status: redeemable created_at: '2016-05-25T06:41:37-04:00' redeemable_id: null location_id: 304361 redemption_image_url: IMAGE_URL_GOES_HERE redemption_message: Message associated with the redemption. updated_at: '2016-05-25T06:41:37-04:00' redeemable_description: '' redemption_id: 1822896 redemption_tracking_code: '7246338' expiring_at: '2016-05-25T08:41:37-04:00' redeemable_name: null campaign_name: Mass Campaign Offer redeemed_value: '10' '400': description: '' summary: Create Redemption Using Banked Currency (Redemptions 1.0) description: Creates a redemption using a currency amount. The amount is deducted from a user's available banked currency. operationId: mobile_create_redemption_using_banked_currency parameters: - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept-Language' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/punchh-app-device-id' - $ref: '#/components/parameters/User-Agent' x-stoplight: id: a7be5bbb2906d requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business banked_currency: type: number format: double description: The amount of banked currency with which a redemption code has to be created location_id: type: integer description: Location ID at which the redemption code is generated. If no location ID is provided, then it returns the ID of the default location. latitude: type: string description: Latitude coordinate of the redemption location longitude: type: string description: Longitude coordinate of the redemption location gps_accuracy: type: integer description: Accuracy of a user's device GPS required: - client examples: default: value: client: CLIENT_GOES_HERE banked_currency: 10 location_id: 304155 latitude: '26.9167509' longitude: '75.8136926' gps_accuracy: 27 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/redemptions/visits: post: responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/redemption_details' examples: default: value: redemption_status: redeemable created_at: '2016-05-25T06:41:37-04:00' redeemable_id: null location_id: 304361 redemption_image_url: IMAGE_URL_GOES_HERE redemption_message: Message associated with the redemption. updated_at: '2016-05-25T06:41:37-04:00' redeemable_description: '' redemption_id: 1822896 redemption_tracking_code: '7246338' expiring_at: '2016-05-25T08:41:37-04:00' redeemable_name: null campaign_name: Mass Campaign Offer redeemed_value: '10' '400': description: '' summary: Create Redemption Using Visits (Redemptions 1.0) description: Creates a redemption for an unredeemed card. This is for use with visit-based businesses. operationId: mobile_create_redemption_using_visits parameters: - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/Accept-Language' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/punchh-app-device-id' x-stoplight: id: 1ae3d27ce6a88 requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business location_id: type: integer description: Location ID at which a user wants to do the redemption. If a particular location ID is provided in the request, the redemption will be valid only at that location and will not be possible at any other. latitude: type: string description: Latitude coordinate of the redemption location. Must be provided if location_id is not passed as a parameter. longitude: type: string description: Longitude coordinate of the redemption location. Must be provided if location_id is not passed as a parameter. gps_accuracy: type: integer description: Accuracy of a user's device GPS required: - client examples: default: value: client: CLIENT_GOES_HERE location_id: '304155' latitude: 26.9167509 longitude: 75.8136926 gps_accuracy: 27 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/redemptions/redeemable: post: responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/redemption_details' examples: default: value: redemption_status: redeemable created_at: '2016-05-25T06:50:02-05:00' redeemable_id: 41 location_id: 304361 redemption_image_url: IMAGE_URL_GOES_HERE redemption_message: Redeem your free Sandwich, with purchase of chips and drink updated_at: '2016-05-25T06:50:02-05:00' redeemable_description: '' redemption_id: 1818919 redemption_tracking_code: '8723640' expiring_at: '2016-05-25T08:50:02-05:00' redeemable_name: The Sandwich campaign_name: Mass Campaign Offer redeemed_value: '0' '400': description: '' summary: Create Redemption Using Redeemable (Redemptions 1.0) description: Creates a redemption for a redeemable based on a user's available loyalty points operationId: mobile_create_redemption_using_redeemable parameters: - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/Accept-Language' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/punchh-app-device-id' x-stoplight: id: d491967b73fc7 requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business reedemable_id: type: number format: double description: ID of the redeemable used to create a redemption code location_id: type: integer description: Location ID at which a user wants to do the redemption. If a particular location ID is provided in the request, the redemption will be valid only at that location and will not be possible at any other. latitude: type: string description: Latitude coordinate of the redemption location. Must be provided if location_id is not passed as a parameter. longitude: type: string description: Longitude coordinate of the redemption location. Must be provided if location_id is not passed as a parameter. gps_accuracy: type: integer description: Accuracy of a user's device GPS required: - client examples: default: value: client: CLIENT_GOES_HERE redeemable_id: 1102 location_id: '304155' latitude: 26.9167509 longitude: 75.8136926 gps_accuracy: 27 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/redemptions/reward: post: responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/redemption_details' examples: default: value: redemption_status: redeemable created_at: '2016-05-25T06:55:04-05:00' redeemable_id: 75 location_id: 304361 redemption_image_url: IMAGE_URL_GOES_HERE redemption_message: Redeem your Free Bag of Chips updated_at: '2016-05-25T06:55:04-05:00' redeemable_description: '' redemption_id: 1818920 redemption_tracking_code: '1809897' expiring_at: '2016-05-25T08:55:04-05:00' redeemable_name: Bag of Chips campaign_name: Mass Campaign Offer redeemed_value: null '400': description: '' summary: Create Redemption Using Reward ID (Redemptions 1.0) description: Creates a redemption for a reward that has been given to a user (e.g., through a campaign). operationId: mobile_create_redemption_using_reward_id parameters: - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/Accept-Language' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/punchh-app-device-id' x-stoplight: id: 2969c78154a17 requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business reward_id: type: integer description: 'The ID of the reward for which the redemption code has to be created ' format: int64 location_id: type: integer description: Location ID at which a user wants to do the redemption. If a particular location ID is provided in the request, the redemption will be valid only at that location and will not be possible at any other. latitude: type: string description: Latitude coordinate of the redemption location. Must be provided if a location_id is not passed as a parameter. longitude: type: string description: Longitude coordinate of the redemption location. Must be provided if a location_id is not passed as a parameter. gps_accuracy: type: integer description: Accuracy of a user's device GPS required: - client examples: default: value: client: CLIENT_GOES_HERE reward_id: 5167827 location_id: '304155' latitude: 26.9167509 longitude: 75.8136926 gps_accuracy: 27 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/redemptions/applicable_offers: get: responses: '200': description: '' content: application/json: schema: type: array items: type: object properties: menu_items: $ref: '#/components/schemas/Menu-items' discount_amount: type: integer description: Discount amount associated with the reward reward: type: object properties: created_at: type: string enum: - YYYY-MM-DDThh:mm:ssZ format: date-time description: Date/time when the reward was created for a user in the system end_date_tz: type: string enum: - YYYY-MM-DDThh:mm:ssZ format: date-time description: Date/time when the reward offer ends start_date_tz: type: string enum: - YYYY-MM-DDThh:mm:ssZ format: date-time description: Date/time when the reward offer starts updated_at: type: string enum: - YYYY-MM-DDThh:mm:ssZ format: date-time description: Date/time when the reward offer was udpated id: type: integer format: int64 description: Unique ID of the reward image: type: string description: URL of the image depicting the reward status: type: string description: Status of the reward (e.g., "unredeemed", "honoured", "expired") points: type: integer description: Points needed for the reward discount_amount: type: integer description: Discount amount associated with the reward description: type: string description: Description of the reward name: type: string description: Name of the reward redeemable_properties: type: string description: Properties of the redeemable required: - name examples: default: value: - 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: '1.1' discount_amount: 2 reward: created_at: '2019-04-02T22:46:32-07:00' end_date_tz: null start_date_tz: '2019-04-02T22:46:32-07:00' updated_at: '2019-04-02T22:46:32-07:00' id: 2 image: IMAGE_URL_GOES_HERE status: unredeemed points: 0 discount_amount: 0 description: '' name: 2% off Subtotal Amount redeemable_properties: '' - 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: '1.1' discount_amount: 2 reward: created_at: '2019-04-04T04:00:34-07:00' end_date_tz: null start_date_tz: '2019-04-04T04:00:34-07:00' updated_at: '2019-04-04T04:00:34-07:00' id: 3 image: IMAGE_URL_GOES_HERE status: unredeemed points: 0 discount_amount: 2 description: $2 Off Your Order. Participating locations only. name: $2 Off Your Order redeemable_properties: '' - 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: '1.1' discount_amount: 2 reward: created_at: '2019-04-04T04:01:03-07:00' end_date_tz: null start_date_tz: '2019-04-04T04:01:03-07:00' updated_at: '2019-04-04T04:01:03-07:00' id: 4 image: IMAGE_URL_GOES_HERE status: unredeemed points: 0 discount_amount: 0 description: '' name: 2% off Subtotal Amount redeemable_properties: '' - 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: '1.1' discount_amount: 2 reward: created_at: '2019-04-15T10:48:40-07:00' end_date_tz: null start_date_tz: '2019-04-15T10:48:40-07:00' updated_at: '2019-04-15T10:48:40-07:00' id: 14 image: IMAGE_URL_GOES_HERE status: unredeemed points: 0 discount_amount: 0 description: '' name: 2% off Subtotal Amount redeemable_properties: '' '400': description: '' content: application/json: schema: type: object properties: errors: type: object properties: location_id: type: string examples: default: value: errors: location_id: Required parameter missing or the value is empty. summary: List Applicable Offers (Redemptions 1.0) description: Returns applicable offers based on the check details. operationId: mobile_list_applicable_offers parameters: - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/punchh-app-device-id' x-stoplight: id: f09cf9b1e970a requestBody: content: application/json: schema: type: object properties: menu_items: $ref: '#/components/schemas/menu-items' client: type: string description: OAuth client ID provided by the business amount: type: string description: Order amount based on items added to the cart location_id: type: string description: Location ID of the store channel: type: string x-stoplight: id: zazefztzioqd5 description: '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: mobile, chatbot.' enum: - ' mobile' - ' chatbot' required: - client - channel examples: default: value: client: CLIENT_GOES_HERE 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: '1.1' amount: '100' location_id: LOCATION_GOES_HERE channel: mobile description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/discounts/select: parameters: [] post: responses: '200': description: '' content: application/json: schema: type: object properties: redemption_ref: type: string description: Transaction level identifier for all discount selections created_at: type: string format: date-time description: Date/time when the first discount was selected, in YYYY-MM-DDThh:mm:ss format discount_basket_items: $ref: '#/components/schemas/discount_basket_items' examples: Example: value: redemption_ref: REDEMPTION_REF_GOES_HERE created_at: '2024-05-21T15:14:02Z' discount_basket_items: - discount_basket_item_id: 469363 discount_type: reward discount_id: '41049646877' discount_value: null created_at: '2024-05-24T08:36:52Z' discount_details: item_id: 48188 name: Sandwich Test | AK campaign_name: Mass Campaign Offer image: IMAGE_URL_GOES_HERE points: null base_amount: null description: '' item_properties: '' meta_detail: null start_date_tz: '2024-05-24T08:34:24Z' end_date_tz: '2024-06-30T03:15:00Z' created_at: '2023-08-18T08:29:36Z' auto_select: false - discount_basket_item_id: 541689 discount_type: reward discount_id: '41378920421' discount_value: null created_at: '2024-06-11T12:56:33Z' discount_details: item_id: 48188 name: Sandwich Test | AK campaign_name: Mass Campaign Offer image: IMAGE_URL_GOES_HERE points: null base_amount: null description: '' item_properties: '' meta_detail: null start_date_tz: '2024-05-31T13:25:08Z' end_date_tz: '2024-06-30T03:15:00Z' created_at: '2023-08-18T08:29:36Z' auto_select: false '400': description: 'Bad Request - Example error responses: - Required parameter missing or the value is empty: user_id - Required parameter missing or the value is empty: discount_basket_items_attributes - Required parameter missing or the value is empty: discount_type - Required parameter missing or the value is empty: external_uid' content: application/json: schema: type: object properties: {} '404': description: Not Found - User not found content: application/json: schema: type: object properties: {} '422': description: 'Unprocessable Entity - Example error responses: - Discount basket items have already been taken for the user - Same parameters provided multiple times - Not enough cards - Processing limit for discounts of loyalty type has been reached - Invalid Code - Coupon/Promo code is not active - The code can not be added, as the campaign has exceeded its usage limit - This coupon can only be used 1 time(s) per day. - Invalid Business Configuration. Please connect with your Customer Success representative for resolution of the issue. - Mobile Coupon/Promo cannot be added into basket - Balance is insufficient to process request - Max Redemption Amount has been reached - Invalid Discount Value - Unable to access the user’s Discount Basket, the Basket is currently locked - Interoperability validation failed - Invalid Subscription ID - Invalid Redeemable ID - Invalid Reward ID - Guest is not allowed to select/unselect from basket as he/she is banned or deactivated from the Loyalty program - Redemption limit reached - Discount type should be card_completion, discount_amount, redemption_code, reward, fuel_reward, redeemable, subscription - Another transaction is currently accessing the same code. Please try after some time. - Cannot add more than one subscription into basket' content: application/json: schema: type: object properties: {} description: '- A single discount basket will be active at a time. If there is no active discount basket, the system will create a new active discount basket along with selected discounts passed in the request parameters. - The Punchh system will not have any validation based on points adjustments as discounts are added. - When a guest adds multiple discounts, and one is invalid for some reason, the entire request will fail with an error message. The guest will then be required to remove the invalid discount and resubmit. ' summary: Add Selection to Discount Basket (Redemptions 2.0) operationId: sso_create_online_redemption parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/punchh-app-device-id' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/accept_language' x-stoplight: id: 49c4867d18844 requestBody: content: application/json: schema: type: object properties: discount_basket_items_attributes: type: array description: List of discounts to add to basket items: type: object properties: discount_type: type: string enum: - reward - card_completion - redeemable - discount_amount - redemption_code - subscription - fuel_reward description: 'The discount type can be any one of these values: card_completion || reward || redeemable || discount_amount || redemption_code || subscription || fuel_reward. For details, see [this topic](/docs/dev-portal-online-ordering/0130fe9413a97-getting-started-with-online-ordering-ap-is).' discount_id: type: integer description: Unique ID that identifies the discount (e.g., reward_id, redeemable_id, redemption_code, coupon_code) discount_value: type: number description: Dollar amount not exceeding the value of banked rewards in the user’s account. This parameter is applicable only when the program type of the business is banked rewards. If selecting additional currency exceeds the user’s available balance, then the selection will fail with an error message indicating that the selection exceeds the currency balance. format: float required: - discount_type client: type: string description: OAuth client ID provided by the business required: - discount_basket_items_attributes - client examples: Example: value: discount_basket_items_attributes: - discount_id: 131 discount_type: reward - discount_value: 132 discount_type: reward client: CLIENT_GOES_HERE description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/discounts/unselect: parameters: [] delete: summary: Remove Item From Discount Basket (Redemptions 2.0) operationId: delete-api-auth-discounts-unselect responses: '200': description: OK headers: {} content: application/json: schema: type: object properties: redemption_ref: type: string description: Transaction level identifier for all discount selections created_at: type: string format: date-time description: Date/time when the first discount was selected, in YYYY-MM-DDThh:mm:ss format discount_basket_items: $ref: '#/components/schemas/discount_basket_items' examples: Example: value: redemption_ref: REDEMPTION_REF_GOES_HERE created_at: '2024-05-21T15:14:02Z' discount_basket_items: - discount_basket_item_id: 469363 discount_type: reward discount_id: '41049646877' discount_value: null created_at: '2024-05-24T08:36:52Z' discount_details: item_id: 48188 name: Sandwich Test | AK campaign_name: Mass Campaign Offer image: IMAGE_URL_GOES_HERE points: null base_amount: null description: '' item_properties: '' meta_detail: null start_date_tz: '2024-05-24T08:34:24Z' end_date_tz: '2024-06-30T03:15:00Z' created_at: '2023-08-18T08:29:36Z' auto_select: false - discount_basket_item_id: 541689 discount_type: reward discount_id: '41378920421' discount_value: null created_at: '2024-06-11T12:56:33Z' discount_details: item_id: 48188 name: Sandwich Test | AK campaign_name: Mass Campaign Offer image: IMAGE_URL_GOES_HERE points: null base_amount: null description: '' item_properties: '' meta_detail: null start_date_tz: '2024-05-31T13:25:08Z' end_date_tz: '2024-06-30T03:15:00Z' created_at: '2023-08-18T08:29:36Z' auto_select: false '400': description: 'Bad Request - Required parameter missing or the value is empty: discount_basket_item_ids' content: application/json: schema: type: object properties: {} '404': description: 'Not Found - Example error responses: - User does not have an active basket - User not found' content: application/json: schema: type: object properties: {} '422': description: 'Unprocessable Entity - Example error responses: - Discount Items not found with any given ids - Guest is not allowed to select/unselect from basket as he/she is banned or deactivated from the Loyalty program - Unable to access the user’s Discount Basket, the Basket is currently locked' content: application/json: schema: type: object properties: {} description: Delete one or more discounts from a discount basket. parameters: - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/punchh-app-device-id' - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/accept_language' x-stoplight: id: 8a087a5033151 requestBody: content: application/json: schema: type: object properties: discount_basket_item_ids: type: array description: Discount basket IDs of the items that need to be removed from the discount basket items: type: integer client: type: string description: OAuth client ID provided by the business required: - discount_basket_item_ids - client examples: Example: value: discount_basket_item_ids: - 61 - 62 client: CLIENT_GOES_HERE tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/discounts/active: parameters: [] get: summary: Get Active Discount Basket (Redemptions 2.0) tags: - Api2 responses: '200': description: OK content: application/json: schema: type: object properties: redemption_ref: type: string description: Transaction level identifier for all discount selections created_at: type: string description: Date/time when the first discount was selected, in YYYY-MM-DDThh:mm:ss format format: date-time discount_basket_items: $ref: '#/components/schemas/discount_basket_items' examples: Example: value: redemption_ref: REDEMPTION_REF_GOES_HERE created_at: null discount_basket_items: - discount_basket_item_id: 4699 discount_type: reward discount_id: '33703164' discount_value: null created_at: '2022-08-25T10:03:48Z' discount_details: item_id: 777658 name: Flat $5 Off (Unlocks at 100 points) campaign_name: Mass Campaign Offer image: IMAGE_URL_GOES_HERE points: 100 base_amount: 5 description: '' item_properties: null meta_detail: null start_date_tz: null end_date_tz: null created_at: '2022-09-08T18:41:16Z' auto_select: false Listing expired discount with error message: value: redemption_ref: REDEMPTION_REF_GOES_HERE created_at: null discount_basket_items: - discount_basket_item_id: 4699 discount_type: reward discount_id: '33703164' discount_value: null created_at: '2022-08-25T10:03:48Z' discount_details: item_id: 777658 name: Flat $5 Off (Unlocks at 100 points) campaign_name: Mass Campaign Offer image: IMAGE_URL_GOES_HERE points: 100 base_amount: 5 description: '' item_properties: null meta_detail: null start_date_tz: null end_date_tz: null created_at: '2022-09-08T18:41:16Z' auto_select: false - discount_basket_item_id: 4890 discount_type: reward discount_id: '33703164' discount_value: null created_at: '2022-08-25T10:03:48Z' message: - Invalid Reward ID. discount_details: null '404': description: 'Not Found - Example error responses: - User does not have an active basket - User not found' content: application/json: schema: type: object properties: {} '422': description: 'Unprocessable Entity - Example error responses: - Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. - Unable to access the user’s Discount Basket, the Basket is currently locked' content: application/json: schema: type: object properties: {} operationId: get-api-auth-discounts-active parameters: - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/punchh-app-device-id' - $ref: '#/components/parameters/signature' - $ref: '#/components/parameters/accept_language' description: '- Get a list of discount details that have been selected by a guest. Only one active basket can exist in the system for a particular guest. - 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.' x-stoplight: id: 1d4f01cf7aa32 requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business required: - client examples: Example: value: client: CLIENT_GOES_HERE servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/single_scan_tokens: post: summary: Get Access Code (Redemptions 2.0) operationId: post-api-mobile-single_scan_tokens responses: '200': description: OK content: application/json: schema: type: object properties: expires_in: type: string format: date-time description: Token expiration timestamp, in YYYY-MM-DDThh:mm:ss format. The token TTL (time to live) is 5-10 minutes. created_at: type: string format: date-time description: Token creation timestamp, in YYYY-MM-DDThh:mm:ss format single_scan_code: type: string description: '6-digit token (one time authentication code) ' examples: Example: value: expires_in: '2022-06-08T09:59:10Z' created_at: '2022-06-08T09:54:10Z' single_scan_code: 4E43DB '400': description: 'Bad Request - Example error responses: - Required parameter missing or the value is empty: transaction_token - Required parameter missing or the value is empty: gift_card_uuid - Required parameter missing or the value is empty: transaction_token ' content: application/json: schema: type: object properties: {} '422': description: "Unprocessable Entity - Example error responses:\n- This guest has been banned or deactivated from the loyalty program\n- Not valid coupon code \n- Not valid gift card \n- Not valid redeemable\n- Not valid redemption code \n- Not valid reward " content: application/json: schema: type: object properties: {} description: 'This API returns the single-scan code containing a UUID string in the API response. The loyalty user can use the single-scan code to pay, earn, and redeem a reward/offer with a single scan at the POS store. The value of the `single_scan_code` parameter returned in the API response can then be passed as the `otp` (one-time passcode) with the `lookup_field` parameter in the request of the [Find User](/docs/dev-portal-pos/ce2bc2798ed8f-find-user-redemptions-2-0) POS API. The OTP is a short-lived token generated via mobile app to securely identify guest users at the POS. The token expiration can be configured in the Punchh platform (contact your Punchh representative for more information). A user can generate only one token at a time. Each token is 6-34 alphanumeric characters. **Note**: This mobile API endpoint (`POST {server-name}/api2/mobile/single_scan_tokens`) used for Redemptions 2.0 is the same as the [Generate a Single Scan Code](/docs/dev-portal-mobile/apis/mobile-api/paths/~1api2~1mobile~1single_scan_tokens/post) mobile API endpoint. When using this API with Redemptions 2.0, the following offers parameters must NOT be included with the request body: - `reward_id` - `redeemable_id` - `banked_reward_amount` - `coupon` - `redeemable_card_count` ' parameters: - $ref: '#/components/parameters/Accept' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/User-Agent' - $ref: '#/components/parameters/punchh-app-device-id' - $ref: '#/components/parameters/Content-Type' - $ref: '#/components/parameters/signature' x-stoplight: id: ee950fa86dc60 requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business payment_type: type: string description: 'Method of payment. Accepted values: `CreditCard` and `GiftCard`' gift_card_uuid: type: string description: Identification number for gift card tip: type: string description: Discretionary amount for tipping required: - client examples: Example: value: payment_type: GiftCard gift_card_uuid: UUID_GOES_HERE tip: '1' client: CLIENT_GOES_HERE tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/subscriptions: parameters: [] get: summary: Fetch Active Purchasable Subscription Plans operationId: post-api2-mobile-subscriptions responses: '200': description: Success response if the business supports subscriptions headers: {} content: application/json: schema: type: array minItems: 1 uniqueItems: true x-examples: example-1: - name: test v1 description: '' miscellaneous: '' validity: 30 start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-05-28T13:59:47+05:30' signup_end_date: '2021-05-18T13:59:47+05:30' plan_id: 4 purchase_price: 12 image: test-image.png - name: Test3 description: hello test 3 miscellaneous: null validity: null start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-05-28T13:59:47+05:30' signup_end_date: '2021-05-18T13:59:47+05:30' plan_id: 3 purchase_price: 12 image: null - name: Test2 description: hello test 2 miscellaneous: null validity: null start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-05-28T13:59:47+05:30' signup_end_date: '2021-05-18T13:59:47+05:30' plan_id: 2 purchase_price: 12 image: null - name: Test1 description: hello test miscellaneous: null validity: null start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-05-28T13:59:47+05:30' signup_end_date: '2021-05-18T13:59:47+05:30' plan_id: 1 purchase_price: 12 image: null description: Array of the active subscription plans items: type: object properties: name: type: string minLength: 1 description: "Name of the subscription plan as provided by an admin at the time of subscription plan creation \n\nNote: The subscription `name`is returned in the language specified in the Accept-Language request header, provided the name has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription name is returned in French only if a French translation for the name is configured in the Punchh platform." description: type: string description: 'Text description of the subscription plan as configured by an admin on the subscription plan. This is used to explain the offerings of the subscription plan to guests. Note: The subscription `description` is returned in the language specified in the Accept-Language request header, provided the description has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription description is returned in French only if a French translation for the description is configured in the Punchh platform.' miscellaneous: type: string description: 'Free-form text field that can be used by businesses to enter additional information or a JSON code snippet for greater customization in the mobile app Note: The subscription `miscellaneous` information is returned in the language specified in the Accept-Language request header, provided it has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription miscellaneous information is returned in French only if a French translation for the miscellaneous is configured in the Punchh platform.' validity: type: integer format: int32 description: Number of days for which one unit of the subscription plan remains valid after purchase examples: - 30 start_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) from which the subscription plan can be purchased by guests examples: - '2021-04-28T13:59:47+05:30' end_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) until which the subscription plan can be purchased by guests examples: - '2021-04-28T13:59:47+05:30' signup_start_date: type: string format: date-time description: Date and time (in ISO 8601 format) after which the subscription plan can be purchased by guests in advance. This can be used by businesses to make a plan available for purchase before it actually starts. Any subscriptions bought after this date and before the start date of the subscription plan will start from the start_time of the Subscription Plan. examples: - '2023-04-28T13:59:47+05:30' signup_end_date: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) after which the subscription plan cannot be purchased by guests. This is the purchase cut-off time, and a business can use it to nudge guests into purchasing a subscription. examples: - '2021-04-28T13:59:47+05:30' external_plan_identifier: type: string description: UPC/SKU of the subscription plan as present on third-party applications of enterprise businesses and is configured on this subscription plan. This will be stored in the database, and the business can use it for analytics purposes. plan_id: type: integer format: int64 description: System-generated unique ID of a subscription plan created in the Punchh platform examples: - 10 plan_image_url: type: string description: URL of the image that is configured for a specific subscription plan purchase_price: type: number format: float description: Cost of purchase of one unit of a subscription plan examples: - 12.32 image: type: string minLength: 1 description: Cover image of a subscription plan uploaded at the time of subscription plan creation examples: - test-image.png subscriber_capping: type: number description: Maximum number of unique active subscribers for a plan. If the number of active subscribers reaches this limit, fresh purchases in that plan will be stopped. examples: - 400 active_subscribers: type: number description: Number of unique active subscribers of the plan examples: - 251 timezone: type: string description: Time zone configured on the subscription plan (e.g., "America/Los_Angeles” ) auto_renewing: type: boolean description: Determines whether a subscription issued from a subscription plan is an auto-renewal plan or a single-use subscription plan, such as a seasonal pass. A true value means the subscription plan gets automatically renewed, and a false value means the subscription plan is a single-use plan. The mobile application uses this value to determine if the auto_renewal of a subscription should be sent as true or false with the [Purchase Subscription](/docs/dev-portal-mobile/3d3dba2eeed74-purchase-subscription) API call. enable_multibenefit: type: boolean description: "Indicates whether the subscription plan has multi-benefit enabled, allowing up to 5 benefits to be configured on a single plan. Once enabled on a plan, this setting cannot be disabled. \n\nThe Enable multibenefit setting under Wallet and Passes > Passes > Subscription Plans > Plan Details is only available when the multi-benefit subscription feature is enabled for the business. Contact your Punchh representative to update this Punchh platform configuration.\n" purchasable_location_ids: type: array items: type: integer description: "An array of location IDs where the subscription plan is available for purchase. When configured, the plan will only appear as purchasable at these specific locations. If empty or not set, the plan is purchasable at all locations. \n\nReturned only when the multi-benefit subscription feature is enabled for the business, and the subscription plan's Enable multibenefit setting under Wallet and Passes > Passes > Subscription Plans > Plan Details is enabled in the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n" purchasable_tag_ids: type: array items: type: integer description: "An array of location group (tag) IDs where the subscription plan is available for purchase. Location groups allow admins to scope purchasability to a set of locations defined by a reusable group. Works in conjunction with purchasable_location_ids — admins can select individual locations, location groups, or both. \n\nReturned only when the multi-benefit subscription feature is enabled for the business, and the subscription plan's Enable multibenefit setting under Wallet and Passes > Passes > Subscription Plans > Plan Details is enabled in the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n" multiple_effective_locations_name: type: string description: "A human-readable display name summarizing the effective purchasable locations configured for the plan (e.g., selected location names or location group names). Useful for rendering location-scope information on guest-facing surfaces. \n\nReturned only when the multi-benefit subscription feature is enabled for the business, and the subscription plan's Enable multibenefit setting under Wallet and Passes > Passes > Subscription Plans > Plan Details is enabled in the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n" examples: example: value: - name: SUBSCRIPTION_NAME_GOES_HERE description: DESCRIPTION_GOES_HERE miscellaneous: MISC_INFORMATION_GOES_HERE validity: 30 start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-04-28T13:59:47+05:30' signup_start_date: '2023-05-28T13:59:47+05:30' signup_end_date: '2021-04-28T13:59:47+05:30' external_plan_identifier: null plan_id: 10 plan_image_url: PLAN_IMAGE_URL_GOES_HERE purchase_price: 12.32 image: test-image.png subscriber_capping: 500 active_subscribers: 251 timezone: Asia/Kolkata auto_renewing: true enable_multibenefit: true purchasable_location_ids: - 2 - 11 purchasable_tag_ids: - 1 - 2 multiple_effective_locations_name: location-name-1, location-name-10, PineCrossing, Eagle Creek '400': description: Bad Request content: application/json: schema: description: '' type: object x-examples: example-1: errors: client: Required parameter missing or the value is empty. properties: errors: type: object required: - client properties: client: type: string minLength: 1 examples: - Required parameter missing or the value is empty. required: - errors examples: example: value: errors: client: Required parameter missing or the value is empty. '412': description: Precondition Failed content: application/json: schema: description: '' type: object x-examples: example-1: errors: invalid_signature: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is properties: errors: type: object properties: invalid_signature: type: array items: type: string examples: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is examples: example: value: errors: invalid_signature: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is '422': description: Unprocessable Entity content: application/json: schema: description: '' type: object x-examples: example-1: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. properties: errors: type: object properties: disabled_feature: type: string minLength: 1 examples: - Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. examples: example: value: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. description: This API returns all of the active subscription plans that are purchasable using the mobile app and have their end time in the future. parameters: - $ref: '#/components/parameters/Accept-Language_2' - $ref: '#/components/parameters/x-pch-digest' - $ref: '#/components/parameters/User-Agent_2' - $ref: '#/components/parameters/Accept_2' x-stoplight: id: 9ad35b024c337 requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business examples: default: value: client: CLIENT_GOES_HERE tags: - Api2 post: summary: Purchase Subscription operationId: post-api2-mobile-users-subscriptions responses: '200': description: OK content: application/json: schema: type: object x-examples: example-1: subscription_id: '24' start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-04-28T13:59:47+05:30' properties: subscription_id: type: integer description: System-generated unique ID of the subscription plan that is issued for a guest start_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) from which the subscription plan purchased for the guest will become active examples: - '2021-04-28T13:59:47+05:30' end_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) until which the subscription plan purchased for the guest will remain active examples: - '2021-04-28T13:59:47+05:30' external_plan_identifier: type: string description: UPC/SKU of the subscription plan as present on third-party applications of enterprise businesses and is configured on this subscription plan. This will be stored in the database, and the business can use it for analytics purposes. location_id: type: integer x-stoplight: id: ibp0bghfldjdb description: ID of a valid Punchh location where the subscription plan is purchased. It identifies the origin of the subscription purchase for the loyalty guest. If an invalid or missing location_id is passed, the API returns a 400 Bad Request error with the message "Invalid or missing location_id". required: - subscription_id - start_time - end_time examples: example: value: subscription_id: 23 start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-04-28T13:59:47+05:30' external_plan_identifier: EXTERNAL_PLAN_IDENTIFIER_GOES_HERE location_id: 12345 '400': description: 'Bad Request - Invalid or missing location_id' content: application/json: schema: description: '' type: object x-examples: example-1: errors: client: Required parameter missing or value empty. properties: errors: type: object required: - client properties: client: type: string minLength: 1 examples: - Required parameter missing or value empty. required: - errors examples: example: value: errors: client: Required parameter missing or value empty. '401': description: Unauthorized content: application/json: schema: description: '' type: object x-examples: example-1: errors: unauthorized: - An active access token must be used to query information about the current user. properties: errors: type: object required: - unauthorized properties: unauthorized: type: array items: type: string examples: - An active access token must be used to query information about the current user. required: - errors examples: example: value: errors: unauthorized: - An active access token must be used to query information about the current user. '412': description: Precondition Failed content: application/json: schema: description: '' type: object x-examples: example-1: errors: invalid_signature: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is properties: errors: type: object required: - invalid_signature properties: invalid_signature: type: array items: type: string examples: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is required: - errors examples: example: value: errors: invalid_signature: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is '422': description: Unprocessable Entity content: application/json: schema: type: object x-examples: example-1: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. properties: errors: type: object properties: disabled_feature: type: string minLength: 1 examples: - Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. required: - errors examples: Subscription Feature is not configured: value: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. Invalid Plan ID: value: errors: invalid_request: Invalid Plan ID Auto renewal is set as true for a single use subscription: value: errors: base: - This is a single use subscription and cannot be renewed automatically. Please check request to send 'auto_renewal' as 'false'. Purchase price Null or Negative: value: errors: price: Price must be greater than or equal to 0 Start time Null: value: errors: start_time: Start time cannot be blank End time is Null: value: errors: end_time: End time cannot be blank Purchase call made is past the signup end time or end time of the plan: value: errors: plan_expired: Plan has expired Recurring payments option is disabled: value: errors: recurring_payment_off_for_adapter: - Payment Service not available. description: 'This API supports the purchase of a subscription plan created in the Punchh platform. If the Single Use setting is enabled for the subscription plan, and if you send auto_renewal as `true` in the Purchase Subscription API, then the API returns an error: This is a single use subscription and cannot be renewed automatically. Please check the request to send auto_renewal as false.' parameters: - $ref: '#/components/parameters/Accept_2' - $ref: '#/components/parameters/Content-Type_2' - $ref: '#/components/parameters/x-pch-digest' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/Accept-Language-2' - $ref: '#/components/parameters/User-Agent_2' x-stoplight: id: 3d3dba2eeed74 requestBody: content: application/json: schema: type: object x-examples: example-1: plan_id: 23 start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-05-28T13:59:47+05:30' purchase_price: '23.34' auto_renewal: 'true' properties: client: type: string description: OAuth client ID provided by the business examples: - CLIENT_GOES_HERE plan_id: type: integer description: System-generated unique ID of a subscription plan created in the Punchh platform. A subscription based on this plan ID will be issued to the guest when a purchase call is made. examples: - 23 external_plan_identifier: type: string description: UPC/SKU of the subscription plan as present on third-party applications of enterprise businesses and is configured on this subscription plan. This will be stored in the database, and the business can use it for analytics purposes. This value can be used to make the purchase of the subscription plan instead of using the “plan_id”. start_time: type: string minLength: 1 format: date-time description: 'Date and time (in ISO 8601 format) from which the subscription being issued will become active ' examples: - '2021-04-28T13:59:47+05:30' end_time: type: string minLength: 1 format: date-time description: 'Date and time (in ISO 8601 format) until which the subscription being issued will remain active ' examples: - '2021-04-28T13:59:47+05:30' purchase_price: type: number format: float description: Price at which one unit of the subscription plan is purchased examples: - 23.45 auto_renewal: type: boolean default: false description: A guest’s preference of having a newly purchased subscription plan get automatically renewed per the plan's schedule. Third parties where auto renewal is considered default should send this value as "true". The mobile application uses the value in the auto_renewing response parameter in the [Fetch Active Purchasable Subscription Plans](/docs/dev-portal-mobile/9ad35b024c337-fetch-active-purchasable-subscription-plans) API to determine if the auto-renewal of a subscription should be sent as true or false during the subscription purchase. location_id: type: integer x-stoplight: id: albq3ca1wecfx description: ID of the location where the subscription plan is purchased. It identifies the origin of the subscription purchase for the loyalty guest. If an invalid or missing location_id is passed, the API returns a 400 Bad Request error with the message "Invalid or missing location_id". payment_card_uuid: type: string description: Unique digital identifier/token of the user's credit card can be referred to as the uuid of the saved payment card, required if a saved payment card is used for payments. The transaction token is issued by a payment processor used by a business. required: - client - plan_id - start_time - end_time - purchase_price - auto_renewal - location_id examples: example: value: client: CLIENT_GOES_HERE plan_id: 23 start_time: '2021-04-28T13:59:47+05:30' end_time: '2021-04-28T13:59:47+05:30' purchase_price: '23.09' auto_renewal: true payment_card_uuid: PAYMENT_CARD_UUID_GOES_HERE external_plan_identifier: EXTERNAL_PLAN_IDENTIFIER_GOES_HERE location_id: 12345 description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/user_subscriptions: parameters: [] get: summary: Fetch Subscription Plans for a User operationId: post-api2-mobile-subscriptions responses: '200': description: OK content: application/json: schema: type: object x-examples: example-1: subscriptions: - subscription_id: 19 start_time: '2021-05-18T21:09:38+05:30' end_time: '2021-06-03T21:09:38+05:30' plan_id: 9 image: test-image.png name: fuel_price description: '' miscellaneous: '' status: Active benefits: - benefit_id: 3 discounts: - discount_id: 7 threshold: 40 discounted_value: 80 discounted_quantity: 40 - discount_id: 8 threshold: 1000 discounted_value: 1000 discounted_quantity: 1000 properties: has_any_subscriptions: type: boolean x-stoplight: id: ckkpgl22k7pqr description: 'Indicates whether or not a user''s account currently has an active subscription or has ever had an active subscription. This parameter can be used by developers to customize the app experience as per the needs of the business. Possible values: true, false' subscriptions: type: array uniqueItems: true minItems: 1 description: Array object containing different subscriptions issued to the guest items: type: object properties: subscription_id: type: number description: System-generated unique ID of the subscription that is issued to the guest start_time: type: string minLength: 1 description: Date and time (in ISO 8601 format) from which this current subscription becomes active for a guest end_time: type: string minLength: 1 description: Date and time (in ISO 8601 format) until which this current subscription remains active for a guest plan_id: type: number description: System-generated unique ID of the plan against which this subscription is issued for the guest image: type: string minLength: 1 description: Cover image of a subscription plan uploaded at the time of subscription plan creation cancellation_reason: type: string description: Reason for cancellation as sent to Punchh at the time of cancellation cancelled_at: type: string format: date-time description: Date and time (in ISO 8601 format) when the subscription is cancelled name: type: string minLength: 1 description: 'Name of the subscription plan as provided by the admin at the time of subscription plan creation. Note: The subscription `name` is returned in the language specified in the Accept-Language request header, provided the name has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription name is returned in French only if a French translation for the name is configured in the Punchh platform. ' description: type: string description: 'Text description of the subscription plan as configured by the admin on the subscription plan. This is used to explain the offerings of the subscription plan to guests. Note: The subscription `description` is returned in the language specified in the Accept-Language request header, provided the description has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription description is returned in French only if a French translation for the description is configured in the Punchh platform. ' miscellaneous: type: string description: 'Free-form text field that can be used by businesses to enter additional information or a JSON code snippet for greater customization in the mobile app. Note: The subscription `miscellaneous` information is returned in the language specified in the Accept-Language request header, provided it has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription miscellaneous information is returned in French only if a French translation for the miscellaneous is configured in the Punchh platform. ' status: type: string minLength: 1 description: "Subscriptions issued to a guest can have multiple statuses. Currently supported statuses are:\n1. active: The subscription is active and the guest can enjoy the benefits until its end_time.\n2. expired: The subscription is not renewed and expired. The end_time of the subscription is in the past, and it was not cancelled before its expiration.\n3. soft_cancelled: The subscription is cancelled either by the guest or by an admin. The benefits remain valid until the end_time. \n4. hard_cancelled: The subscription is cancelled by an admin and the benefits become invalid immediately from the time of cancellation.\n5. renewed: The subscription is renewed.\n" benefits: type: array uniqueItems: true minItems: 1 maxItems: 5 description: 'A subscription plan may contain multiple benefits. This object includes the details of benefits available to the guest for this subscription ID. ' items: type: object properties: benefit_id: type: number description: System-generated unique ID of the benefit that is configured on the subscription plan and is issued to the guest for this subscription benefit_name: type: string description: 'Name of the individual benefit, set in Benefits & Rules (Wallet and Passes > Subscription Plans) in the Punchh platform. Up to 5 benefits per plan. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' benefit_description: type: string description: 'Description of the individual benefit, set in Benefits & Rules (Wallet and Passes > Subscription Plans) in the Punchh platform. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' benefit_priority: type: integer description: 'Sets the order in which benefits are applied to a transaction and displayed in the mobile app within a multi-benefit subscription plan. Lower value = higher priority (starts at 1 and goes up to the number of benefits in the plan). Priority ordering matters when benefits can affect each other''s eligibility — for example, applying a free item first might drop the bill below a threshold needed for a percentage discount. The benefit priority order is locked once the plan becomes visible to customers. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' benefit_type: type: string description: Type of the benefit examples: - sku_discounting discounts: type: array uniqueItems: true minItems: 1 description: A benefit may contain multiple discounts. This object contains the details of different discounts issued to the guest for this subscription. items: type: object properties: discount_id: type: number description: System-generated unique ID of the discounting rule configured under the benefit. occurrence: type: number x-nullable: true description: 'The number of times this discount can be applied. A null value means no specific occurrence limit is set. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' gap_units: type: number x-nullable: true description: 'The number of time units (defined by gap_unit_type) that must elapse between consecutive uses of this discount. A null value means no gap restriction. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' gap_unit_type: type: string description: 'The unit of time for the gap_units value (e.g., "hours"). Defines the cooldown period type between discount usages. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' start_time: type: string format: date-time x-nullable: true description: 'The start date/time from which this discount becomes active. A null value means no specific start time constraint — the discount is available from the subscription''s start. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' end_time: type: string format: date-time x-nullable: true description: 'The end date/time after which this discount expires. A null value means no specific end time constraint — the discount remains valid until the subscription ends. Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' threshold: type: number description: 'Maximum number of units that can be discounted for this particular discounting rule. ' threshold_discount: type: number description: 'The maximum discount value that can be applied per use of this discounting rule (e.g., 100.0 means up to 100 units of % or $, depending on discount_type). Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' discount_type: type: string description: 'The type of discounting rule configured under the benefit. Common values include "%_or_$_off" (percentage or dollar amount off), "sku_discounting" (item-level discount), "target_price_bundle_advanced" (bundle pricing), and "receipt_level_discount" (order-level discount). Note: This parameter is returned when enabled for the business. Contact your Punchh representative to update this platform configuration.' discounted_value: type: number description: Value of discounts given as per this discounting rule. discounted_quantity: type: number description: Number of units discounted as per this discounting rule. external_plan_identifier: type: string description: UPC/SKU of the subscription plan as present on third-party applications of enterprise businesses and is configured on this subscription plan. This will be stored in the database, and the business can use it for analytics purposes. This value can be used to make the purchase of the subscription plan instead of using the “plan_id”. plan_image_url: type: string description: URL of the image that is configured for a specific subscription plan renewed_on: type: string description: Date and time when the subscription was renewed on format: date-time upcoming_renewal: type: string description: Date and time of next renewal of the subscription format: date-time examples: - '2023-05-11T05:00:00+05:30' purchase_price: type: integer description: amount paid for the subscription auto_renewal: type: boolean description: A guest’s preference of having a newly purchased subscription plan get automatically renewed per the plan's schedule. Third parties where auto renewal is considered default should send this value as "true". default: true payment_card: type: object description: The object shows payment card settings properties: uuid: type: string description: Saved payment card UUID nickname: type: string description: Payment card nickname as set by the user preferred: type: boolean description: Whether this card will be selected as the default card or not when the user makes a payment through the mobile app. If the value is set to true, this card will be selected as the default card for payments. card_details: type: object description: The object shows payment card details properties: name_on_card: type: string description: Cardholder name ' card_type': type: string description: Card type like VISA, Mastercard, Amex, etc cc_4: type: string description: Last 4 digits of the card expiry_month: type: string description: Expiry month of the card expiry_year: type: string description: Expiry year of the card cancellation_feedback: type: string description: Subjective feedback that a guest provides when cancelling a subscription from the mobile application, or the feedback that an administrator provides when cancelling a subscription from the Punchh platform. examples: Success: value: has_any_subscriptions: true subscriptions: - subscription_id: 19 start_time: '2021-05-18T21:09:38+05:30' end_time: '2021-06-03T21:09:38+05:30' plan_id: 9 image: test-image.png cancellation_reason: Found better alternative cancelled_at: null name: fuel_price description: '' miscellaneous: '' status: Active external_plan_identifier: EXTERNAL_PLAN_IDENTIFIER_GOES_HERE plan_image_url: PLAN_IMAGE_URL_GOES_HERE renewed_on: '2023-04-10T05:00:00+05:30' upcoming_renewal: '2023-05-11T05:00:00+05:30' purchase_price: 100 auto_renewal: true benefits: - benefit_id: 3 benefit_type: sku_discounting benefit_name: Free Coffee benefit_description: Get a free coffee on your next visit benefit_priority: 1 discounts: - discount_id: 7 occurrence: 5 gap_units: 24 gap_unit_type: hours start_time: '2023-05-18T00:00:00+05:30' end_time: '2023-06-03T23:59:59+05:30' threshold: 40 threshold_discount: 100 discount_type: sku_discounting discounted_value: 80 discounted_quantity: 40 - discount_id: 8 occurrence: null gap_units: null gap_unit_type: hours start_time: null end_time: null threshold: 1000 threshold_discount: 100 discount_type: sku_discounting discounted_value: 1000 discounted_quantity: 1000 - benefit_id: 4 benefit_type: sku_discounting benefit_name: Fuel Discount benefit_description: Get 10% off on fuel purchases benefit_priority: 2 discounts: - discount_id: 7 occurrence: 10 gap_units: null gap_unit_type: hours start_time: null end_time: null threshold: 40 threshold_discount: 50 discount_type: '%_or_$_off' discounted_value: 80 discounted_quantity: 40 - discount_id: 8 occurrence: null gap_units: null gap_unit_type: hours start_time: null end_time: null threshold: 1000 threshold_discount: 100 discount_type: receipt_level_discount discounted_value: 1000 discounted_quantity: 1000 payment_card: uuid: SAVED_CARD_UUID nickname: My card card_details: name_on_card: CARDHOLDER_NAME_GOES_HERE cc_4: '1111' card_type: Visa expiry_month: 09 expiry_year: '23' cancellation_feedback: Found better alternative '400': description: 'Bad Request: Sending an invalid/empty client' content: application/json: schema: type: object x-examples: example-1: errors: client: Required parameter missing or the value is empty. properties: errors: type: object properties: client: type: string minLength: 1 examples: - Required parameter missing or the value is empty. examples: Sending an invalid/empty client: value: errors: client: Required parameter missing or the value is empty. '401': description: 'Unauthorized: Sending an invalid/empty access token' content: application/json: schema: type: object properties: errors: type: object properties: unauthorized: type: array items: type: string examples: - An active access token must be used to query information about the current user. examples: - An active access token must be used to query information about the current user. examples: Sending an invalid/empty access token: value: errors: unauthorized: - An active access token must be used to query information about the current user. '412': description: 'Precondition Failed: Invalid Signature' content: application/json: schema: type: object x-examples: example-1: errors: invalid_signature: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is properties: errors: type: object properties: invalid_signature: type: array items: type: string examples: Invalid Signature: value: errors: invalid_signature: - Signature doesn't match. Please see our documentation https://developers.punchh.com/docs/dev-portal-mobile/17c2f8eb39142-generating-x-pch-digest-header-for-mobile-ap-is '422': description: Unprocessable Entity content: application/json: schema: description: '' type: object x-examples: example-1: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. properties: errors: type: object properties: disabled_feature: type: string minLength: 1 examples: - Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. examples: example: value: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. description: "This API returns the subscriptions attached to a guest's profile. While the response can be filtered based on \"status\" and \"past_subscriptions\", the default response will include subscriptions that are either \"active\" or \"soft_cancelled\" and have their end time in the future.\n " parameters: - $ref: '#/components/parameters/x-pch-digest' - $ref: '#/components/parameters/Authorization' - schema: type: string in: query name: filter description: 'Filter subscription by status and past_subscriptions.

If the status is not sent, the API returns subscriptions that are `active`, `soft_cancelled`, and have an end_time that is not in the past. Supported "filter” values are ''''active'''', ''''expired'''', and ''''cancelled''''.

When the API call is made using the past_subscriptions filter, the response returns only such subscriptions that have their end date/time in the past. The status against each subscription can have these values: ‘expired’, ‘renewed’, ‘soft_cancelled’, and ‘hard_cancelled’.''' - $ref: '#/components/parameters/Content-Type_2' - $ref: '#/components/parameters/User-Agent_2' - $ref: '#/components/parameters/Accept-Language_2' - $ref: '#/components/parameters/Accept_2' x-stoplight: id: e11913b8ff70c requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business required: - client examples: default: value: client: CLIENT_GOES_HERE description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/redemptions/subscription: parameters: [] post: summary: Generate a Redemption Code for Subscription Redemption operationId: post-api2-mobile-redemptions-subscription responses: '200': description: Success response if a redemption code is generated for the subscription redemption content: application/json: schema: type: object x-examples: null properties: redemption_status: type: string description: '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 user. * honoured: The redemption has already been processed successfully and redeemed by the user at the POS. * cancelled: The redemption can be voided by a user by approaching the POS in case a redemption is done by mistake and the user wants to cancel it.' created_at: type: string description: Date and time when the redemption was created in the system format: date-time examples: - '2023-05-09T07:44:38Z' redeemable_id: type: integer description: Unique ID of the redeemable location_id: type: integer description: 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. redemption_image_url: type: string description: URL of the image depicting the redeemable. It can be displayed in the mobile app. redemption_message: type: string description: A descriptive message that tells the user what the user has redeemed updated_at: type: string format: date-time description: Date and time when the redemption was updated in the system examples: - '2023-05-09T07:44:38Z' redeemable_description: type: string description: Description of the redeemable redeemable_image_url: type: string description: URL of the image depicting the redeemable. It can be displayed in the mobile app. redemption_id: type: integer format: int64 description: Unique ID of the redemption that has been created redemption_tracking_code: type: string description: Code that a user must provide at the POS to receive the redeemed reward expiring_at: type: string format: date-time description: Date and time when the redemption_tracking_code expires and the user cannot use it at the POS examples: - '2023-05-09T07:54:38Z' redeemable_name: type: string description: Name of the redeemable redeemed_value: type: string description: '* 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.' subscription_id: type: string description: Unique ID of the subscription for which redemption is done subscription_plan_id: type: integer description: System-generated unique ID of a subscription plan created in the Punchh platform subscription_plan_name: type: string description: Name of the subscription plan from which the subscription is issued subscription_plan_description: type: string description: Description of the subscription plan from which the subscription is issued subscription_plan_image_url: type: string description: Image URL of the subscription plan from which the subscription is issued redemption_type: type: string description: 'The parameter value helps the mobile application differentiate between older redemption types and subscription redemption. Valid value: SubscriptionRedemption' examples: example: value: redemption_status: redeemable created_at: '2023-05-09T07:44:38Z' redeemable_id: null location_id: 304252 redemption_image_url: REDEMPTION_IMAGE_URL_GOES_HERE redemption_message: '' updated_at: '2023-05-09T07:44:38Z' redeemable_description: null redeemable_image_url: REDEEMABLE_IMAGE_URL_GOES_HERE subscription_id: '498699' subscription_plan_id: 44 subscription_plan_name: Super Value Subscription subscription_plan_description: 10% discount on entire receipt amount (capped at $20) | Redeemable Once Per Day subscription_plan_image_url: SUBSCRIPTION_PLAN_IMAGE_URL_GOES_HERE redemption_type: SubscriptionRedemption redemption_id: 515404156 redemption_tracking_code: '8066490' expiring_at: '2023-05-09T07:54:38Z' redeemable_name: REDEEMABLE_NAME_GOES_HERE redeemed_value: null '400': description: Bad Request content: application/json: schema: type: object x-examples: null properties: errors: type: object required: - client properties: client: type: string minLength: 1 examples: - Required parameter missing or value empty. required: - errors examples: example: value: errors: client: Required parameter missing or value empty. '401': description: Unauthorized content: application/json: schema: type: object properties: errors: type: object properties: unauthorized: type: array items: type: string examples: example: value: errors: unauthorized: - An active access token must be used to query information about the current user. '412': description: Precondition Failed content: application/json: schema: type: object properties: errors: type: object properties: invalid_signature: type: array items: type: string examples: example: value: errors: invalid_signature: - Signature doesn't match. For information about generating the x-pch-digest header, see https://developers.punchh.com. '422': description: 'Unprocessable Entity: Invalid Subscription ID' content: application/json: schema: type: object properties: error: type: string examples: Invalid Subscription ID: value: error: Invalid User Subscription description: 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. parameters: - $ref: '#/components/parameters/Accept_2' - $ref: '#/components/parameters/Content-Type_2' - $ref: '#/components/parameters/x-pch-digest' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/Accept-Timezone' - $ref: '#/components/parameters/User-Agent_2' - $ref: '#/components/parameters/Accept-Language-2' x-stoplight: id: 99afe0f5c2a1b requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business subscription_id: type: string description: ID of the subscription for which the redemption code has to be generated required: - client - subscription_id examples: default: value: client: CLIENT_GOES_HERE subscription_id: '23' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/mobile/subscriptions/cancel: put: summary: Cancel Subscription (Turn off Auto Renewal) operationId: put-api2-mobile-subscriptions-cancel responses: '200': description: Successful Response | 200 OK content: application/json: schema: type: array items: type: string default: Subscription auto renewal canceled. minLength: 1 examples: default: value: - Subscription auto renewal canceled. '400': description: Bad Request content: application/json: schema: type: object properties: errors: type: object properties: parameter_name: type: string minLength: 1 examples: - cancellation_reason_id examples: Sending an invalid/blank client: value: errors: client: Required parameter missing or the value is empty. Sending an invalid/blank cancellation reason ID: value: errors: cancellation_reason_id: Required parameter missing or the value is empty. '401': description: 'Unauthorized: Sending an invalid/empty access token' content: application/json: schema: type: object properties: errors: type: object properties: unauthorized: type: array items: type: string examples: Sending an invalid/empty access token: value: errors: unauthorized: - An active access token must be used to query information about the current user. '412': description: 'Precondition Failed: Invalid Signature' content: application/json: schema: type: object properties: errors: type: object properties: invalid_signature: type: string examples: - invalid_signature examples: Invalid Signature: value: errors: invalid_signature: - Signature doesn't match. For information about generating the x-pch-digest header, see https://developers.punchh.com. '422': description: Unprocessable Entity content: application/json: schema: type: object properties: errors: type: object properties: error_name: type: array items: type: string examples: - already_canceled examples: - already_canceled examples: Cancelling an already renewed subscription: value: errors: cancel_renewed_subscription: - This subscription is already renewed. You can cancel the newly issued Subscription which will remain valid till its end date. Cancelling an already cancelled subscription: value: errors: already_canceled: - Subscription is already canceled. Sending an invalid subscription ID: value: errors: invalid_subscription: - Invalid User Subscription. description: This API allows the user to cancel an active subscription (turn off auto renewal for the subscription). This is a soft cancellation wherein the benefits remain valid until the end time of the subscription. parameters: - $ref: '#/components/parameters/User-Agent_2' - $ref: '#/components/parameters/Accept_2' - $ref: '#/components/parameters/Accept-Language-2' - $ref: '#/components/parameters/Content-Type_2' - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/x-pch-digest' x-stoplight: id: 0a7820db68f94 requestBody: content: application/json: schema: type: object properties: client: type: string description: OAuth client ID provided by the business minLength: 1 subscription_id: type: string description: System-generated unique ID of the subscription of the guest that needs to be cancelled examples: - '26' cancellation_reason_id: type: integer description: Unique ID of the business-configured cancellation reason that a guest selects when cancelling a subscription. You can find cancellation reason IDs under the subscriptions object in the [Program Meta API](/docs/dev-portal-mobile/2617bed9b0e8e-program-meta-api) response. cancellation_feedback: type: string description: Subjective feedback that can be captured from guests when they cancel a subscription from the mobile application. The maximum length supported is 225 characters. required: - client - subscription_id - cancellation_reason_id - cancellation_feedback examples: default: value: subscription_id: '1' cancellation_feedback: '' cancellation_reason_id: 1 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/segments: get: summary: Get Segment List operationId: get-api2-segment-list responses: '200': description: Success content: application/json: schema: type: object x-examples: example-1: subscription_id: 1234 start_time: '2021-05-18 11:34:46' end_time: '2021-05-28 11:34:46' properties: segment_id: type: integer description: Unique ID of the segment name: type: string description: Name of the segment description: type: string description: Description of the segment segment_type: type: string description: 'Type of the segment ' user_type: type: string description: Type of the user membership_level: type: string description: Membership level of the user examples: example: value: - segment_id: 1306904 name: test 1 description: '' segment_type: GuestProfileSegmentDefinition user_type: loyalty_user membership_level: null '400': description: 'Required parameter missing or the value is empty : segment_id' content: application/json: schema: type: object properties: {} '422': description: Invalid segment id content: application/json: schema: type: object properties: {} parameters: - $ref: '#/components/parameters/content-type' - $ref: '#/components/parameters/accept-header' - $ref: '#/components/parameters/authorization-header' description: "Pulls a list of segments available and/or defined on Punchh, allowing for browsing/selecting of Punchh segments natively in an external platform. Segment search is on a business level, and the request can:\n* Set search limits and order by desc search\n* Search based on name or segment type filter\n* Filter based on name or description\n\n\n\nFor more information, see [Headless Offers Management - Distribution](/docs/dev-portal-platform-functions/4fabd3e0da881-headless-offers-management-distribution)\n\n#### Adding Users to a Segment\n\nYou can add a user to the segment using either email or user_id. See [Add User to a Custom Segment](/docs/dev-portal-platform-functions/apis/platform-functions-api/tag/custom-segments/post/api2/dashboard/custom_segments/members). \n\nYou can also add users in bulk to a custom segment by uploading a CSV file that contains a list of users and their details. See [Bulk Add Users to a Custom Segment](/docs/dev-portal-platform-functions/apis/platform-functions-api/tag/custom-segments/post/api2/dashboard/custom_segments/members/bulk_add). \n\nSee [Custom Segment APIs](https://developers.partech.com/docs/dev-portal-platform-functions/additional-topics/gettingstartedwithcustomsegment) quickstart topic for the complete list of APIs for managing custom segments and users.\n\nThe users you add must exist in Punchh. If a user does not exist, then the [Add User to a Custom Segment](/docs/dev-portal-platform-functions/apis/platform-functions-api/tag/custom-segments/post/api2/dashboard/custom_segments/members) API returns an error. When using the [Bulk Add Users to a Custom Segment](/docs/dev-portal-platform-functions/apis/platform-functions-api/tag/custom-segments/post/api2/dashboard/custom_segments/members/bulk_add) API, the users who do not exist in Punchh are skipped. You can use the [Get User Information API](/docs/dev-portal-platform-functions/apis/platform-functions-api/tag/users/get/api2/dashboard/users/info) to check whether a user exists in Punchh." x-stoplight: id: 898fd4cc84237 requestBody: content: application/json: schema: type: object properties: query: type: string description: Define the search string on the segment name page: type: integer description: Number of pages per_page: type: integer description: Number of records per page examples: Request: value: user_id: 1234 start_time: '2021-05-18 11:34:46' plan_id: 12 end_time: '2021-05-28 11:34:46' purchase_price: 20 auto_renewal: false migration: false lifetime_debits: 30 lifetime_savings: 50 initial_debits: 10 initial_savings: 20 source_subscription_id: 'null' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/redeemables: parameters: [] get: summary: Get Redeemable List operationId: get-api2-redeemable-list responses: '200': description: Success content: application/json: schema: type: object x-examples: example-1: subscription_id: 40 start_time: '2021-04-20T21:09:38Z' end_time: '2021-04-20T21:09:38Z' properties: redeemable_id: type: integer description: ID of the redeemable redeemable_uuid: type: string description: UUID of the redeemable name: type: string description: Name of the redeemable description: type: string description: Description of the redeemable redeemable_image_url: type: string description: Image URL for the redeemable examples: example: value: - redeemable_id: 20473 redeemable_uuid: test name: future description: free redeemable_image_url: IMAGE_URL_GOES_HERE - redeemable_id: 20408 redeemable_uuid: test name: New - Free Coffee For 2 !!! description: '' redeemable_image_url: IMAGE_URL_GOES_HERE '400': description: 'Required parameter missing or the value is empty : redeemable_uuid' content: application/json: schema: type: object properties: {} '422': description: Unprocessable Entity content: application/json: schema: type: object properties: errors: type: object x-stoplight: id: tk1mlz6ykdjbi examples: Feature disabled: value: errors: disabled _feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of this issue description: 'Pulls a list of offers available and defined on Punchh, allowing for browsing/selecting of Punchh offers natively in an external platform. Redeemable search is on a business level, and the request can: * Set search limits and order by desc search * Search based on name or segment type filter * Filter based on name or description For more information, see [Headless Offers Management - Distribution](/docs/dev-portal-platform-functions/4fabd3e0da881-headless-offers-management-distribution) To call this API, the option to distribute offers from an external system must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration. ' parameters: - $ref: '#/components/parameters/content-type' - $ref: '#/components/parameters/accept-header' - $ref: '#/components/parameters/authorization-header' x-stoplight: id: b3e6608469a3e requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: subscription_id: '35' start_time: '2021-04-20T21:09:38Z' end_time: '2021-05-20T21:09:38Z' purchase_price: '23.09' properties: query: type: string description: Define the search string on the redeemable name and description column page: type: integer description: Number of pages per_page: type: integer description: Number of records per page examples: example: value: query: free page: '1' per_page: 20 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/campaigns: post: summary: Commit Redeemable Distribution operationId: post-api2-redeemable-distribution responses: '200': description: Success content: application/json: schema: type: object properties: redeemable_id: type: integer description: ID of the redeemable redeemable_image_url: type: string description: Image URL for the redeemable redeemable_properties: type: string description: Specifies the redeemable attribute campaign_id: type: integer description: ID of the campaign external_source_id: type: string description: ID of third-party campaign start_time: type: string description: Start time of the campaign format: date-time time_zone: type: string description: Time zone of the campaign examples: - redeemable_id: 20416 redeemable_image_url: IMAGE_URL_GOES_HERE redeemable_properties: attribute campaign_id: 99511494 external_source_id: '2' start_time: 2021-09-14 06:44 PM timezone: Etc/UTC examples: example: value: redeemable_id: 20416 redeemable_image_url: IMAGE_URL_GOES_HERE redeemable_properties: attribute campaign_id: 99511494 external_source_id: '2' start_time: 2021-09-14 06:44 PM timezone: Etc/UTC '400': description: "Required parameter missing or the value is empty: redeemable_uuid\n \nRequired parameter missing or the value is empty: segment_id \n\nRequired parameter missing or the value is empty: category \n\nRequired parameter missing or the value is empty: campaign_type \n\nRequired parameter missing or the value is empty: start_time \n\nRequired parameter missing or the value is empty: campaign_id " content: application/json: schema: type: object properties: {} '404': description: Coupon campaign not found content: application/json: schema: type: object properties: {} '422': description: "Coupon campaigns feature is not enabled in business\n\nCampaign start time should be at least 15 ahead from now\n\nInvalid Start Time format\n\nStart time should be less than or equal to redeemable effective expiry time \n\nInvalid redeemable uuid \n\nInvalid category \n\nInvalid segment id \n\nRedeemable is scheduled \n\nRedeemable is deactivated " content: application/json: schema: type: object properties: {} description: "Triggers configuration and scheduling of a mass offer campaign on Punchh. This is used by an external platform to request Punchh to deliver offers to a target segment of guests using the Punchh mass offer campaign functionality. When using this endpoint to request scheduling of a mass offer campaign on Punchh, the mass offer campaign created will not have any marketing communication configured (email, push notification, SMS, etc.), and the mass offer campaign will only distribute a Punchh redeemable to the guests in the targeted segment. \n\nFor more information, see [Headless Offers Management - Distribution](/docs/dev-portal-platform-functions/4fabd3e0da881-headless-offers-management-distribution)" parameters: - $ref: '#/components/parameters/content-type' - $ref: '#/components/parameters/accept-header' - $ref: '#/components/parameters/authorization-header' x-stoplight: id: 95afe32043e6b requestBody: content: application/json: schema: type: object x-examples: example-1: subscription_id: '126' cancellation_reason: Do not like your service cancellation_type: hard_cancelled properties: redeemable_uuid: type: string description: Redeemable UUID segment_id: type: integer description: Segment ID of the group of users for mass gifting category: type: string description: 'Gift type. For example: gift_redeemable, gift_fixed_point (currently only gift_redeemable is supported)' campaign_type: type: string description: 'Campaign type. For example: mass gifting campaign, coupon campaign (currently only mass gifting campaign is supported)' name: type: string description: Campaign name start_time: type: string description: Start time of the campaign external_campaign_id: type: string description: ID of third-party campaign required: - redeemable_uuid - segment_id - category - campaign_type - name - start_time examples: example: value: redeemable_uuid: test segment_id: 1307202 category: gift_redeemable campaign_type: mass_gifting name: API 11 start_time: '2021-09-14T18:44:38Z' external_campaign_id: '2' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/users/support_gifting: post: summary: Asynchronous Support Gifting operationId: post-api2-dashboard-users-support_gifting responses: '202': description: OK - Request was accepted and processed successfully. '401': description: Unauthorized - Missing or invalid Bearer token content: application/json: schema: type: object properties: error: type: string x-stoplight: id: bgezkfgnei74b examples: Unauthorized access: value: error: You need to sign in or sign up before continuing. '422': description: "Unprocessable Entity \n- Both `gift_count` and `redeemable_id` are missing: Please specify any one entity for gifting.\n- Both `gift_count` and `redeemable_id` are present: Please specify single entity for gifting." content: application/json: schema: type: object properties: errors: type: object x-stoplight: id: w64b6t74jarxu properties: base: type: array x-stoplight: id: e3p2uib3rii4o items: x-stoplight: id: 22nsv9lihmnxy type: string examples: Feature flag disabled: value: errors: base: - Your current loyalty program configuration does not support this feature. Please connect with your customer success representative for resolution of the issue. Both `gift_count` and `redeemable_id` are missing: value: errors: base: - Please specify any one entity for gifting Both `gift_count` and `redeemable_id` are present: value: errors: base: - Please specify single entity for gifting. description: 'Allows an admin to gift a single entity (points, visits, currency or rewards) to a specific user. This API can handle higher volumes of support gifting requests, as it processes them in the background rather than immediately. For bulk gifting use cases (points or rewards), we recommend using this API, which supports up to 4,000 requests per minute (RPM) and is optimized for high-volume gifting scenarios.' parameters: - $ref: '#/components/parameters/content-type' - $ref: '#/components/parameters/accept-header' - $ref: '#/components/parameters/authorization-header' x-stoplight: id: 083fc4af21d64 requestBody: content: application/json: schema: type: object properties: user_id: type: integer description: Unique ID of the user who will receive the gift or message. This is a unique ID assigned to the user by Punchh. subject: type: string description: Subject of the message that you want to send to the user. If no value is provided, the default system value will be used. message: type: string description: Message that will be sent to the user gift_reason: type: string description: Reason these points or rewards are being gifted to the user. If no value is provided, the default system value of "Support Activity" will be provided. gift_count: type: integer description: 'In a points-based business, gift_count represents the number of points to be gifted to guests. In a visit-based business, it is the number of visits to be gifted. Gifting is optional. You can include either `gift_count` (for points or visits) or `redeemable_id` (for rewards) in the request. At least one of these parameters must be provided. * If both gift_count and redeemable_id are blank, the system returns: "Please specify any one entity for gifting". * If both gift_count and redeemable_id are present, the system returns: "Please specify a single entity for gifting". ' reward_amount: type: integer x-stoplight: id: msxx9oioxlpyl description: Currency amount that will be gifted to the user. redeemable_id: type: integer description: Unique ID of the redeemable that you want to gift to the user. To send a gift, include either `gift_count` (for points) or `redeemable_id` (for rewards) in the request. At least one of these parameters must be provided. end_date: type: string format: date description: 'Expiration date for the gifted redeemable. If provided, the redeemable will expire on the earlier of this date or the default configuration’s expiration date. The actual expiration will be whichever is earlier: the date you provide, or the system’s default expiration for that reward.' examples: - YYYY-MM-DD location_id: type: integer description: Unique ID of the location associated with the gift. This is for reference purposes. If no location ID is provided, the ID of the headquarters location will be used. reset_guest_last_activity: type: boolean x-stoplight: id: ukavl0wchvhnx description: Resets the guest's last activity timestamp to the current time required: - user_id examples: Example: value: user_id: 111111111 subject: Gifts from us. message: Thank you for contacting us. Here are 50 extra points to make your day. gift_reason: Admin Generosity gift_count: 50 location_id: 310969 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/users/support: post: responses: '201': description: Created content: application/json: schema: type: object properties: {} '401': $ref: '#/components/responses/401-unauthorized' '422': description: '' content: application/json: schema: type: object properties: errors: type: object x-stoplight: id: 9bphoz90yu3rq properties: base: type: array x-stoplight: id: qy6fp2gyy03gw items: {} examples: default: value: errors: base: - Please specify single entity for gifting. summary: Support Gifting to a User description: 'The Support Gifting API enables administrators (such as restaurant managers, support staff, or corporate team members) to grant users different types of rewards (e.g., redeemables, points, etc.). It is particularly valuable in customer support, operational adjustments, or exception-handling scenarios where manual gifting is required. Caution: It must not be used for bulk or large-scale gifting and is not a substitute for marketing or promotional campaigns. Maximum allowed usage: The API enforces a rate limit of 1,250 requests per minute (RPM). Recommendation: For bulk gifting use cases (points or rewards), we recommend using [Asynchronous Support Gifting](/docs/dev-portal-platform-functions/apis/headless-offers-api/post/api2/dashboard/users/support_gifting) API, which supports up to 4,000 RPM and is optimized for high-volume gifting scenarios.' operationId: dashboard_support_gifting_to_user parameters: - $ref: '#/components/parameters/content-type' - $ref: '#/components/parameters/accept-header' - $ref: '#/components/parameters/authorization-header' x-stoplight: id: b75aa83d15fa6 requestBody: content: application/json: schema: type: object properties: user_id: type: integer description: Unique ID of the user to whom you want to send the message. This is a unique ID assigned to the user by Punchh. subject: type: string description: Subject of the message that you want to send to the user. If no value is provided, the default system value will be picked. message: type: string description: The message that will be sent to the user. Messaging is optional. You can send either a message only or a gift only. However, at least one of the two should be sent. gift_reason: type: string description: The reason these points, visits, or rewards are being gifted to the user. If no value is provided, the default system value of "Support Activity" will be provided. gift_count: type: integer description: In a points-based business, the gift count is the number of points that will be gifted to guests. In a visit-based business, it is the number of visits that will be gifted. Gifting is optional. You can send either a message only or a gift only. However, at least one of the two should be sent. reward_amount: type: integer description: Currency amount that will be gifted to the user. Gifting is optional. You can send either a message only or a gift only. However, at least one of the two should be sent. redeemable_id: type: integer description: Unique ID of the redeemable that you want to gift to the user. Gifting is optional. You can send either a message only or a gift only. However, at least one of the two should be sent. end_date: type: string format: date description: The date on which you want the gifted redeemable to expire. If this date is provided and there is an expiry configured on the redeemable, it will expire on the earlier date. fuel_amount: type: number description: Fuel amount that you want to gift to the user location_id: type: integer description: Unique ID of the location associated with the gift. This is for reference purposes. If no location ID is provided, the ID of the headquarters location will be used. reset_guest_last_activity: type: boolean x-stoplight: id: ukavl0wchvhnx description: Resets the guest's last activity which is the expiry date to the current time challenge_campaign_id: type: integer x-stoplight: id: igylbqbmml2tf description: Unique ID of the challenge in a campaign for which progress will be gifted progress_count: type: integer x-stoplight: id: v6pezpd2lr2k2 description: Number of steps that will be gifted to the user for the challenge ID specified in `challenge_campaign_id`. If the API call is successful, the progress made in the challenge is shown in the Challenges tab on the user timeline in the Punchh platform. Challenges must be enabled for the business in the Punchh platform, and the bearer token for admin authorization passed in the Authorization header must have the Dashboard API Access and Gift or Force Redeem permissions for the API to gift the user the progress for a challenge successfully. Contact your Punchh representative to update this Punchh platform configuration. examples: default: value: user_id: 111111111 subject: Gifts from us. message: Thank you for contacting us. Here are 50 extra points to make your day. gift_reason: Admin Generosity gift_count: 50 location_id: 310969 challenge_campaign_id: 48770 progress_count: 1 description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/offers/lis: get: summary: Get Line Item Selector (LIS) List tags: - Api2 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/lis_data_output' examples: Example: value: data: - external_id: EXTERNAL_ID_GOES_HERE name: LIS filter_type: base_and_modifiers exclude_non_payable: true base_items: clauses: - attribute: item_name operator: like value: White Rice modifiers: clauses: - attribute: item_name operator: like value: curry Rice processing_method: max_price max_discount_units: 2 - external_id: EXTERNAL_ID_GOES_HERE name: LIS 2 filter_type: base_only exclude_non_payable: true base_items: clauses: - attribute: item_name operator: like value: White Rice meta: page: 1 per_page: 2 total_records: 10 '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' operationId: get-api2-dashboard-offers-lis description: "Pulls a list of line item selectors available and defined at the business level. \n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\n\nLine item selector search is on a business level, and the request can:\n* Set search limits and order by descending search\n* Filter based on name and other attributes, for example, name or recency \n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)" parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Authorization_2' - $ref: '#/components/parameters/Content-Type_3' requestBody: content: application/json: schema: type: object properties: query: type: string x-stoplight: id: w6062fx4u3k3y description: Define the search string on the lis name column page: type: integer x-stoplight: id: 695gq12y76fz1 description: Number of pages to retrieve. If the requested number exceeds the available pages, the system will retrieve up to the last valid page. If the `page` value is not provided, the default value is used. default: 1 per_page: type: integer x-stoplight: id: 3cb4kthxtmsc0 description: Number of records per page. If the `per_page` value is not provided, the default value is used. The maximum `per_page` value is enforced based on the OFFERS_LIST_MAX_PER_PAGE environment variable. default: 20 examples: Example: value: query: free page: 1 per_page: 20 x-stoplight: id: f471f9f9b598d post: summary: Create Line Item Selector (LIS) operationId: post-api2-dashboard-offers-lis responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/lis_results' examples: Example: value: results: - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] warnings: {} - external_id: EXTERNAL_ID_GOES_HERE success: false errors: - ERROR MESSAGE warnings: {} - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] warnings: base_items: clauses: - message: 'Required parameters missing or invalid: attribute' item: attribute: item operator: like value: White Rice modifiers: clauses: - message: 'Required parameter is duplicate: attribute' item: attribute: item_name operator: like value: '123456' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Authorization_2' - $ref: '#/components/parameters/Content-Type_3' description: "Allows a business to define one or more line item selectors (LIS). You can bulk create a maximum of 20 line item selectors per API call. If the request input contains more than 20 LIS, only the first 20 are created, and the remaining are ignored. \n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)\n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\nFor more information on LIS settings, see the [Line Item Selectors](https://support.punchh.com/s/article/Line-Item-Selectors) article on the Support Portal. \n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal." x-stoplight: id: ed2d43a0eb4b2 requestBody: content: application/json: schema: $ref: '#/components/schemas/lis_data_input' examples: Example: value: data: - name: Test LIS external_id: EXTERNAL_ID_GOES_HERE filter_item_set: base_and_modifiers exclude_non_payable: true base_items: clauses: - attribute: item_name operator: like value: White Rice - attribute: item_id operator: like value: '123456' - attribute: quantity operator: like value: '1' - attribute: item_family operator: like value: '123' - attribute: item_major_group operator: like value: '123' - attribute: item_serial_number operator: like value: '1' - attribute: line_item_type operator: like value: M - attribute: item_total_amount operator: like value: '12.96' modifiers: max_discount_units: 2 processing_method: max_price clauses: - attribute: item_name operator: like value: White Rice - attribute: item_id operator: like value: '123456' - attribute: quantity operator: like value: '1' - attribute: item_family operator: like value: '123' - attribute: item_major_group operator: like value: '123' - attribute: item_serial_number operator: like value: '1' - attribute: line_item_type operator: like value: M - attribute: item_total_amount operator: like value: '12.96' description: '' tags: - Api2 patch: summary: Update Line Item Selector (LIS) operationId: patch-api2-dashboard-offers-lis responses: '200': description: OK content: application/json: schema: type: object properties: results: type: array x-stoplight: id: zow9b0t2ujqwn description: List of responses indicating if the entity is created or not items: x-stoplight: id: 2wroli21yi8t5 type: object properties: external_id: type: string x-stoplight: id: cd0mxgcg0ubg1 description: Unique ID (UUID) sent by the external system to track if a particular entity is successfully created in the Punchh system success: type: boolean x-stoplight: id: yq3bria838gmc description: 'Status of a specific entity created in the system. Possible values: true, false' errors: type: array x-stoplight: id: gsy4pbhsnrfis description: A list of error messages explaining why a specific entity was not created in the system items: x-stoplight: id: wud6bsbkmnl8w type: string examples: Example: value: results: - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] - external_id: EXTERNAL_ID_GOES_HERE success: false errors: - ERROR MESSAGE - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Authorization_2' - $ref: '#/components/parameters/Content-Type_3' description: "Allows a business to update one or more Line Item Selectors. You can bulk update a maximum of 20 line item selectors per API call. If the request input contains more than 20 LIS, only the first 20 are created, and the remaining are ignored.\n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)\n\n#### Update Rules for Filter Item Set in LIS\n\n1\\. All clauses of the defined filter item set are updated in the update request. If the filter item set is \"Only Base\", you must provide the entire set of clauses for the \"Base\" to update the LIS.\n\n2\\. If the filter item set is \"Base and Modifiers\", you can send either the base clause or the modifier clause in the update request. The LIS is updated based on the received clause.\nFor example: In the \"Base and Modifiers\" filter item set, if the user sends a request with a modifier clause, the existing modifier will be updated while the base remains in its original configuration.\n\n3\\. The same validation rules applied during LIS creation are followed. If the LIS is created with \"Only Modifiers\", you must provide both base and modifier clauses as per the system design. However, while updating, the user can send only the modifier clause or only the base clause to update the LIS definition.\n\nAn index has been added to the business_id and external_id columns because the LIS is fetched by business_id and external_id.\n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\n\nFor more information on line item selector (LIS) settings, see the [Line Item Selectors](https://support.punchh.com/s/article/Line-Item-Selectors) article on the Support Portal. \n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal." x-stoplight: id: 9c5bd52c8a10f requestBody: content: application/json: schema: $ref: '#/components/schemas/lis_data_input' examples: Example: value: data: - name: Test LIS external_id: EXTERNAL_ID_GOES_HERE filter_item_set: base_and_modifiers exclude_non_payable: true base_items: clauses: - attribute: item_name operator: like value: White Rice - attribute: item_id operator: like value: '123456' - attribute: quantity operator: like value: '1' - attribute: item_family operator: like value: '123' - attribute: item_major_group operator: like value: '123' - attribute: item_serial_number operator: like value: '1' - attribute: line_item_type operator: like value: M - attribute: item_total_amount operator: like value: '12.96' modifiers: max_discount_units: 2 processing_method: max_price clauses: - attribute: item_name operator: like value: White Rice - attribute: item_id operator: like value: '123456' - attribute: quantity operator: like value: '1' - attribute: item_family operator: like value: '123' - attribute: item_major_group operator: like value: '123' - attribute: item_serial_number operator: like value: '1' - attribute: line_item_type operator: like value: M - attribute: item_total_amount operator: like value: '12.96' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/offers/qc: get: summary: Get Qualification Criteria (QC) List tags: - Api2 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/qc_data_output' examples: Example: value: data: - name: 10% Off on Sandwich external_id: EXTERNAL_ID_GOES_HERE amount_cap: '3' percentage_of_processed_amount: '10' qc_processing_function: sum_amounts rounding_rule: ceil max_discount_units: 2 target_price: 1 effective_location: location:1234 stack_discounting: false reuse_qualifying_items: false line_item_filters: - line_item_selector: name: Test LIS external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_and_modifiers base_items: clauses: - attribute: line_item_type operator: == value: M - attribute: item_id operator: in value: '101' modifiers: clauses: - attribute: item_name operator: like value: modified processing_method: max_price max_discount_units: 12 processing_method: max_price quantity: 5 enable_menu_item_aggregator: false aggregator_grouping_attributes: item_name: false item_id: false item_major_group: false item_family: false line_item_type: false item_qualifiers: - expression_type: line_item_exists line_item_selector: name: Test LIS external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_and_modifiers base_items: clauses: - attribute: line_item_type operator: == value: M - attribute: item_id operator: in value: '101' modifiers: clauses: - attribute: item_name operator: like value: modified processing_method: max_price max_discount_units: 12 net_value: null receipt_qualifier: - attribute: total_amount operator: '>=' value: '10' meta: page: 1 per_page: 1 total_records: 10 '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' operationId: get-api2-dashboard-offers-qc parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Authorization_2' - $ref: '#/components/parameters/Content-Type_3' description: "Pulls a list of all qualification criteria (QC) available and defined at the business level. \n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\n\nQualification criteria search is on a business level, and the request can:\n* Set search limits and order by descending search\n* Filter based on name and other attributes, for example, name or recency\n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)" x-stoplight: id: 97ec083d6cf57 requestBody: content: application/json: schema: type: object properties: query: type: string x-stoplight: id: wlrsupv9spzax description: Define the search string on the qc name column page: type: integer x-stoplight: id: ods5kg0qeo99k description: Number of pages to retrieve. If the requested number exceeds the available pages, the system will retrieve up to the last valid page. If the `page` value is not provided, the default value is used. default: 1 per_page: type: integer x-stoplight: id: 1yyd4a7lja773 default: 20 description: Number of records per page. If the `per_page` value is not provided, the default value is used. The maximum `per_page` value is enforced based on the OFFERS_LIST_MAX_PER_PAGE environment variable. examples: Example: value: query: free page: 1 per_page: 20 post: summary: Create Qualification Criteria (QC) operationId: post-api2-dashboard-offers-qc responses: '200': description: OK content: application/json: schema: type: object properties: results: type: array x-stoplight: id: chw2a0ypyb9oc description: List of responses indicating if the entity is created or not items: x-stoplight: id: krv7k3bplrg8o type: object properties: external_id: type: string x-stoplight: id: 6hj948u985fjg description: Unique ID (UUID) sent by the external system to track if a particular entity is successfully created in the Punchh system success: type: boolean x-stoplight: id: mbwubmhn5zxes description: 'Status of a specific entity created in the system. Possible values: true, false' errors: type: array x-stoplight: id: tcz6brrkd8i8l description: A list of error messages explaining why a specific entity is not created in the system items: x-stoplight: id: 2g5otalh9m31j type: string warnings: type: object x-stoplight: id: yncdeywztferl description: A list of warning messages indicating potential issues found during the creation of the qualification criteria (QC). These warnings do not prevent the qualification criteria (QC) from being created but may require attention. These warnings were ignored as they did not trigger any validation errors. properties: line_item_filters: $ref: '#/components/schemas/warnings_line_item_filters' item_qualifiers: $ref: '#/components/schemas/warnings_item_qualifiers' receipt_qualifiers: $ref: '#/components/schemas/warnings_receipt_qualifiers' qualifying_expressions_operator: $ref: '#/components/schemas/warnings_qualifying_expressions_operator' item_filter_expressions_operator: $ref: '#/components/schemas/warnings_item_filter_expressions_operator' discount_evaluation_strategy: $ref: '#/components/schemas/warnings_discount_evaluation_strategy' examples: Example: value: results: - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] warnings: line_item_filters: - message: 'Required parameters missing or invalid: line_item_selector_id, processing_method' item: line_item_selector_id: '' processing_method: max quantity: 5 - message: 'Required parameters missing or invalid: line_item_selector_id' item: line_item_selector_id: invalid processing_method: max_price quantity: 5 item_qualifiers: - message: 'Required parameters missing or invalid: line_item_selector_id, expression_type' item: expression_type: '' line_item_selector_id: invalid net_value: 1 receipt_qualifiers: - message: 'Required parameters missing or invalid: attribute' item: attribute: total operator: '>=' value: '10' - message: 'Required parameter is duplicate: attribute' item: attribute: total_amount operator: in value: '1' qualifying_expressions_operator: - message: 'Required parameters missing or invalid: qualifying_expressions_operator' item: qualifying_expressions_operator: an item_filter_expressions_operator: - message: 'Required parameters missing or invalid: item_filter_expressions_operator' item: item_filter_expressions_operator: an discount_evaluation_strategy: - message: 'Required parameters missing or invalid: discount_evaluation_strategy' item: discount_evaluation_strategy: ma - external_id: EXTERNAL_ID_GOES_HERE success: false errors: - ERROR MESSAGE warnings: {} '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' description: "Allows a business to define one or more qualification criteria (QC). You can bulk create a maximum of 20 qualification criteria per API call. If the request input contains more than 20 QC, only the first 20 are created, and the remaining are ignored.\n\nQC define the rules and conditions under which offers can be redeemed. It involves various processing functions that determine how offers are applied based on specific criteria, such as customer behavior, purchase details, or transaction data. QC play a crucial role in managing complex offer logic, ensuring that only eligible transactions or actions qualify for discounts or rewards.\n\n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)\n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\n\nFor more information on QC settings, see the [Qualification Criteria](https://support.punchh.com/s/article/Qualification-Criteria) article on the Support Portal. \n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal.\n" parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Authorization_2' - $ref: '#/components/parameters/Content-Type_3' requestBody: content: application/json: schema: $ref: '#/components/schemas/qc_data_input' examples: Effective location as an array of strings: value: data: - name: 10% Off on Sandwich external_id: EXTERNAL_ID_GOES_HERE amount_cap: 3 percentage_of_processed_amount: 10 qc_processing_function: sum_amounts qualifying_expressions_operator: All item_filter_expressions_operator: Any discount_evaluation_strategy: Min rounding_rule: ceil max_discount_units: 2 unit_discount: 10 minimum_unit_rate: 0.01 target_price: 1 effective_location: - location:1234 - tag:456 stack_discounting: false reuse_qualifying_items: false line_item_filters: - line_item_selector_id: LIS_ID_GOES_HERE processing_method: max_price quantity: 5 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: min_price quantity: 3 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: exclude quantity: null enable_menu_item_aggregator: false aggregator_grouping_attributes: item_name: false item_id: false item_major_group: false item_family: false line_item_type: false item_qualifiers: - expression_type: line_item_exists line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: line_item_does_not_exist line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: net_quantity_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 2 - expression_type: net_amount_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 4 receipt_qualifiers: - attribute: total_amount operator: '>=' value: '10' - attribute: receipt_hour operator: in value: '1' - attribute: receipt_week_day operator: in value: '1' - attribute: receipt_day operator: in value: '10' - attribute: subtotal_amount operator: '>=' value: '10' - attribute: receipt_month operator: == value: '10' - attribute: receipt_year operator: == value: '2024' - attribute: revenue_code operator: in value: Online - attribute: revenue_id operator: in value: '10' - attribute: employee_id operator: in value: '10' - attribute: employee_name operator: in value: john - attribute: receipt_week operator: == value: '10' - attribute: receipt_minute operator: in value: '10' - attribute: channel operator: in value: POS - attribute: transaction_no operator: mod value: '1001' Example: value: data: - name: 10% Off on Sandwich external_id: EXTERNAL_ID_GOES_HERE amount_cap: 3 percentage_of_processed_amount: 10 qc_processing_function: sum_amounts qualifying_expressions_operator: All item_filter_expressions_operator: Any discount_evaluation_strategy: Min rounding_rule: ceil max_discount_units: 2 unit_discount: 10 minimum_unit_rate: 0.01 target_price: 1 effective_location: location:1234 stack_discounting: false reuse_qualifying_items: false line_item_filters: - line_item_selector_id: LIS_ID_GOES_HERE processing_method: max_price quantity: 5 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: min_price quantity: 3 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: exclude quantity: null enable_menu_item_aggregator: false aggregator_grouping_attributes: item_name: false item_id: false item_major_group: false item_family: false line_item_type: false item_qualifiers: - expression_type: line_item_exists line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: line_item_does_not_exist line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: net_quantity_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 2 - expression_type: net_amount_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 4 receipt_qualifiers: - attribute: total_amount operator: '>=' value: '10' - attribute: receipt_hour operator: in value: '1' - attribute: receipt_week_day operator: in value: '1' - attribute: receipt_day operator: in value: '10' - attribute: subtotal_amount operator: '>=' value: '10' - attribute: receipt_month operator: == value: '10' - attribute: receipt_year operator: == value: '2024' - attribute: revenue_code operator: in value: Online - attribute: revenue_id operator: in value: '10' - attribute: employee_id operator: in value: '10' - attribute: employee_name operator: in value: john - attribute: receipt_week operator: == value: '10' - attribute: receipt_minute operator: in value: '10' - attribute: channel operator: in value: POS - attribute: transaction_no operator: mod value: '1001' x-stoplight: id: 009524a9d88ae tags: - Api2 patch: summary: Update Qualification Criteria (QC) operationId: patch-api2-dashboard-offers-qc responses: '200': description: OK content: application/json: schema: type: object properties: results: type: array x-stoplight: id: qdraz7w495xmu description: List of responses indicating if the entity is created or not items: x-stoplight: id: qcg1975w5ouc7 type: object properties: external_id: type: string x-stoplight: id: jsrkoj3vg7ywp description: Unique ID (UUID) sent by the external system to track if a particular entity is successfully created in the Punchh system success: type: boolean x-stoplight: id: 2h5bxjsdi09ys description: 'Status of a specific entity created in the system. Possible values: true, false' errors: type: array x-stoplight: id: 2y788f3hgfwpl description: A list of error messages explaining why a specific entity was not created in the system items: x-stoplight: id: hretsetvjpu9l type: string warnings: type: object x-stoplight: id: s998z2nlkl5vq properties: line_item_filters: $ref: '#/components/schemas/warnings_line_item_filters' item_qualifiers: $ref: '#/components/schemas/warnings_item_qualifiers' receipt_qualifiers: $ref: '#/components/schemas/warnings_receipt_qualifiers' qualifying_expressions_operator: $ref: '#/components/schemas/warnings_qualifying_expressions_operator' item_filter_expressions_operator: $ref: '#/components/schemas/warnings_item_filter_expressions_operator' discount_evaluation_strategy: $ref: '#/components/schemas/warnings_discount_evaluation_strategy' examples: Example: value: results: - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] - external_id: EXTERNAL_ID_GOES_HERE success: false errors: - ERROR MESSAGE '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' description: "Allows a business to update one or more qualification criteria. The same validations as those in the [Create Qualification Criteria](/docs/dev-portal-platform-functions/009524a9d88ae-create-qualification-criteria-qc) API will apply. You can bulk update a maximum of 20 qualification criteria per API call. If the request input contains more than 20 QC, only the first 20 are created, and the remaining are ignored.\n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)\n\n### PATCH Requests: Partial Updates and Nested Object Replacements\nPATCH requests allow you to update specific parameters of a QC object without affecting others. You only need to include the parameters you want to modify. For example, you can update only the `percentage_of_processed_amount` parameter in a QC object.\n\nWhen updating a nested object (e.g., `line_item_filters`, `item_qualifiers`, `receipt_qualifiers`, `aggregator_grouping_attributes`), the entire nested object is replaced with the valid values provided in the request. Invalid values are ignored.\n\nAdditional rules when updating nested objects:\n* If all provided values are invalid, the existing values remain unchanged.\n* If an empty nested object is provided, the existing values are deleted.\n* If the nested object or any of its parameters is omitted, existing values remain unaffected.\n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\n\nFor more information on QC settings, see the [Qualification Criteria](https://support.punchh.com/s/article/Qualification-Criteria) article on the Support Portal. \n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal." parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Content-Type_3' - $ref: '#/components/parameters/Authorization_2' requestBody: content: application/json: schema: $ref: '#/components/schemas/qc_data_input' examples: Effective location as an array of strings: value: data: - name: 10% Off on Sandwich external_id: EXTERNAL_ID_GOES_HERE amount_cap: 3 percentage_of_processed_amount: 10 qc_processing_function: sum_amounts qualifying_expressions_operator: All item_filter_expressions_operator: Any discount_evaluation_strategy: Min rounding_rule: ceil max_discount_units: 2 unit_discount: 10 minimum_unit_rate: 0.01 target_price: 1 effective_location: - location:2434 - tag:736 stack_discounting: false reuse_qualifying_items: false line_item_filters: - line_item_selector_id: LIS_ID_GOES_HERE processing_method: max_price quantity: 5 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: min_price quantity: 3 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: exclude quantity: null enable_menu_item_aggregator: false aggregator_grouping_attributes: item_name: false item_id: false item_major_group: false item_family: false line_item_type: false item_qualifiers: - expression_type: line_item_exists line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: line_item_does_not_exist line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: net_quantity_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 2 - expression_type: net_amount_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 4 receipt_qualifiers: - attribute: total_amount operator: '>=' value: '10' - attribute: receipt_hour operator: in value: '1' - attribute: receipt_week_day operator: in value: '1' - attribute: receipt_day operator: in value: '10' - attribute: subtotal_amount operator: '>=' value: '10' - attribute: receipt_month operator: == value: '10' - attribute: receipt_year operator: == value: '2024' - attribute: revenue_code operator: in value: Online - attribute: revenue_id operator: in value: '10' - attribute: employee_id operator: in value: '10' - attribute: employee_name operator: in value: john - attribute: receipt_week operator: == value: '10' - attribute: receipt_minute operator: in value: '10' - attribute: channel operator: in value: POS - attribute: transaction_no operator: mod value: '1001' Example: value: data: - name: 10% Off on Sandwich external_id: EXTERNAL_ID_GOES_HERE amount_cap: 3 percentage_of_processed_amount: 10 qc_processing_function: sum_amounts qualifying_expressions_operator: All item_filter_expressions_operator: Any discount_evaluation_strategy: Min rounding_rule: ceil max_discount_units: 2 unit_discount: 10 minimum_unit_rate: 0.01 target_price: 1 effective_location: location:1234 stack_discounting: false reuse_qualifying_items: false line_item_filters: - line_item_selector_id: LIS_ID_GOES_HERE processing_method: max_price quantity: 5 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: min_price quantity: 3 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: exclude quantity: null enable_menu_item_aggregator: false aggregator_grouping_attributes: item_name: false item_id: false item_major_group: false item_family: false line_item_type: false item_qualifiers: - expression_type: line_item_exists line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: line_item_does_not_exist line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: net_quantity_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 2 - expression_type: net_amount_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 4 receipt_qualifiers: - attribute: total_amount operator: '>=' value: '10' - attribute: receipt_hour operator: in value: '1' - attribute: receipt_week_day operator: in value: '1' - attribute: receipt_day operator: in value: '10' - attribute: subtotal_amount operator: '>=' value: '10' - attribute: receipt_month operator: == value: '10' - attribute: receipt_year operator: == value: '2024' - attribute: revenue_code operator: in value: Online - attribute: revenue_id operator: in value: '10' - attribute: employee_id operator: in value: '10' - attribute: employee_name operator: in value: john - attribute: receipt_week operator: == value: '10' - attribute: receipt_minute operator: in value: '10' - attribute: channel operator: in value: POS - attribute: transaction_no operator: mod value: '1001' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/offers/redeemable: get: summary: Get Redeemable List tags: - Api2 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/redeemable_data_output' examples: Example: value: meta: page: 1 per_page: 20 total_records: 171 data: - name: Redeemable offer 51 image: IMAGE_URL_GOES_HERE allow_for_support_gifting: true available_as_template: false auto_applicable: true start_time: null expiry_days: null segment_definition_id: null end_time: '2024-08-29T23:59:59Z' timezone: Australia/Darwin remind_before: 3 discount_channel: all points: 12 activate_now: true applicable_as_loyalty_redemption: false expire_redemption_code_with_reward_end_date: false template: redemption_message: 'true' short_prompt: 'true' standard_prompt: 'true' effective_location: null lag_duration: value: 2 units: days recurrence_schedule: occurrences: 10 days_distance: 2 meta_data: meta data here distributable: true alternate_locale_name: - language: es translation: redeemable name in ES language - language: fr translation: null - language: ro translation: null alternate_locale_description: - language: es translation: description in ES language - language: fr translation: null - language: ro translation: desc ro external_id: EXTERNAL_ID_GOES_HERE indefinetely: false redemption_code_expiry_mins: 4 distributable_to_all_users: true receipt_rule: qualifier_type: new discount_amount: null redeeming_criterion_id: 2999f340-26ec-4391-8256-dba634f5ec37 redeeming_criterion: name: Redeemable offer 50-Qualifier external_id: EXTERNAL_ID_GOES_HERE amount_cap: 3 rounding_rule: floor max_discount_units: 2 target_price: 1 effective_location: location:385421 stack_discounting: false reuse_qualifying_items: false enable_menu_item_aggregator: false minimum_unit_rate: 0.01 unit_discount: 10 receipt_qualifiers: - attribute: amount operator: in value: '1' - attribute: receipt_day operator: in value: '10' - attribute: subtotal_amount operator: '>=' value: '10' - attribute: receipt_month operator: == value: '10' - attribute: receipt_year operator: == value: '2024' - attribute: revenue_code operator: in value: Online - attribute: revenue_id operator: in value: '10' - attribute: employee_id operator: in value: '10' - attribute: employee_name operator: in value: john - attribute: receipt_week operator: == value: '10' - attribute: receipt_min operator: in value: '10' - attribute: channel operator: in value: POS - attribute: transaction_no operator: mod value: '1001' percentage_of_processed_amount: 10 qc_processing_function: rate_rollback line_item_filters: - quantity: null processing_method: max_price line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] - quantity: 1 processing_method: '' line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] - quantity: 5 processing_method: max_price line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] - quantity: 5 processing_method: min_price line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] - quantity: 5 processing_method: min_price line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] item_qualifiers: - expression_type: net_quantity_greater_than_or_equal_to net_value: 1 line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] - expression_type: net_quantity_greater_than_or_equal_to net_value: 1 line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] - expression_type: net_quantity_greater_than_or_equal_to net_value: 1 line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] - expression_type: net_quantity_greater_than_or_equal_to net_value: 1 line_item_selector: name: Pizzaa external_id: EXTERNAL_ID_GOES_HERE exclude_non_payable: false filter_item_set: base_only base_items: clauses: - attribute: item_id operator: == value: '219' modifiers: processing_method: '' max_discount_units: null clauses: [] aggregator_grouping_attributes: item_name: true item_id: false item_major_group: false item_family: false line_item_type: false '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '422': description: Unprocessable Entity - Invalid redeemable UUID content: application/json: schema: type: object properties: {} operationId: get-api2-dashboard-offers-redeemable description: "Pulls a list of all redeemables available and defined at the business level. \n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\n\nRedeemable search is on a business level, and the request can:\n\n* Set search limits and order by descending search\n* Filter based on name and description\n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)" parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Content-Type_3' - $ref: '#/components/parameters/Authorization_2' x-stoplight: id: 89ced15e862a4 requestBody: content: application/json: schema: type: object properties: query: type: string x-stoplight: id: s6l6sdjdb4yd6 description: Define the search string on the redeemable name column page: type: integer x-stoplight: id: ioz1moj7a61jc description: Number of pages to retrieve. If the requested number exceeds the available pages, the system will retrieve up to the last valid page. If the `page` value is not provided, the default value is used. default: 1 per_page: type: integer x-stoplight: id: t6184wmxubd8b description: Number of records per page. If the `per_page` value is not provided, the default value is used. The maximum `per_page` value is enforced based on the OFFERS_LIST_MAX_PER_PAGE environment variable. default: 20 examples: Example: value: query: free page: 1 per_page: 20 description: '' post: summary: Create Redeemable operationId: post-api2-dashboard-offers-redeemable responses: '200': description: OK content: application/json: schema: type: object properties: results: type: array x-stoplight: id: zce920cfi6rf7 description: List of responses indicating if the entity is created or not items: x-stoplight: id: h0zz0r30ilg0m type: object properties: external_id: type: string x-stoplight: id: n58wru3di7ej9 description: Unique ID (UUID) sent by the external system to track if a particular entity is successfully created in the Punchh system success: type: boolean x-stoplight: id: jekerhke4uljm description: 'Status of a specific entity created in the system. Possible values: true, false' errors: type: array x-stoplight: id: wtmvgc531x9fq description: A list of error messages explaining why a specific entity is not created in the system items: x-stoplight: id: n4musy464awyw type: string warnings: type: object x-stoplight: id: 8gdaxji90tjmr description: A list of warning messages indicating potential issues found during the creation of the redeemable. These warnings do not prevent the redeemable from being created but may require attention. These warnings were ignored as they did not trigger any validation errors. properties: receipt_rule: type: object x-stoplight: id: qk4fgmxj9xliv description: List of warnings that are ignored due to validation errors for `receipt_rule` properties: redeeming_criterion: type: object x-stoplight: id: vzwch5h94yrfj description: List of warnings that are ignored due to validation errors for `redeeming_criterion` properties: line_item_filters: $ref: '#/components/schemas/warnings_line_item_filters' item_qualifiers: $ref: '#/components/schemas/warnings_item_qualifiers' receipt_qualifiers: $ref: '#/components/schemas/warnings_receipt_qualifiers' qualifying_expressions_operator: $ref: '#/components/schemas/warnings_qualifying_expressions_operator' item_filter_expressions_operator: $ref: '#/components/schemas/warnings_item_filter_expressions_operator' discount_evaluation_strategy: $ref: '#/components/schemas/warnings_discount_evaluation_strategy' examples: Example: value: results: - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] warnings: line_item_filters: - message: 'Required parameters missing or invalid: line_item_selector_id, processing_method' item: line_item_selector_id: '' processing_method: max quantity: 5 - message: 'Required parameters missing or invalid: line_item_selector_id' item: line_item_selector_id: invalid processing_method: max_price quantity: 5 item_qualifiers: - message: 'Required parameters missing or invalid: line_item_selector_id, expression_type' item: expression_type: '' line_item_selector_id: invalid net_value: 1 receipt_qualifiers: - message: 'Required parameters missing or invalid: attribute' item: attribute: total operator: '>=' value: '10' - message: 'Required parameter is duplicate: attribute' item: attribute: total_amount operator: in value: '1' qualifying_expressions_operator: - message: 'Required parameters missing or invalid: qualifying_expressions_operator' item: qualifying_expressions_operator: an item_filter_expressions_operator: - message: 'Required parameters missing or invalid: item_filter_expressions_operator' item: item_filter_expressions_operator: an discount_evaluation_strategy: - message: 'Required parameters missing or invalid: discount_evaluation_strategy' item: discount_evaluation_strategy: ma - external_id: EXTERNAL_ID_GOES_HERE success: false errors: - ERROR MESSAGE warnings: {} '400': description: Bad Request - Required parameter missing or empty content: application/json: schema: type: object properties: error: type: string x-stoplight: id: ko7iaimkvggfc examples: Required parameter missing or empty: value: error: 'Required parameter missing or the value is empty: data' '401': description: Unauthorized - User not authenticated or created content: application/json: schema: type: object properties: error: type: string x-stoplight: id: 1mfimwme208rn examples: User not authenticated or created: value: error: You need to sign in or sign up before continuing. '403': description: Forbidden - Functionality not available content: application/json: schema: type: object properties: error: type: string x-stoplight: id: ls57gx4l2nog9 examples: Functionality Not Available: value: error: Sorry, this functionality is not available. Please contact support@punchh.com to enable this. '422': description: Unprocessable Entity - Invalid redeemable uuid content: application/json: schema: type: object properties: {} description: "Allows a business to define one or more redeemables. You can bulk create a maximum of 20 redeemables per API call. If the request input contains more than 20 redeemables, only the first 20 are created, and the remaining are ignored. \n\nFor more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management)\n\nTo call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.\n\n\nFor more information on redeemable settings, see the [Redeemables](https://support.punchh.com/s/article/Redeemables) article on the Support Portal. \n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal.\n" parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Content-Type_3' - $ref: '#/components/parameters/Authorization_2' requestBody: content: application/json: schema: $ref: '#/components/schemas/redeemable_data_input' examples: Example: value: data: - name: Redeemable offer 30 alternate_locale_name: - language: fr translation: FR MarlOffer 0.25 - language: en translation: MarlOffer 0.25 - language: es translation: ES MarlOffer 0.25 external_id: EXTERNAL_ID_GOES_HERE description: description alternate_locale_description: - language: fr translation: FR $0.25 Marl sContent Delivery Loyalty Offer - language: en translation: $0.25 Marl sContent Delivery Loyalty Offer - language: es translation: ES $0.25 Marl sContent Delivery Loyalty Offer note: Notes here allow_for_support_gifting: true available_as_template: false distributable: true distributable_to_all_users: false segment_definition_id: null auto_applicable: true receipt_rule: qualifier_type: new redeeming_criterion_id: null discount_amount: 10 redeeming_criterion: name: 10% Off on Sandwich external_id: EXTERNAL_ID_GOES_HERE amount_cap: 3 percentage_of_processed_amount: 10 qc_processing_function: sum_amounts rounding_rule: ceil max_discount_units: 2 unit_discount: 10 minimum_unit_rate: 0.01 target_price: 1 effective_location: location:1234 stack_discounting: false reuse_qualifying_items: false qualifying_expressions_operator: All item_filter_expressions_operator: Any discount_evaluation_strategy: Min line_item_filters: - line_item_selector_id: LIS_ID_GOES_HERE processing_method: max_price quantity: 5 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: min_price quantity: 3 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: exclude quantity: null enable_menu_item_aggregator: false aggregator_grouping_attributes: item_name: false item_id: false item_major_group: false item_family: false line_item_type: false item_qualifiers: - expression_type: line_item_exists line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: line_item_does_not_exist line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: net_quantity_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 2 - expression_type: net_amount_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 4 receipt_qualifiers: - attribute: total_amount operator: '>=' value: '10' - attribute: receipt_hour operator: in value: '1' activate_now: false start_time: '2025-06-25T23:59:59' indefinetely: false expiry_days: null end_time: '2025-06-28T23:59:59' timezone: Australia/Darwin remind_before: 3 discount_channel: all points: 12 redemption_code_expiry_mins: 3 applicable_as_loyalty_redemption: true expire_redemption_code_with_reward_end_date: false template: redemption_message: Countdown Message text short_prompt: Short Prompt text standard_prompt: Standard Prompt text lag_duration: value: 2 units: days recurrence_schedule: occurrences: 10 days_distance: 2 effective_location: location:12 meta_data: meta data x-stoplight: value: id: 4764c9052bca9 tags: - Api2 patch: summary: Update Redeemable operationId: patch-api2-dashboard-offers-redeemable responses: '200': description: OK - Success content: application/json: schema: $ref: '#/components/schemas/redeemable_results' examples: Example: value: results: - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] warnings: {} - external_id: EXTERNAL_ID_GOES_HERE success: false errors: - ERROR MESSAGE warnings: {} - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] warnings: receipt_rule: redeeming_criterion: line_item_filters: - message: 'Required parameters missing or invalid: line_item_selector_id' item: line_item_selector_id: LIS_ID_GOES_HERE processing_method: min_price quantity: 1 item_qualifiers: - message: 'Required parameters missing or invalid: net_value' item: expression_type: net_quantity_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: -1 receipt_qualifiers: - message: 'Required parameters missing or invalid: attribute' item: attribute: total operator: '>=' value: '10' qualifying_expressions_operator: - message: 'Required parameters missing or invalid: qualifying_expressions_operator' item: qualifying_expressions_operator: an item_filter_expressions_operator: - message: 'Required parameters missing or invalid: item_filter_expressions_operator' item: item_filter_expressions_operator: an discount_evaluation_strategy: - message: 'Required parameters missing or invalid: discount_evaluation_strategy' item: discount_evaluation_strategy: ma '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' description: 'Allows a business to update one or more redeemables. You can bulk update a maximum of 20 redeemables per API call. If the request input contains more than 20 redeemables, only the first 20 are created, and the remaining are ignored. For more information, see [Offers Ingestion Management](/docs/dev-portal-platform-functions/ms8qid5tdtvc6-offers-ingestion-management) ### PATCH Requests: Partial Updates and Nested Object Replacements PATCH requests allow you to update specific parameters of a Redeemable object without affecting others. You only need to include the parameters you want to modify. For example, you can update only the `allow_for_support_gifting` parameter in a Redeemable object. When updating a nested object (e.g., `receipt_rule`, `template`, `lag_duration`, `recurrence_schedule`), the entire nested object is replaced with the valid values provided in the request. Invalid values are ignored. Additional rules when updating nested objects: * If all provided values are invalid, the existing values remain unchanged. * If an empty nested object is provided, the existing values are deleted. * If the nested object or any of its parameters is omitted, existing values remain unaffected. To call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration. For more information on Redeemable settings, see the [Redeemables](https://support.punchh.com/s/article/Redeemables) article on the Support Portal. Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal.' parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Authorization_2' - $ref: '#/components/parameters/Content-Type_3' requestBody: content: application/json: schema: $ref: '#/components/schemas/redeemable_data_input' examples: Example: value: data: - name: Redeemable offer 30 alternate_locale_name: - language: fr translation: FR MarlOffer 0.25 - language: en translation: MarlOffer 0.25 - language: es translation: ES MarlOffer 0.25 external_id: EXTERNAL_ID_GOES_HERE description: description alternate_locale_description: - language: fr translation: FR $0.25 Marl sContent Delivery Loyalty Offer - language: en translation: $0.25 Marl sContent Delivery Loyalty Offer - language: es translation: ES $0.25 Marl sContent Delivery Loyalty Offer note: Notes here allow_for_support_gifting: true available_as_template: false distributable: true distributable_to_all_users: false segment_definition_id: null auto_applicable: true receipt_rule: qualifier_type: new redeeming_criterion_id: REDEEMING_CRITERION_ID_GOES_HERE discount_amount: 10 redeeming_criterion: name: 10% Off on Sandwich external_id: EXTERNAL_ID_GOES_HERE amount_cap: 3 percentage_of_processed_amount: 10 qc_processing_function: sum_amounts rounding_rule: ceil max_discount_units: 2 unit_discount: 10 minimum_unit_rate: 0.01 target_price: 1 effective_location: location:1234 stack_discounting: false reuse_qualifying_items: false qualifying_expressions_operator: All item_filter_expressions_operator: Any discount_evaluation_strategy: Min line_item_filters: - line_item_selector_id: LIS_ID_GOES_HERE processing_method: max_price quantity: 5 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: min_price quantity: 3 - line_item_selector_id: LIS_ID_GOES_HERE processing_method: exclude quantity: null enable_menu_item_aggregator: false aggregator_grouping_attributes: item_name: false item_id: false item_major_group: false item_family: false line_item_type: false item_qualifiers: - expression_type: line_item_exists line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: line_item_does_not_exist line_item_selector_id: LIS_ID_GOES_HERE net_value: null - expression_type: net_quantity_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 2 - expression_type: net_amount_greater_than_or_equal_to line_item_selector_id: LIS_ID_GOES_HERE net_value: 4 receipt_qualifiers: - attribute: total_amount operator: '>=' value: '10' - attribute: receipt_hour operator: in value: '1' activate_now: false start_time: '2025-06-25T23:59:59' indefinetely: false expiry_days: null end_time: '2025-06-28T23:59:59' timezone: Australia/Darwin remind_before: 3 discount_channel: all points: 12 redemption_code_expiry_mins: 3 applicable_as_loyalty_redemption: true expire_redemption_code_with_reward_end_date: false template: redemption_message: Countdown Message text short_prompt: Short Prompt text standard_prompt: Standard Prompt text lag_duration: value: 2 units: days recurrence_schedule: occurrences: 10 days_distance: 2 effective_location: location:12 meta_data: meta data tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/offers/upload_redeemable_image: post: summary: Upload Redeemable Image operationId: post-api2-dashboard-offers-upload_redeemable_image responses: '200': description: OK content: application/json: schema: type: object properties: results: type: array x-stoplight: id: putsbxqg4ptss description: List of responses indicating if the entity is created or not items: x-stoplight: id: s45p69ln4448a type: object properties: external_id: type: string x-stoplight: id: yd92ld4889ugs description: Unique ID (UUID) sent by the external system to track if a particular entity is successfully updated in the Punchh system success: type: boolean x-stoplight: id: q4isrvdfagig3 description: 'Indicates whether the image was successfully uploaded to the system. Possible values: true, false' errors: type: array x-stoplight: id: i9z5jyx51g3ts description: A list of error messages providing details about why the image upload failed items: x-stoplight: id: ocpy2sxjh6and type: string examples: Example: value: results: - external_id: EXTERNAL_ID_GOES_HERE success: true errors: [] '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' parameters: - $ref: '#/components/parameters/Accept_3' - $ref: '#/components/parameters/Authorization_2' - $ref: '#/components/parameters/Content-Type_3' description: Allows a business to upload images for redeemables in bulk by first uploading them to a server or network and then providing the image URL in the API request. The maximum allowed image size is 500 KB. x-stoplight: id: 66bf308f1c51f requestBody: content: application/json: schema: type: object properties: data: type: array x-stoplight: id: vnmoxq6vk906k description: A list of image URLs that need to be uploaded items: x-stoplight: id: 9l4ppyo3wv13g type: object properties: external_id: type: string x-stoplight: id: y8dvinmpkjaf8 description: A unique external identifier (UUID) of the redeemable. See [Create Redeemable](/docs/dev-portal-platform-functions/4764c9052bca9-create-redeemable) image_url: type: string x-stoplight: id: 8sh8hxncdjat4 description: A valid URL pointing to the image hosted on a Content Delivery Network (CDN) or server required: - external_id - image_url examples: Example: value: data: - external_id: EXTERNAL_ID_GOES_HERE image_url: https://www.example.com/image.jpg description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/subscriptions/purchase: post: summary: Purchase Subscription operationId: post-api2-dashboard-subscriptions-purchase responses: '201': description: Created content: application/json: schema: type: object x-examples: example-1: subscription_id: 1234 start_time: '2021-05-18 11:34:46' end_time: '2021-05-28 11:34:46' external_plan_identifier: EXTERNAL_PLAN_IDENTIFIER_GOES_HERE location_id: 12345 properties: subscription_id: type: integer format: int64 description: System-generated unique ID of the subscription that is issued for a guest examples: - 123 start_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) from which the subscription plan purchased for the guest will become active examples: - '2021-05-18 11:34:46' end_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) until the subscription plan purchased for the guest will remain active examples: - '2021-05-28 11:34:46' external_plan_identifier: type: string description: 'UPC/SKU of the subscription plan as present on third-party applications of enterprise businesses and is configured on this subscription plan. This will be stored in the database, and the business can use it for analytics purposes. ' location_id: type: integer x-stoplight: id: 2y9gerkqfxe32 description: ID of a valid Punchh location where the subscription plan is purchased. It identifies the origin of the subscription purchase for the loyalty guest. If an invalid or missing location_id is passed, the API returns a 400 Bad Request error with the message "Invalid or missing location_id". required: - subscription_id - start_time - end_time '400': description: Bad Request - Invalid or missing location_id content: application/json: schema: type: object properties: error: type: string x-stoplight: id: azkv213niqwq4 examples: Invalid or missing location_id: value: error: Invalid or missing location_id '401': description: Unauthorized content: application/json: schema: description: '' type: object x-examples: example-1: error: You need to sign in or sign up before continuing. properties: error: type: string minLength: 1 examples: - You need to sign in or sign up before continuing. required: - error examples: example: value: error: You need to sign in or sign up before continuing. '406': description: Not Acceptable content: application/json: schema: description: '' type: object x-examples: example-1: invalid: Subscription cannot be renewed. properties: invalid: type: string minLength: 1 examples: - Subscription cannot be renewed. examples: Invalid User Subscription: value: invalid_subscription: Invalid User Subscription. '422': description: Unprocessable Entity content: application/json: schema: description: '' type: object x-examples: example-1: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. properties: errors: type: object properties: disabled_feature: type: string minLength: 1 examples: - Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. examples: Subscriptions is not enabled: value: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. Invalid Plan Id: value: errors: base: - Invalid Plan ID Auto renewal is set as true for a single use subscription: value: errors: base: - This is a single use subscription and cannot be renewed automatically. Please check request to send 'auto_renewal' as 'false'. Plan not active: value: errors: base: - Plan is not active. Plan Expired: value: errors: base: - Plan has expired. Plan is not available for purchase: value: errors: base: - Plan is not available for purchase. Start time is blank: value: errors: start_time: - Start time can't be blank End Time is Blank: value: errors: end_time: - End time can't be blank Invalid Price: value: errors: price: - Price is not a number Recurring payments option is disabled: value: errors: recurring_payment_off_for_adapter: - Payment Service not available. parameters: - schema: type: string in: header name: Content-Type description: application/json required: true - schema: type: string in: header name: Accept description: application/json required: true - schema: type: string in: header name: Authorization description: Bearer token for admin authorization, who is making a call on behalf of the customer required: true description: 'This API allows third-party platforms (e.g., middleware that interfaces with the mobile app of the business) to purchase a new subscription plan in the Punchh platform without the need for guests to be logged in to the Punchh platform. If a business is migrating active subscriptions from an incumbent system to the Punchh platform, the subscription ID for each user in the incumbent system can be mapped to the corresponding subscription ID in the Punchh platform. If the Single Use setting is enabled for the subscription plan, and if you send auto_renewal as `true` in the Purchase Subscription API, then the API returns an error: This is a single use subscription and cannot be renewed automatically. Please check the request to send auto_renewal as false.' x-stoplight: id: 31a7819307f07 requestBody: content: application/json: schema: type: object properties: user_id: type: integer format: int64 description: 'System-generated unique ID of a guest created on the Punchh platform ' examples: - 1234 start_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) from which the subscription being issued will become active examples: - '2021-05-18 11:34:46' plan_id: type: integer format: int64 description: System-generated unique ID of a subscription plan created in the Punchh platform. A subscription based on this plan ID will be issued to the guest when a purchase call is made. examples: - 12 end_time: type: string minLength: 1 format: date-time description: 'Date and time (in ISO 8601 format) until which the subscription being issued will remain active ' examples: - '2021-05-28 11:34:46' purchase_price: type: number description: Price charged to the user for purchasing the subscription plan format: float examples: - 20 auto_renewal: type: boolean default: false description: A guest’s preference of having a newly purchased subscription plan get automatically renewed per the plan's schedule. Third parties where auto renewal is considered default should send this value as "true". migration: type: boolean default: false description: This key determines if a particular purchase call should be considered as a fresh purchase or the migration of an existing subscription from the incumbent system to the Punchh platform. A value of "true" indicates that this purchase is a migration, and value of "false" indicates that this is a fresh purchase. lifetime_debits: type: number format: float description: Total discounted units under this plan ID, issued in the incumbent system before the guest migrated over to Punchh. This value should be sent only once at the time of making the purchase call for migration. This is relevant only if the value of the "migration" parameter is "true". examples: - 30 lifetime_savings: type: number format: float description: Total volume of savings under this plan ID, issued in the incumbent system before the guest migrated over to Punchh. This value should be sent only once at the time of making the purchase call for migration. This is relevant only if the value of the "migration" parameter is "true". examples: - 50 initial_debits: type: number format: float description: Number of discounted units for the migrated subscription. Based on this value, further discounting of units will be done in the Punchh system after the guest migrates. This value should not be included in lifetime_debits and should be sent only once at the time of making the purchase call for migration. This is relevant only if the value of the "migration" parameter is "true". examples: - 10 initial_savings: type: number format: float description: 'Volume of savings for the migrated subscription. Further savings in the Punchh platform will be added to this. This value should not be included in lifetime_savings and should be sent only once at the time of making the purchase call for migration. This is relevant only if the value of the "migration" parameter is "true". ' examples: - 20 source_subscription_id: type: integer description: This key should be sent if the purchase call is being made because a guest decides to change the subscription plan. In all other cases, this key should be sent as null. format: int64 examples: - 'null' location_id: type: integer x-stoplight: id: pfyeucrbvxgv2 description: ID of the location where the subscription plan is purchased. It identifies the origin of the subscription purchase for the loyalty guest. If an invalid or missing location_id is passed, the API returns a 400 Bad Request error with the message "Invalid or missing location_id". required: - user_id - start_time - plan_id - end_time - purchase_price - auto_renewal - location_id examples: Request: value: user_id: 1234 start_time: '2021-05-18 11:34:46' plan_id: 12 end_time: '2021-05-28 11:34:46' purchase_price: 20 auto_renewal: false migration: false lifetime_debits: 30 lifetime_savings: 50 initial_debits: 10 initial_savings: 20 source_subscription_id: 'null' location_id: 12345 description: '' tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/subscriptions/renew: parameters: [] post: summary: Renew Subscription operationId: post-api2-dashboard-subscription responses: '200': description: OK content: application/json: schema: type: object x-examples: example-1: subscription_id: 40 start_time: '2021-04-20T21:09:38Z' end_time: '2021-04-20T21:09:38Z' properties: subscription_id: type: integer description: System-generated unique ID of the subscription that is issued for a guest examples: - 40 start_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) from which the renewed subscription will become active examples: - '2021-04-20T21:09:38Z' end_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) from until which the renewed subscription will remain active examples: - '2021-04-20T21:09:38Z' external_plan_identifier: type: string description: 'UPC/SKU of the subscription plan as present on third-party applications of enterprise businesses and is configured on this subscription plan. This will be stored in the database, and the business can use it for analytics purposes. ' required: - subscription_id - start_time - end_time examples: example: value: subscription_id: 40 start_time: '2021-04-20T21:09:38Z' end_time: '2021-04-20T21:09:38Z' '401': description: Unauthorized content: application/json: schema: description: '' type: object x-examples: example-1: error: You need to sign in or sign up before continuing. properties: error: type: string minLength: 1 examples: - You need to sign in or sign up before continuing. required: - error examples: example: value: error: You need to sign in or sign up before continuing. '406': description: Not Acceptable content: application/json: schema: description: '' type: object x-examples: example-1: invalid: Subscription cannot be renewed. properties: invalid: type: string minLength: 1 examples: - Subscription cannot be renewed. examples: Invalid User Subscription: value: invalid_subscription: Invalid User Subscription. Subscription is not of auto renewal type: value: invalid_subscription: Subscription cannot be renewed. '422': description: Unprocessable Entity content: application/json: schema: description: '' type: object x-examples: example-1: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. properties: errors: type: object properties: disabled_feature: type: string minLength: 1 examples: - Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. examples: Subscriptions is not enabled: value: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. Invalid Plan Id: value: errors: base: - Invalid Plan ID Plan not active: value: errors: base: - Plan is not active. Plan Expired: value: errors: base: - Plan has expired. Plan is not available for purchase: value: errors: base: - Plan is not available for purchase. Start time is blank: value: errors: start_time: - Start time can't be blank End Time is Blank: value: errors: end_time: - End time can't be blank Invalid Price: value: errors: price: - Price is not a number description: This API allows the business to renew subscriptions by making back-end calls on the designated date of renewal registered on the business end. parameters: - schema: type: string default: application/json in: header name: Content-Type description: application/json required: true - schema: type: string default: application/json in: header name: Accept description: application/json required: true - schema: type: string in: header name: Authorization description: Bearer token for admin authorization, who is making a call on behalf of the customer required: true x-stoplight: id: 69ba7735654cb requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: subscription_id: '35' start_time: '2021-04-20T21:09:38Z' end_time: '2021-05-20T21:09:38Z' purchase_price: '23.09' properties: subscription_id: type: integer description: Unique ID of the subscription plan that was issued to the guest and is being renewed examples: - 38 start_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) from which the renewed subscription will become active examples: - '2021-04-20T21:09:38Z' end_time: type: string minLength: 1 format: date-time description: Date and time (in ISO 8601 format) until which the renewed subscription will remain active examples: - '2021-04-20T21:09:38Z' purchase_price: type: number format: float description: Cost of renewal of one unit of the subscription plan that is being renewed examples: - 23.98 new_plan_id: type: integer description: This is sent only if the guest wants to switch to a different subscription plan (e.g., changing from a monthly plan to a quarterly plan) examples: - 24 required: - subscription_id - start_time - end_time - purchase_price examples: example: value: subscription_id: 38 start_time: '2021-04-20T21:09:38Z' end_time: '2021-04-20T21:09:38Z' purchase_price: 23.98 tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com /api2/dashboard/subscriptions/cancel: patch: summary: Cancel Subscription (Turn off Auto Renewal) operationId: patch-api2-dashboard-subscriptions-cancel responses: '200': description: OK content: application/json: schema: type: array minItems: 1 uniqueItems: true x-examples: example-1: - Subscription auto renewal cancelled. description: Cancellation response from the server. items: type: string examples: - Subscription auto renewal cancelled. examples: 200 Ok: value: - Subscription auto renewal cancelled. '401': description: Unauthorized content: application/json: schema: description: '' type: object x-examples: example-1: error: You need to sign in or sign up before continuing. properties: error: type: string minLength: 1 examples: - You need to sign in or sign up before continuing. required: - error examples: example: value: error: You need to sign in or sign up before continuing. '406': description: Not Acceptable content: application/json: schema: description: '' type: object x-examples: example-1: invalid: Subscription cannot be renewed. properties: invalid: type: string minLength: 1 examples: - Subscription cannot be renewed. examples: Invalid User Subscription: value: invalid_subscription: Invalid User Subscription. '422': description: Unprocessable Entity content: application/json: schema: description: '' type: object x-examples: example-1: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. properties: errors: type: object properties: disabled_feature: type: string minLength: 1 examples: - Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. examples: Subscriptions is not enabled: value: errors: disabled_feature: Your current loyalty program configuration does not support this feature. Please connect with your Customer Success representative for resolution of the issue. Plan not active: value: errors: base: - Plan is not active. description: This API can be used to cancel an active subscripition. parameters: - schema: type: string default: application/json in: header name: Content-Type description: application/json required: true - schema: type: string default: application/json in: header name: Accept description: application/json required: true - schema: type: string in: header name: Authorization description: Bearer token for admin authorization, who is making a call on behalf of the customer x-stoplight: id: 2d76036913613 requestBody: content: application/json: schema: type: object x-examples: example-1: subscription_id: '126' cancellation_reason: Do not like your service cancellation_type: hard_cancelled properties: subscription_id: type: integer format: int64 description: Punchh-generated unique ID of the subscription that needs to be cancelled examples: - 123 cancellation_reason: type: string minLength: 1 description: Reason provided by the admin at the time of cancellation examples: - Guest does not need service any more. cancellation_type: type: string minLength: 1 enum: - hard_cancelled - soft_cancelled description: 'Type of cancellation -- either "hard_cancelled" or "soft_cancelled". If “soft_cancelled”, end users can enjoy the benefits until the “end_time” of the subscription. If “hard_cancelled”, subscription benefits are terminated immediately. ' examples: - hard_cancelled required: - subscription_id - cancellation_reason - cancellation_type examples: Example Request: value: subscription_id: '126' cancellation_reason: Do not like your service cancellation_type: hard_cancelled tags: - Api2 servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com components: parameters: Accept-Language: schema: type: string default: en name: Accept-Language in: header description: Preferred language signature: schema: type: string default: '{{$$.env.signature}}' name: x-pch-digest in: header description: The [signature](/docs/dev-portal-mobile/additional-topics/signature-sha256) for the API call required: true User-Agent: schema: type: string default: AppIdentifier/VersionNumber/BuildNumber(OS_Type) name: User-Agent in: header required: true description: Used to Identify the software, device, and application initiating the request, providing information about the client to the server. For details, see [User Agent](/docs/dev-portal-mobile/additional-topics/user-agent). Content-Type: schema: type: string default: application/json name: Content-Type in: header description: Set this header to application/json. required: true Accept: schema: type: string default: application/json name: Accept in: header description: Advertises which content types the client is able to understand required: true Authorization: schema: type: string default: Bearer ACCESS_TOKEN_GOES_HERE name: Authorization in: header description: Used to authorize the request with access_token. It should be supplied as `Bearer ACCESS_TOKEN_GOES_HERE`. required: true punchh-app-device-id: schema: type: string default: APP_DEVICE_ID_GOES_HERE name: punchh-app-device-id in: header required: true description: The app device ID helps Punchh identify each device so that certain rewards can be awarded individually to each device instead of per user. For example, the sign-up reward is given to each device ID to prevent fraudulent sign-ups so that a user cannot do repeated sign-ups from a single device to get rewards. It should not change even if the user resets a device. See the [sample code](/docs/dev-portal-mobile/56657769b1422-headers-and-caching#generating-the-punchh-app-device-id-header) to generate the punchh-app-device-id header. accept_language: schema: type: string default: en in: header name: Accept-Language description: '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.' Accept-Timezone: schema: type: string default: Etc/UTC name: Accept-Timezone in: header required: false description: Used to indicate the time zone in which you would like the date and time information in the response to be formatted Accept-Language_2: schema: type: string default: en name: Accept-Language in: header required: false description: 'Preferred language. Punchh supports multiple languages for the subscription plan `name`, `description`, and `miscellaneous` parameters 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. Administrators have to configure Name, Description, and Miscellaneous fields in the relevant language(s) on the subscription plan in the Punchh platform under Wallet and Passes > Subscription Plans. If these fields are not configured in Punchh in the language specified in the Accept-Language request header, then the API response will include the subscription plan `name`, `description`, and `miscellaneous` parameters with empty values. ' User-Agent_2: schema: type: string default: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version) name: User-Agent in: header required: true description: Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see [User Agent](/docs/dev-portal-mobile/additional-topics/user-agent). Content-Type_2: schema: type: string default: application/json name: Content-Type in: header required: true description: Set this header to application/json Accept-Language-2: schema: type: string default: en name: Accept-Language in: header required: false description: Preferred language Accept_2: schema: type: string default: application/json name: Accept in: header required: true description: Advertises which content types the client can understand x-pch-digest: schema: type: string name: x-pch-digest in: header required: true description: Signature generated using the request path, body, and OAuth secret provided by the business. For details, see [signature](/docs/dev-portal-mobile/additional-topics/signature-sha256). authorization-header: schema: type: string in: header name: Authorization description: 'Bearer token for admin authorization. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".' required: true accept-header: schema: type: string default: application/json in: header name: Accept description: The media type the client expects in the response. Must be `application/json`. required: true content-type: schema: type: string default: application/json in: header name: Content-Type description: The media type of the request body. Must be `application/json`. required: true Content-Type_3: schema: type: string name: Content-Type in: header required: false description: Set this header to application/json Accept_3: schema: type: string name: Accept in: header required: false description: Set this header to application/json Authorization_2: schema: type: string default: Bearer BUSINESS_ADMIN_KEY_GOES_HERE name: Authorization in: header required: true description: 'Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".' schemas: redemption_details: type: object description: 'The `redemption_details` object returns information about a redemption done by a user. ' title: Redemption Details (Object) x-stoplight: id: 95eb8fd9df0bf properties: redemption_status: type: string description: 'Status of the redemption. The values returned can be: - redeemable: The redemption can be redeemed at the POS. - expired: The redemption has expired and becomes unusable for the user. - honoured: The redemption has already been processed successfully and redeemed by the user at the POS. - cancelled: The redemption can be voided by a user at the POS in case a redemption is done by mistake and the user wants to cancel it.' created_at: type: string description: 'Date/time when the redemption was created in the system ' redeemable_id: type: integer description: 'Unique ID of the redeemable ' redeemable_name: type: string description: 'Name of the redeemable ' redeemed_value: type: string description: 'In case of a business with banked_currency, a currency value will be returned. For example, a value of 10 would mean $10. In case of a business without banked_currency, points will be returned. For example, a value of 10 would mean 10 points.' redemption_image_url: type: string description: 'URL of the image depicting the redeemable. It can be displayed in the app. ' redemption_message: type: string description: 'A descriptive message that tells the user what has been redeemed ' redeemable_description: type: string description: 'Description of the redeemable ' updated_at: type: string description: 'Date/time at which the redemption was updated in the system ' redemption_id: type: integer format: int64 description: 'Unique ID of the redemption ' redemption_tracking_code: type: string description: 'Code that a user must submit at the POS to receive the redeemed reward ' expiring_at: type: string description: Date/time when the redemption_tracking_code expires and the user cannot use it at the POS location_id: type: integer description: Location ID at which the redemption code is generated. If no location ID is provided, then it returns the ID of the default location. campaign_name: type: string x-stoplight: id: ewheg639gdb0y description: Name of the campaign through which the guest received the offer menu-items: type: array title: Menu Items (Array Object) x-stoplight: id: 9.481325062e+24 description: This object used in the API request contains one or more menu items added to an order. It is mandatory to provide an array of menu items. See [How To Send Menu Items to Punchh](/docs/dev-portal-pos/5277d762b8c6d-how-to-send-menu-items-to-punchh) items: x-stoplight: id: nm03po2b4r93z type: object properties: item_name: type: string x-stoplight: id: jmflbednli6v9 description: Name of the menu item item_qty: type: integer x-stoplight: id: 408cfdtcyc797 description: Quantity ordered by the customer. If the item is a modifier (such as extra cheese on a pizza base item), make sure the quantity reflects the total number of base items included. For example, if you have a pizza base item with a certain item ID and a quantity of two, and the pizzas each have an extra cheese modifier added to them, then the modifier quantity should be two to account for the modifier across both pizzas. This applies only to base items of the same ID. If different base items include the same modifier, you do not need to sum the modifiers. item_amount: type: integer x-stoplight: id: m45aidhdgirx2 description: The total price of the line item or the amount of the discount that you applied to an item. In case of multiple quantities, this means the sum total of all item amounts. Always represent this value as a positive number, even when the item is a discount. menu_item_type: type: string x-stoplight: id: jcukxr2staydg description: 'The classification of the item. Choose from the following types based on the item: M - Menu item ( + or - ) D - Discount (negative). Either internal or Punchh will always evaluate lines as ( - ) regardless of the sign assigned in the API call S - Service item. Any item representing money received that is not a sale. For example, service charges, delivery fees, tips, purchase of gift cards/certificates, etc. T - Tax item. Taxes of all sorts P - Payment item. Visa, MasterCard, cash, gift card/certificate (when used to pay for the order)' menu_item_id: type: string x-stoplight: id: u2a3mb0k3cdkd description: Unique identifier for the item menu_family: type: string x-stoplight: id: fkaavtr3h7fh0 description: The family that the item belongs to. The family is the subcategory for the item. Even though the parameter is required, you can pass it in the request with a blank value. You can leave this blank if the item does not belong to a family. menu_major_group: type: string x-stoplight: id: y8u5yhex6g0my description: The major group that the item belongs to. The major group is the parent category for the item. Even though the parameter is required, you can pass it in the request with a blank value. You can leave this blank if the item does not belong to a major group. serial_number: type: string x-stoplight: id: zjbamqkfait4d description: A serialized number that differentiates distinct menu items on a receipt. The purpose of this field is to identify which items on the receipt are base items and which items are modifiers to the base items. For example, a main menu item (such as pizza) may have serial number "1.0", and the associated modifiers (such as "extra cheese", "olives", and "jalapenos") may have serial numbers "1.1", "1.2", and "1.3" respectively. Serialization is limited to one decimal point, so you can only modify the base item. You cannot modify a modifier with 1.x.x, and so on required: - item_name - item_qty - item_amount - menu_item_type - menu_item_id - menu_family - menu_major_group - serial_number Menu-items: title: Menu Items (Array Object) x-stoplight: id: gye960zwy1da1 type: array description: Returns a list of menu items in the API response items: x-stoplight: id: s3frha7eqpgt6 type: object properties: item_name: type: string x-stoplight: id: 2lmr1qb7qc0c6 description: Name of the menu item item_qty: type: string x-stoplight: id: 6hu133eoce1d8 description: Quantity ordered by the customer. If the item is a modifier (such as extra cheese on a pizza base item), the quantity reflects the total number of base items included. For example, if you have a pizza base item with a certain item ID and a quantity of two, and the pizzas each have an extra cheese modifier added to them, then the modifier quantity should be two to account for the modifier across both pizzas. This applies only to base items of the same ID. If different base items include the same modifier, you do not need to sum the modifiers. item_amount: type: number x-stoplight: id: aw4eeoh573sz7 format: float description: The total price of the line item or the amount of the discount that you applied to an item. In case of multiple quantities, this means the sum total of all item amounts. This value is always represented as a positive number, even when the item is a discount. menu_item_type: type: string x-stoplight: id: enunk8akfoxzy description: 'The classification based on the item type: M - Menu item ( + or - ) D - Discount (negative). Either internal or Punchh will always evaluate lines as ( - ) regardless of the sign assigned in the API call S - Service item. Any item representing money received that is not a sale. For example, service charges, delivery fees, tips, purchase of gift cards/certificates, etc. T - Tax item. Taxes of all sorts P - Payment item. Visa, MasterCard, cash, gift card/certificate (when used to pay for the order)' menu_item_id: type: integer x-stoplight: id: ov46iodowb7or description: Unique identifier for the item menu_family: type: string x-stoplight: id: jzo0cf5gze9mr description: The family that the item belongs to. The family is the subcategory for the item. A blank value means the item does not belong to a family. menu_major_group: type: string x-stoplight: id: 2aareglzw7uxl description: The major group that the item belongs to. The major group is the parent category for the item. A blank value means the item does not belong to a major group. serial_number: type: string x-stoplight: id: tcmpew6cokyuv description: A serialized number that differentiates distinct menu items on a receipt. The value identifies which items on the receipt are base items and which items are modifiers to the base items. For example, a main menu item (such as pizza) may have serial number "1.0", and the associated modifiers (such as "extra cheese", "olives", and "jalapenos") may have serial numbers "1.1", "1.2", and "1.3" respectively. Serialization is limited to one decimal point, so you can only modify the base item. You cannot modify a modifier with 1.x.x, and so on. discount_details: title: Discount Details (Object) x-stoplight: id: noljr9gca8tp2 type: object description: List of a discount's defining attributes. In the case of the [Get Active Discount Basket](/docs/dev-portal-mobile/1d4f01cf7aa32-get-active-discount-basket-redemptions-2-0) API, the object returns a null value for invalid discounts. properties: item_id: type: integer x-stoplight: id: dzbgkuiaedmd4 description: Item ID name: type: string x-stoplight: id: cfwtxznuxpv5k description: External discount name.

The `name` value is returned in the language specified in the Accept-Language request header, provided the redeemable name and subscription plan name have been translated into the relevant language in the Punchh platform. If the translation is unavailable, the response returns the value for this parameter in the default English language. For example, if the header specifies “fr” (French), the name is returned in French if a French translation is configured for the name in the Punchh platform; otherwise the value is returned in the default English language. image: type: string x-stoplight: id: efix5ltar4jgl description: Image URL of the reward points: type: integer x-stoplight: id: yaw6j2qsj0lbe description: Points associated with the current reward base_amount: type: integer x-stoplight: id: evtw0jopy5sg8 description: Discounted value description: type: string x-stoplight: id: hdui8b505fjib description: Description that explains rewards as configured in the Punchh platform.

The `description` value is returned in the language specified in the Accept-Language request header, provided the descriptions of redeemable and subscription have been translated into the relevant language in the Punchh platform. If the translation is unavailable, the response returns the value for this parameter in the default English language. For example, if the header specifies “fr” (French), the description is returned in French only if a French translation is configured for the description in the Punchh platform; otherwise the value is returned in the default English language. item_properties: type: string x-stoplight: id: qdl59fzarps1y description: Comma-separated values that provide additional details about a redeemable. For example, a redeemable could be a "Food_Item" or "Merchandise", etc. Can be configured for a business in the Punchh platform and attached to a redeemable. If no value is attached to a redeemable, a blank field will be returned. meta_detail: type: string x-stoplight: id: awpgx7okp6v3i description: 'Meta information configured for `discount_type` values: redemption_code, subscription, reward, and redeemable. The response returns a value only if the meta data field is configured in the Punchh platform when creating the discount. Currently, the Punchh platform supports multilingual values for `meta_detail` only for coupon redemption.

The `meta_detail` value for the coupon redemption (i.e., when discount_type = redemption_code) is returned in the language specified in the Accept-Language request header, provided the coupon meta data has been translated into the relevant language in the Punchh platform. If the translation is unavailable, the response returns the value for this parameter in the default English language. For example, if the header specifies “fr” (French), the `meta_data` value for a coupon is returned in French only if a French translation is configured for the coupon meta data in the Punchh platform; otherwise the value is returned in the default English language.' start_date_tz: type: string x-stoplight: id: lpw1a0g15on3r description: Start date of the reward in ISO 8601 format format: date-time examples: - '2024-05-24T08:34:24Z' end_date_tz: type: string x-stoplight: id: vky6mnsitagbu description: Expiry date of the reward in ISO 8601 format format: date-time examples: - '2024-05-24T08:34:24Z' created_at: type: string x-stoplight: id: td1xv46tfu04k format: date-time description: Date/time when the reward was created, in YYYY-MM-DDThh:mm:ss format auto_select: type: boolean x-stoplight: id: plj20tfv9czjj description: 'Whether the offer is enabled for auto-redemption or not. Possible values: true, false' campaign_name: type: string x-stoplight: id: fwwl46jnpnifp description: Name of the campaign through which the guest received the offer max_applicable_quantity: type: integer x-stoplight: id: dltq1h6etag65 description: 'The maximum quantity that can be discounted. Note: This parameter is returned for offers related to Price Rollback, Target Price for Bundle, and Target Price for Bundle (Advanced).' discount_basket_items: title: Discount Basket Items (Object) x-stoplight: id: 3a95e69093e06 type: array description: List of discounts. In the case of the [Get Active Discount Basket](/docs/dev-portal-mobile/1d4f01cf7aa32-get-active-discount-basket-redemptions-2-0) API, the object lists invalid discounts with a message stating that the discount is invalid. x-examples: Example: - discount_basket_item_id: 4699 discount_type: reward discount_id: 131 discount_value: null created_at: '2022-08-25T10:03:48Z' items: type: object properties: discount_basket_item_id: type: integer description: Unique identifier of selection discount_type: type: string description: 'The discount type can be any one of these values: card_completion || reward || redeemable || discount_amount || redemption_code || subscription || fuel_reward. For details, see [this topic](/docs/dev-portal-online-ordering/0130fe9413a97-getting-started-with-online-ordering-ap-is).' discount_id: type: string x-stoplight: id: jvv1cvfe8867j description: Discount ID discount_value: type: number x-stoplight: id: 8ltcw4fxx2zln format: float description: Value of the currency that a user wants to redeem. This value is set for users on the “Points Convert to Currency” loyalty program. The default value is 0 if the user has not selected any amount to redeem or has no currency in the loyalty account. The parameter returns a “null” value for a business that does not support banking of points into currency. created_at: type: string format: date-time description: Date/time when the discount was selected, in YYYY-MM-DDThh:mm:ss format message: type: string x-stoplight: id: mvcz3ropxwxdh description: Error message for invalid discount. If a discount is found to be honored, expired, perished, or archived, the API returns an error message in the parameter for the discount indicating that the discount is invalid. discount_details: $ref: '#/components/schemas/discount_details' lis_results: title: LIS Results (Object) x-stoplight: id: jpwwu4zsdviju type: object x-examples: {} properties: results: type: array x-stoplight: id: gb8msmyvub03l description: List of responses indicating if the entity is created or not items: x-stoplight: id: myq9wo2kds83u type: object properties: external_id: type: string x-stoplight: id: bjrapcsn7reme description: External transaction identifier (UUID) sent by the external system to track if a particular entity is successfully created in the Punchh system success: type: boolean x-stoplight: id: 7xsru2q46lplr description: 'Status of a specific entity created in the system. Possible values: true, false' errors: type: array x-stoplight: id: romm61qwl4n71 description: A list of error messages explaining why a specific entity was not created in the system items: x-stoplight: id: zhbm3xfh0bsdm type: string warnings: type: object x-stoplight: id: 331ecg16j6qnq description: A list of warning messages indicating potential issues found during the creation of the LIS. These warnings do not prevent the LIS from being created but may require attention. These warnings were ignored as they did not trigger any validation errors. properties: base_items: type: object x-stoplight: id: 4zbrsmjc1tu6n description: List of warnings related to base_items properties: clauses: type: array x-stoplight: id: 1bw7t5rkh2301 description: List of warnings related to the base_items clauses items: x-stoplight: id: m7xuict7un49e type: object properties: message: type: string x-stoplight: id: 3hxndnv4fbjf2 description: Warning message indicates which parameter contains an invalid value in the clauses of base_items. item: type: object x-stoplight: id: md0kbh0bloy26 description: JSON object of base_items clauses that has an invalid value properties: attribute: type: string x-stoplight: id: kgul9corj9ndg description: Attribute name on which filtering needs to be done operator: type: string x-stoplight: id: 8jfim7zxxuv9e description: The value specifies how an attribute should be filtered or selected in the Punchh system. value: type: string x-stoplight: id: 96ge7i4ege5ig description: Value of the attribute that needs to be filtered modifiers: type: object x-stoplight: id: 616cugklr7u3o description: List of warnings related to modifiers properties: clauses: type: array x-stoplight: id: 3tj7bg5rovbd1 description: List of warnings related to modifier clauses items: x-stoplight: id: 7gyqoad7kibs5 type: object properties: message: type: string x-stoplight: id: qe6tmqf9wzarm description: Warning message indicates which parameter contains an invalid value in the modifier clauses item: type: object x-stoplight: id: poi4en7kh2y7t description: JSON object of modifiers clauses that has an invalid value properties: attribute: type: string x-stoplight: id: x18spjuurwuhh description: Attribute name on which filtering needs to be done operator: type: string x-stoplight: id: c4jy165mvo1iw description: The value specifies how an attribute should be filtered or selected in the Punchh system value: type: string x-stoplight: id: 6hnrlh6ts6wcs description: Value of the attribute that needs to be filtered qc_item_qualifiers_input: title: QC Input - Item Qualifiers (Array Object) x-stoplight: id: 0ndlcqae60ta6 type: array description: 'Lists the items that must be present on the check to meet the qualification criteria. The processing function is triggered only if the receipt satisfies all of the conditions specified in the object’s attributes. Note: When updating item qualifiers, do not pass this object in the request if you do not want to update `item_qualifiers`. If an empty array object [] is provided, all previously created item qualifiers will be deleted. ' items: x-stoplight: id: 00actsh3la2si type: object properties: line_item_selector_id: type: string x-stoplight: id: 4mde2pc3va6oh description: 'ID of the pre-existing LIS, which for now will be the external_id. Note: If the line item selector ID is invalid, the system will skip that line item filter and create the qualification criteria with valid LIS IDs.' expression_type: type: string x-stoplight: id: pjstvek2o5biq description: 'List of predefined functions that define various conditions under which a receipt is eligible for further processing. These conditions evaluate whether the receipt meets certain requirements before triggering the processing function. The system will skip the item if the expression type is not a valid value. Possible values include: * line_item_does_not_exist: The specified line item must NOT be present on the receipt. * line_item_exists (default): The specified line item must be present on the receipt. * net_amount_excluding_min_priced_item_equal_to_or_more_than: The total net amount on the receipt, excluding the lowest-priced item, must be equal to or greater than the specified amount. * net_amount_excluding_max_priced_item_equal_to_or_more_than: The total net amount on the receipt, excluding the highest-priced item, must be equal to or greater than the specified amount. * net_quantity_greater_than_or_equal_to: The total quantity of the specified item(s) must be equal to or greater than the specified value. * net_amount_greater_than_or_equal_to: The total net amount on the receipt must be equal to or greater than the specified amount. * net_quantity_equal_to: The total quantity of the specified item(s) must be exactly equal to the specified value.' net_value: type: number x-stoplight: id: d68bi9o1cvp14 description: Specifies the required numeric threshold (such as quantity or amount) that the receipt must meet for certain `expression_type` conditions. `net_value` is an additional parameter that depends on the selected `expression_type`. It must be an integer and greater than zero. However, if the `expression_type` is set to either "line_item_exists" or "line_item_does_not_exist", the `net_value` will be ignored and treated as null, even if a value is provided. warnings_line_item_filters: title: Warnings - Line Item Filters (Array Object) x-stoplight: id: xtccj22akwl3d type: array description: List of warnings related to line item filters items: x-stoplight: id: pvh3ahc3ffmsm type: object properties: message: type: string x-stoplight: id: 64x45466phzz9 description: Warning message that describes the cause of the error and identifies the parameter containing the invalid value item: type: object x-stoplight: id: 6u3ldwbcdrh1f description: JSON object of the line item filter that has an invalid value properties: line_item_selector_id: type: string x-stoplight: id: v4mqlb4fqiqb5 description: ID of the pre-existing LIS, which for now will be the external_id ' processing_method': type: string x-stoplight: id: k9tdakd16b10j description: Value specifies the processing method for a line item filter that determines how the selected items are handled when applying a discount quantity: type: integer x-stoplight: id: vgavup5ggwk8a description: Value specifies how many units of a particular item will be selected or filtered for processing meta: title: Meta (Object) x-stoplight: id: f3gs3v1eqesb4 type: object description: Shows pagination information properties: page: type: integer x-stoplight: id: mupl2h3xge8l0 description: Current page number per_page: type: integer x-stoplight: id: 3qf8vl6x5afei description: Number of records per page total_records: type: integer x-stoplight: id: v9lk6gcy9jzs9 description: Total number of records available redeemable_lag_duration: title: Lag Duration (Object) x-stoplight: id: y8ihb0cxfl4py type: object description: This object specifies the duration before the redeemable is gifted to the guest. properties: value: type: integer x-stoplight: id: f6juqmterzqcu description: Numeric amount representing the duration units: type: string x-stoplight: id: jj5umrnpyj6so description: 'Unit of measurement for the duration. Possible values: days, hours' qc_line_item_selector: title: Line Item Selector (Object) x-stoplight: id: ztq2iadcevh3g type: object description: Shows the details of the line item selector (LIS) associated with the qualification criteria (QC) properties: name: type: string x-stoplight: id: 4s05n4ycy6p3k description: Name of the line item selector (LIS) external_id: type: string x-stoplight: id: ddvmls9vihm0a description: External transaction identifier (UUID) sent by the external system to track if a particular entity is successfully created in the Punchh system exclude_non_payable: type: boolean x-stoplight: id: 79pikqyqcajbf description: "When one or more discounts are returned as a modifier to the base item, and if the net amount for the modifier after the discount(s) is zero, the items will be excluded from the LIS. As a result, the item will not be considered when evaluating a receipt using the qualification criteria (QC) to which the LIS is linked. However, the base of the same LIS can be evaluated for additional discounting. Possible values: true, false \n\nNote: Applicable when `filter_item_set` is set to base_and_modifiers" filter_item_set: type: string x-stoplight: id: 2v3tfpeni9ta6 description: 'The value determines which item(s) will be eligible for the discount. Possible values: * base_only: The line item selector (LIS) will be considered a base item, and the discount will be applied to the base item value only. * modifiers_only: The line item selector (LIS) will be considered a modifier, and a discount will be applied to the modifier amount value only. * base_and_modifiers: The discount will be applied to the base and modifier total value.' base_items: $ref: '#/components/schemas/base_items' modifiers: $ref: '#/components/schemas/modifiers' warnings_item_filter_expressions_operator: title: Warnings - Item Filter Expressions Operator (Array Object) x-stoplight: id: yboa4dzz4zwwx type: array description: List of warnings related to the item filter expressions operator items: x-stoplight: id: z7da52sc6day4 type: object properties: message: type: string x-stoplight: id: fdbmai3wyg5a4 description: Warning message that describes the cause of the error and identifies the parameter containing the invalid value item: type: object x-stoplight: id: 1h1f7e0htqwef description: JSON object of the item filter expressions operator that has an invalid value properties: item_filter_expressions_operator: type: string x-stoplight: id: verq4j6bmlfce description: 'Specifies how offer conditions in `line_item_filters` are evaluated. Possible values: All, Any. The default value is "All". Use "All" when every condition must be met, or "Any" when satisfying at least one condition is sufficient.' item_qualifiers: title: Item Qualifiers (Array Object) x-stoplight: id: lq6pjd2djqiak type: array description: List of items qualifiers associated with the qualification criteria (QC). The object lists the items that must be present on the check to meet the QC. The processing function is triggered only if the receipt satisfies all of the conditions specified in the object’s attributes. items: x-stoplight: id: kgfyi17oejibs type: object properties: expression_type: type: string x-stoplight: id: gltluqx6d4l5g description: 'List of predefined functions that define various conditions under which a receipt is eligible for further processing. These conditions evaluate whether the receipt meets certain requirements before triggering the processing function. The system will skip the item if the expression type is not a valid value. Possible values include: * line_item_does_not_exist - The specified line item must NOT be present on the receipt. * line_item_exists (default) - The specified line item must be present on the receipt. * net_amount_excluding_min_priced_item_equal_to_or_more_than - The total net amount on the receipt, excluding the lowest-priced item, must be equal to or greater than the specified amount. * net_amount_excluding_max_priced_item_equal_to_or_more_than - The total net amount on the receipt, excluding the highest-priced item, must be equal to or greater than the specified amount. * net_quantity_greater_than_or_equal_to - The total quantity of the specified item(s) must be equal to or greater than the specified value. * net_amount_greater_than_or_equal_to - The total net amount on the receipt must be equal to or greater than the specified amount. * net_quantity_equal_to - The total quantity of the specified item(s) must be exactly equal to the specified value.' line_item_selector: $ref: '#/components/schemas/qc_line_item_selector' net_value: type: number x-stoplight: id: ujngr39da676u description: Specifies the required numeric threshold (such as quantity or amount) that the receipt must meet for certain expression_type conditions. `net_value` is an additional parameter that depends on the selected `expression_type`. It must be an integer and greater than zero. However, if `expression_type` is set to either "line_item_exists" or "line_item_does_not_exist", `net_value` will be ignored and treated as null, even if a value is provided. lis_data_output: title: LIS Output (Object) x-stoplight: id: mljp2rgnuzqv6 type: object x-examples: [] properties: data: type: array x-stoplight: id: 8wuledtj3w1s6 description: A list of line item selectors items: x-stoplight: id: rrore3skab6df type: object properties: name: type: string x-stoplight: id: fmqz0xsxtrbqo description: Name of the line item selector (LIS) external_id: type: string x-stoplight: id: b148rl44qy536 description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id` either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' filter_item_set: type: string x-stoplight: id: dfb9g9pji1pi5 description: 'The value determines which item(s) will be eligible for the discount. Possible values: * base_only: The line item selector (LIS) will be considered a base item, and the discount will be applied to only the base item value. * modifiers_only: The line item selector (LIS) will be considered a modifier, and a discount will be applied to only the modifier amount value. * base_and_modifiers: The discount will be applied to the base and modifier total value.' exclude_non_payable: type: boolean x-stoplight: id: theonam023s1x description: "When one or more discounts are returned as a modifier to the base item, and if the net amount for the modifier after the discount(s) is zero, the items will be excluded from the LIS. As a result, the item will not be considered when evaluating a receipt using the qualification criteria (QC) to which the LIS is linked. However, the base of the same LIS can be evaluated for additional discounting. Possible values: true, false \n\nNote: Applicable when `filter_item_set` is set to base_and_modifiers" base_items: type: object x-stoplight: id: ev1nei2uw50hb description: When building a new line item selector (LIS), you will define a base item, a modifier, or both. A base item is the 'main' item. For example, a hamburger. properties: clauses: type: array x-stoplight: id: 67an42xgld731 description: List of clauses for filtering base items. The base item discount will be applied only if `filter_item_set` is set to base_only or base_and_modifiers. items: x-stoplight: id: v3i7w1tpe4juz type: object properties: attribute: type: string x-stoplight: id: z435jipsqwhzy description: 'The attribute(s) to filter items that should be included in the offer or promotion. The filtering can be done based on specific characteristics of the items. For base items, you will complete at least one of the following attributes. Possible values for the attribute(s) are: * item_name: Filter the item using the item name in your POS system (e.g., "Sandwich"). * item_id: Filter item(s) using their unique identifier or product code in your POS system. This is the third and most specific level in the POS hierarchy. * quantity: Filter based on the number of units purchased (e.g., "at least 2 sandwiches"). * item_family: Filter the item using the unique ID of the item’s family in your POS system (e.g., "1001" or "2002"). This is the middle (second) level in the POS hierarchy. * item_major_group: Filter the item using the unique ID of the major grouping of items in your POS system (e.g., "1000" or "2000"). The major group ID is the top level in the POS hierarchy, above the family group and item ID. * item_serial_number: Filter the item using the item’s serial number in your POS system. * line_item_type: Filter based on the type of the menu item (e.g., "M", "D"). Possible values: Menu Item (M), Discount (D), Service Charge (S), Extra (X), Tax (T), or Payment (P) such as a gift card * item_total_amount: Filter based on the exact price or range of prices (e.g., items above a certain amount). ' operator: type: string x-stoplight: id: 9tq32t3k0jlis description: 'The value specifies how an attribute should be filtered or selected in the Punchh system. Possible values: ==, !=, >, <, >=, <=, in, is_case_insensitive, in_case_insensitive, not_in, not_in_case_insensitive, like, not_like, in_range, not_in_range, mod, and in_special' value: type: string x-stoplight: id: czfxr7njb2igl description: Value of the attribute that needs to be filtered modifiers: type: object x-stoplight: id: wcxvzzfrrjgci description: A modifier is an item that may accompany a base item. For example, if the base item is a hamburger, a modifier could be pepper jack cheese. properties: max_discount_units: type: integer x-stoplight: id: v99tx9su0p157 description: This value limits the number of units that can be discounted. A unit may be an individual menu item or a menu item bundle, depending on the configured processing function. processing_method: type: string x-stoplight: id: ntlt12rj785fr description: "States how the modifiers will be selected for further processing when `max_discount_units` are defined. Possible values: \n* max_price - Specifies that the most expensive modifiers are discounted first\n* min_price - Specifies that the least expensive modifiers are discounted first" clauses: type: array x-stoplight: id: eklw238ran2gd description: List of clauses for filtering modifier items. The modifiers discount will be applied only if `filter_item_set` is set to modifiers_only or base_and_modifiers. items: x-stoplight: id: c4czlo3jbspcm type: object properties: attribute: type: string x-stoplight: id: 1knwxvvibus43 description: 'The attribute(s) to filter items that should be included in the offer or promotion. The filtering can be done based on specific characteristics of the items. For modifier items, you will complete at least one of the following attributes. Possible values for the attribute(s) are: * item_name: Filter the item using the item name in your POS system (e.g., "Sandwich"). * item_id: Filter item(s) using their unique identifier or product code in your POS system. This is the third and most specific level in the POS hierarchy. * quantity: Filter based on the number of units purchased (e.g., "at least 2 sandwiches"). * item_family: Filter the item using the unique ID of the item’s family in your POS system (e.g., "1001" or "2002"). This is the middle (second) level in the POS hierarchy. * item_major_group: Filter the item using the unique ID of the major grouping of items in your POS system (e.g., "1000" or "2000"). The major group ID is the top level in the POS hierarchy, above the family group and item ID. * item_serial_number: Filter the item using the item’s serial number in your POS system. * line_item_type: Filter based on the type of the menu item (e.g., "M", "D"). Possible values: Menu Item (M), Discount (D), Service Charge (S), Extra (X), Tax (T), or Payment (P) such as a gift card * item_total_amount: Filter based on the exact price or range of prices (e.g., items above a certain amount).' operator: type: string x-stoplight: id: 1ww7zev8c9m88 description: 'The value specifies how an attribute should be filtered or selected in the Punchh system. Possible values: ==, !=, >, <, >=, <=, in, is_case_insensitive, in_case_insensitive, not_in, not_in_case_insensitive, like, not_like, in_range, not_in_range, mod, and in_special' value: type: string x-stoplight: id: novmepuo0dmua description: Value of the attribute that needs to be filtered meta: type: object x-stoplight: id: scuvzjiwhsg2u description: Contains pagination information properties: page: type: integer x-stoplight: id: mvfno134ia5f7 description: Current page number per_page: type: integer x-stoplight: id: rdrzjufkuqyz2 description: Number of records per page total_records: type: integer x-stoplight: id: sb7jky4milbi4 description: Total number of records available qc_line_item_filters_input: title: QC Input - Line Item Filters x-stoplight: id: p2j01i99nn06q type: array description: 'Lists the items to be discounted by using filters to select applicable menu items. Leave the filter empty to apply the discount to all menu items. If multiple items are selected, the processing function will be applied to each, and the final result will be the sum of all values. Note: When updating line item filters, do not pass this object if you do not want to update `line_item_filters`. If an empty array object [] is provided, all previously created line item filters will be deleted. ' items: x-stoplight: id: dw7o6he1vftrf type: object properties: line_item_selector_id: type: string x-stoplight: id: edzdryggy3455 description: 'ID of the pre-existing LIS, which for now will be the external_id. Note: If the line item selector ID is invalid, the system will skip that line item filter and create the other line item filters with valid LIS IDs.' processing_method: type: string x-stoplight: id: o2c8wu4tw52oj description: 'The processing method for a line item filter determines how the selected items are handled when applying a discount. The system will skip the line item filter if the value of `processing_method` is invalid. The available processing methods are: * max_price: Applies the discount to the item with the highest price * min_price: Applies the discount to the item with the lowest price * exclude: Excludes the selected items from the discount * sum_of_amount (default): Applies the discount based on the total sum of the selected items'' prices' quantity: type: integer x-stoplight: id: um20q1tdltn1e description: 'Specifies how many units of a particular item will be selected or filtered for processing. A value is required if the processing function is selected as `min_price` or `max_price`. If you apply a filter on certain items and specify the quantity, the system will process only the selected number of units for that item. For example, if the quantity is set to 3, only 3 units of the item will be included in the filter or discount. The quantity value must adhere to certain rules: * The value of quantity must be a whole number. * The quantity cannot be negative. * You must have at least 1 unit of the item. * You can select up to 5 units of an item.' warnings_qualifying_expressions_operator: title: Warnings - Qualifying Expressions Operator (Array Object) x-stoplight: id: 3ljmwtshkqmk7 type: array description: List of warnings related to the qualifying expressions operator items: x-stoplight: id: 25o8ztibsnzfd type: object properties: message: type: string x-stoplight: id: 0lmd3fmqr0zzk description: Warning message that describes the cause of the error and identifies the parameter containing the invalid value item: type: object x-stoplight: id: jxv6406yfbxoo description: JSON object of the qualifying expressions operator that has an invalid value properties: qualifying_expressions_operator: type: string x-stoplight: id: j199rtlrmgpd8 description: 'Specifies how offer conditions in `item_qualifiers` are evaluated. Possible values: All, Any. The default value is "All". Use "All" when every condition must be met, or "Any" when satisfying at least one condition is sufficient.' redeemable_alternate_locale_name: title: Alternate Locale Name (Array Object) x-stoplight: id: 0xsss0n88vh7u type: array description: An object representing the redeemable name in multiple languages items: x-stoplight: id: fftabdlo3dnth type: object properties: language: type: string x-stoplight: id: fuql2d7va5dqn description: 'The language code representing the locale. Possible values: en-CY for English (Cyprus), en-GB for English (United Kingdom), es for Spanish, es-CR for Spanish (Costa Rica), es-US for Spanish (United States), fr for French, fr-ca for French (Canada), and ro for Romanian' translation: type: string x-stoplight: id: 480v64bn1qnn3 description: The translated name of the redeemable in the specified language warnings_discount_evaluation_strategy: title: Warnings - Discount Evaluation Strategy (Array Object) x-stoplight: id: cw9x4kb1t2rsw type: array description: List of warnings related to the discount evaluation strategy items: x-stoplight: id: es09kivua8ffs type: object properties: message: type: string x-stoplight: id: shddtjgxfzk5d description: Warning message that describes the cause of the error and identifies the parameter containing the invalid value item: type: object x-stoplight: id: 3vzzta7f0u3u9 description: JSON object of the discount evaluation strategy that has an invalid value properties: discount_evaluation_strategy: type: string x-stoplight: id: gttlkb8m5sv2g description: 'Specifies whether the maximum or minimum discount should be applied when multiple conditions are met. Note: This parameter should be provided when `item_filter_expressions_operator` is set to Any. Possible values: Min, Max. The default value is "Min".' warnings_item_qualifiers: title: Warnings - Item Qualifiers (Array Object) x-stoplight: id: 1l036ixwc3kkb type: array description: List of warnings related to item qualifiers items: x-stoplight: id: e350cl8t85hfc type: object properties: message: type: string x-stoplight: id: b4xk87lcpy0f6 description: Warning message that describes the cause of the error and identifies the parameter containing the invalid value item: type: object x-stoplight: id: xk16l9792qiqv properties: line_item_selector_id: type: string x-stoplight: id: rfijp22soxu40 description: ID of the pre-existing LIS, which for now will be the external_id expression_type: type: string x-stoplight: id: zp2kexvlli7av description: Defines the condition or rule for qualifying items that need to be met to trigger the processing function net_value: type: number x-stoplight: id: aw8xizdh1j3kt description: Net value required for a specific condition warnings_receipt_qualifiers: title: Warnings - Receipt Qualifiers (Array Object) x-stoplight: id: ey82eiewiquxo type: array description: List of warnings related to receipt qualifiers items: x-stoplight: id: 52865xkd7ugsm type: object properties: message: type: string x-stoplight: id: gi83amfnudpd4 description: Warning message that describes the cause of the error and identifies the parameter containing the invalid value item: type: object x-stoplight: id: kw214q2xp55rg description: JSON object of the receipt qualifier that has an invalid value properties: attribute: type: string x-stoplight: id: rwcwk5sy1f4mi description: Type of receipt attribute based on which the qualification criteria will be applied operator: type: string x-stoplight: id: vl0rjqzb221gl description: Defines the comparison logic that will be applied to the receipt attribute value: type: string x-stoplight: id: hst0h0xzq62pd description: A specific value or set of values with which the receipt attribute will be compared modifiers: title: Modifiers (Object) x-stoplight: id: w4lf29swhlpt2 type: object description: A modifier is an item that may accompany a base item. For example, if the base item is a hamburger, a modifier could be pepper jack cheese. properties: clauses: type: array x-stoplight: id: ddt1jq7sko9sh description: List of clauses for filtering modifier items. The modifiers discount will be applied only if `filter_item_set` is set to modifiers_only or base_and_modifiers. items: x-stoplight: id: tuue0psh30q24 type: object properties: attribute: type: string x-stoplight: id: m2yei58cpf9dm description: 'The attribute(s) to filter items that should be included in the offer or promotion. The filtering can be done based on specific characteristics of the items. For modifier items, you will complete at least one of the following attributes. Possible values for the attribute(s) are: * item_name: Filter the item using the item name in your POS system (e.g., "Sandwich"). * item_id: Filter item(s) using their unique identifier or product code in your POS system. This is the third and most specific level in the POS hierarchy. * quantity: Filter based on the number of units purchased (e.g., "at least 2 sandwiches"). * item_family: Filter the item using the unique ID of the item’s family in your POS system (e.g., "1001" or "2002"). This is the middle (second) level in the POS hierarchy. * item_major_group: Filter the item using the unique ID of the major grouping of items in your POS system (e.g., "1000" or "2000"). The major group ID is the top level in the POS hierarchy, above the family group and item ID. * item_serial_number: Filter the item using the item’s serial number in your POS system. * line_item_type: Filter based on the type of the menu item (e.g., "M", "D"). Possible values: Menu Item (M), Discount (D), Service Charge (S), Extra (X), Tax (T), or Payment (P) such as a gift card * item_total_amount: Filter based on the exact price or range of prices (e.g., items above a certain amount). This allows businesses to apply targeted rules to specific items or item groups within a transaction for promotions, discounts, or rewards. For example, if you want to create an LIS that only applies to items with a specific item ID or name, you would use one of these values to define the filtering criteria.' operator: type: string x-stoplight: id: ahxvy2m1x3qnk description: 'The value specifies how an attribute should be filtered or selected in the Punchh system. Possible values: ==, !=, >, <, >=, <=, in, is_case_insensitive, in_case_insensitive, not_in, not_in_case_insensitive, like, not_like, in_range, not_in_range, mod, and in_special' value: type: string x-stoplight: id: 7i9bciifthc2t description: Value of the attribute that needs to be filtered processing_method: type: string x-stoplight: id: nj0gbkyn97wxi description: "States how the modifiers will be selected for further processing when `max_discount_units` are defined. Possible values: \n* max_price - Specifies that the most expensive modifiers are discounted first\n* min_price - Specifies that the least expensive modifiers are discounted first" max_discount_units: type: integer x-stoplight: id: j9m1uwbxi2wi3 description: This value limits the number of units that can be discounted. A unit may be an individual menu item or a menu item bundle, depending on the configured processing function. redeemable_alternate_locale_description: title: Alternate Locale Description (Array Object) x-stoplight: id: 3y2hqeml324qq type: array description: An object representing the redeemable description in multiple languages items: x-stoplight: id: 8szg455tajjof type: object properties: language: type: string x-stoplight: id: qasnnev0s3mx0 description: 'The language code representing the locale. Possible values: en-CY for English (Cyprus), en-GB for English (United Kingdom), es for Spanish, es-CR for Spanish (Costa Rica), es-US for Spanish (United States), fr for French, fr-ca for French (Canada), and ro for Romanian' translation: type: string x-stoplight: id: 562siougg25ip description: The translated description of the redeemable in the specified language base_items: title: Base Items (Object) x-stoplight: id: i2wkaqftnszca type: object description: When building a new line item selector (LIS), you will define a base item, a modifier, or both. A base item is the 'main' item. For example, a hamburger. properties: clauses: type: array x-stoplight: id: vcgu0lqswges4 description: List of clauses for filtering base items. The base item discount will be applied only if `filter_item_set` is set to base_only or base_and_modifiers. items: x-stoplight: id: drl3vx8knxlpp type: object properties: attribute: type: string x-stoplight: id: dls4vyq6g9bjs description: 'The attribute(s) to filter items that should be included in the offer or promotion. The filtering can be done based on specific characteristics of the items. For base items, you will complete at least one of the following attributes. The possible values for the attribute(s) are: * item_name: Filter the item using the item name in your POS system (e.g., "Sandwich"). * item_id: Filter item(s) using their unique identifier or product code in your POS system. This is the third and most specific level in the POS hierarchy. * quantity: Filter based on the number of units purchased (e.g., "at least 2 sandwiches"). * item_family: Filter the item using the unique ID of the item’s family in your POS system (e.g., "1001" or "2002"). This is the middle (second) level in the POS hierarchy. * item_major_group: Filter the item using the unique ID of the major grouping of items in your POS system (e.g., "1000" or "2000"). The major group ID is the top level in the POS hierarchy, above the family group and item ID. * item_serial_number: Filter the item using the item’s serial number in your POS system. * line_item_type: Filter based on the type of the menu item (e.g., "M", "D"). Possible values: Menu Item (M), Discount (D), Service Charge (S), Extra (X), Tax (T), or Payment (P) such as a gift card * item_total_amount: Filter based on the exact price or range of prices (e.g., items above a certain amount). ' operator: type: string x-stoplight: id: 1t6bv3000jz33 description: 'The value specifies how an attribute should be filtered or selected in the Punchh system. Possible values: ==, !=, >, <, >=, <=, in, is_case_insensitive, in_case_insensitive, not_in, not_in_case_insensitive, like, not_like, in_range, not_in_range, mod, and in_special' value: type: string x-stoplight: id: tcg7394y8q5nn description: Value of the attribute that needs to be filtered aggregator_grouping_attributes: title: Aggregator Grouping Attributes (Object) x-stoplight: id: iq2opeipfwlcq type: object description: Attributes that have to be matched to aggregate menu items. All menu items with identical attributes are treated as the same, and the total quantity is the sum of its occurrences on the receipt. This parameter is a required parameter if `enable_menu_item_aggregator` is sent as true. properties: item_name: type: boolean x-stoplight: id: 0c5b64frkhg7r description: 'Indicates whether to group menu items with the same item name together and aggregate their quantities. Possible values: true, false' item_id: type: boolean x-stoplight: id: cwkwcvwpy7dxw description: 'Indicates whether to group menu items with the same item ID together and aggregate their quantities. Possible values: true, false' item_major_group: type: boolean x-stoplight: id: 3mybqncem0pbp description: 'Indicates whether to group menu items with the same ID of the major grouping of items and aggregate their quantities. Possible values: true, false' item_family: type: boolean x-stoplight: id: aer4gxjg2oz82 description: 'Indicates whether to group menu items with the same ID of the item’s family together and aggregate their quantities. Possible values: true, false' line_item_type: type: boolean x-stoplight: id: lemyxyuixrzyo description: 'Indicates whether to group menu items with the same type of menu item together and aggregate their quantities. Possible values: true, false' lis_data_input: title: LIS Input (Object) x-stoplight: id: mljp2rgnuzqv5 type: object x-examples: [] properties: data: type: array x-stoplight: id: 8wuledtj3w1s6 description: A list of line item selectors (LIS) that needs to be created items: x-stoplight: id: rrore3skab6df type: object properties: name: type: string x-stoplight: id: fmqz0xsxtrbqo description: Name of the line item selector (LIS) external_id: type: string x-stoplight: id: b148rl44qy536 description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id` either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' filter_item_set: type: string x-stoplight: id: dfb9g9pji1pi5 description: 'The value determines what item(s) will be eligible for the discount. Possible values: * base_only: The line item selector (LIS) will be considered a base item, and the discount will be applied to the base item value only. * modifiers_only: The line item selector (LIS) will be considered a modifier, and a discount will be applied to the modifier amount value only. If the LIS is created with "modifiers_only", you must provide both base and modifier clauses. * base_and_modifiers: The discount will be applied to the base and modifier total value.' exclude_non_payable: type: boolean x-stoplight: id: theonam023s1x description: "When one or more discounts are returned as a modifier to the base item, and if the net amount for the modifier after the discount(s) is zero, the items will be excluded from the LIS. As a result, the item will not be considered when evaluating a receipt using the qualification criteria (QC) to which the LIS is linked. However, the base of the same LIS can be evaluated for additional discounting. Possible values: true, false \n\nNote: Applicable when `filter_item_set` is set to base_and_modifiers" base_items: type: object x-stoplight: id: ev1nei2uw50hb description: When building a new line item selector (LIS), you will define a base item, a modifier, or both. A base item is the 'main' item. For example, a hamburger. properties: clauses: type: array x-stoplight: id: 67an42xgld731 description: List of clauses for filtering base items. The base item discount will be applied only if `filter_item_set` is set to base_only or base_and_modifiers. items: x-stoplight: id: v3i7w1tpe4juz type: object properties: attribute: type: string x-stoplight: id: z435jipsqwhzy description: 'The attribute(s) to filter items that should be included in the offer or promotion. The filtering can be done based on specific characteristics of the items. For base items, you will complete at least one of the following attributes. The possible values for the attribute(s) are: * item_name: Filter the item using the item name in your POS system (e.g., "Sandwich"). * item_id: Filter item(s) using their unique identifier or product code in your POS system. This is the third and most specific level in the POS hierarchy. * quantity: Filter based on the number of units purchased (e.g., "at least 2 sandwiches"). * item_family: Filter the item using the unique ID of the item’s family in your POS system (e.g., "1001" or "2002"). This is the middle (second) level in the POS hierarchy. * item_major_group: Filter the item using the unique ID of the major grouping of items in your POS system (e.g., "1000" or "2000"). The major group ID is the top level in the POS hierarchy, above the family group and item ID. * item_serial_number: Filter the item using the item’s serial number in your POS system. * line_item_type: Filter based on the type of the menu item (e.g., "M", "D"). Possible values: Menu Item (M), Discount (D), Service Charge (S), Extra (X), Tax (T), or Payment (P) such as a gift card * item_total_amount: Filter based on the exact price or range of prices (e.g., items above a certain amount). ' operator: type: string x-stoplight: id: 9tq32t3k0jlis description: 'The value specifies how an attribute should be filtered or selected in the Punchh system. Possible values: ==, !=, >, <, >=, <=, in, is_case_insensitive, in_case_insensitive, not_in, not_in_case_insensitive, like, not_like, in_range, not_in_range, mod and in_special' value: type: string x-stoplight: id: czfxr7njb2igl description: Value of the attribute that needs to be filtered. The value needs to be sent based on the operator selected; e.g., for the "in" operator, the values must be comma-separated. required: - attribute - operator - value required: - clauses modifiers: type: object x-stoplight: id: wcxvzzfrrjgci description: 'A modifier is an item that may accompany a base item. For example, if the base item is a hamburger, a modifier could be pepper jack cheese. ' properties: max_discount_units: type: integer x-stoplight: id: v99tx9su0p157 description: This value limits the number of units that can be discounted. A unit may be an individual menu item or a menu item bundle, depending on the configured Processing Function. Leave the field blank to allow all qualifying units to be discounted, or set a cap to it by providing an integer value greater than or equal to 1. processing_method: type: string x-stoplight: id: ntlt12rj785fr description: "States how the modifiers will be selected for further processing when `max_discount_units` are defined. Possible values: \n* max_price: Specify max_price to discount the most expensive modifiers first.\n* min_price: Select min_price to discount the least expensive modifier first.\nNote: If this field is left blank, the discount will be applied to the modifiers as they appear on the receipt. If you have specified a number in `max_discount_units`, it is recommended also to specify a value in `processing_method`." clauses: type: array x-stoplight: id: eklw238ran2gd description: List of clauses for filtering modifier items. The modifiers discount will be applied only if `filter_item_set` is set to modifiers_only or base_and_modifiers. items: x-stoplight: id: c4czlo3jbspcm type: object properties: attribute: type: string x-stoplight: id: 1knwxvvibus43 description: 'The attribute(s) to filter items that should be included in the offer or promotion. The filtering can be done based on specific characteristics of the items. For modifier items, you will complete at least one of the following attributes. The possible values for the attribute(s) are: * item_name: Filter the item using the item name in your POS system (e.g., "Sandwich"). * item_id: Filter item(s) using their unique identifier or product code in your POS system. This is the third and most specific level in the POS hierarchy. * quantity: Filter based on the number of units purchased (e.g., "at least 2 sandwiches"). * item_family: Filter the item using the unique ID of the item’s family in your POS system (e.g., "1001" or "2002"). This is the middle (second) level in the POS hierarchy. * item_major_group: Filter the item using the unique ID of the major grouping of items in your POS system (e.g., "1000" or "2000"). The major group ID is the top level in the POS hierarchy, above the family group and item ID. * item_serial_number: Filter the item using the item’s serial number in your POS system. * line_item_type: Filter based on the type of the menu item (e.g., "M", "D"). Possible values: Menu Item (M), Discount (D), Service Charge (S), Extra (X), Tax (T), or Payment (P) such as a gift card * item_total_amount: Filter based on the exact price or range of prices (e.g., items above a certain amount). This allows businesses to apply targeted rules to specific items or item groups within a transaction for promotions, discounts, or rewards. For example, if you want to create an LIS that applies only to items with a specific item ID or name, you would use one of these values to define the filtering criteria.' operator: type: string x-stoplight: id: 1ww7zev8c9m88 description: 'The value specifies how an attribute should be filtered or selected in the Punchh system. Required if the `modifiers` object is sent in the request. Possible values: ==, !=, >, <, >=, <=, in, is_case_insensitive, in_case_insensitive, not_in, not_in_case_insensitive, like, not_like, in_range, not_in_range, mod and in_special' value: type: string x-stoplight: id: novmepuo0dmua description: Value of the attribute that needs to be filtered. Required if the `modifiers` object is sent in the request. The value needs to be sent based on the operator selected; e.g., for the "in" operator, the values must be comma-separated. required: - attribute - operator - value required: - clauses required: - name - external_id required: - data receipt_qualifiers: title: Receipt Qualifiers (Array Object) x-stoplight: id: p6nqib79s2g8r type: array description: Lists the receipt rules that are used to check for information that must (or must not be) present on a guest's receipt in order to satisfy conditions for the qualification criteria items: x-stoplight: id: kgjrbgyv7mz22 type: object properties: attribute: type: string x-stoplight: id: ajdryi5buq4al description: "Type of receipt attribute based on which the qualification criteria will be applied. The value of the attribute must be from the predefined list. The system will ignore the attribute value if it is not from the list. If the same attribute is provided multiple times, only the first one will be accepted. Possible values: total_amount, receipt_hour, receipt_week_day, receipt_day, subtotal_amount, receipt_month, receipt_year, revenue_code, revenue_id, employee_id, employee_name, receipt_week, receipt_minute, channel, and transaction_no. For more information on possible values, see the [Receipt Rules/Qualifiers]( https://support.punchh.com/s/article/Receipt-RulesQualifiers) article on the Support Portal. \n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal." operator: type: string x-stoplight: id: rhkpkekle3d65 description: 'Defines the comparison logic that will be applied to the receipt attribute. Possible values: ==, !=, >, <, >=, <=, in, is_case_insensitive, in_case_insensitive, not_in, not_in_case_insensitive, like, not_like, in_range, not_in_range, mod, and in_special' value: type: string x-stoplight: id: qx6654qjwgumt description: A specific value or set of values with which the receipt attribute will be compared redeemable_template: title: Template (Object) x-stoplight: id: 2jo6kgp0r4h25 type: object properties: redemption_message: type: string x-stoplight: id: wp8fepiom8yf8 description: Message displayed on the redemption screen of the mobile app during the redemption process. You can use the variables {{points_requested}} and {{redeemed_points}} to customize this message as appropriate. short_prompt: type: string x-stoplight: id: b5vw6z1pcxd5a description: Prompt message displayed on the Point of Sale and Pin Pad standard_prompt: type: string x-stoplight: id: lkvmx53k4etc5 description: Prompt message displayed on the Point of Sale and Pin Pad description: This object contains customizable messaging for the redemption process. qc_data_input: title: QC Input (Object) x-stoplight: id: i0yltuftvwcf6 type: object properties: data: type: array x-stoplight: id: l2eplxkth3jif description: A list of qualification criteria (QC) that need to be created items: x-stoplight: id: 289v9n9x325ut type: object properties: name: type: string x-stoplight: id: 2eejxuoc3a0j2 description: Name of qualification criteria (QC). The name can be up to 255 characters long. maxLength: 255 minLength: 1 external_id: type: string x-stoplight: id: kfc6g16pwg8rh description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id`, either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' amount_cap: type: number x-stoplight: id: 2jljgc0nhidbe description: Maximum amount that can be earned/redeemed on any receipt. The value should be greater than or equal to 0 and less than or equal to 99999 if provided. minimum: 0 maximum: 99999 format: float percentage_of_processed_amount: type: number x-stoplight: id: jjdphn7hfc01q description: Percentage of processed amount that can be earned/redeemed on any receipt. The value should be greater than or equal to 0 and less than or equal to 99999 if provided. minimum: 1 maximum: 99999 format: float qc_processing_function: type: string x-stoplight: id: i2extlgbomzij description: 'Function applied on filtered menu items of the receipt. Processing functions return a processed value that governs discounting and earning depending on where the qualification criterion is attached. If it is applied in a discounting scenario, the processed value controls the discount amount. If it is applied in an earning scenario (e.g., a rewards program), the processed value controls how much is earned (such as reward points). This parameter is optional when updating qualification criteria (QC). Possible values: hit_target_price, rate_rollback, bundle_price_target, bundle_price_target_advanced, hit_target_price_max_price_once, hit_target_price_min_price_once, sum_amounts_incremental, static_amount, receipt_subtotal, bogof, bogof2, sum_amounts, receipt_total_amount, sum_qty For more information on possible values, see the [Processing Functions]( https://support.punchh.com/s/article/Processing-Functions) article on the Support Portal. Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal.' qualifying_expressions_operator: type: string x-stoplight: id: 7in7ag4licd2z description: 'Specifies how offer conditions in `item_qualifiers` are evaluated. Possible values: All, Any. The default value is "All". Use "All" when every condition must be met, or "Any" when satisfying at least one condition is sufficient.' default: All item_filter_expressions_operator: type: string x-stoplight: id: h4v56u7aissz7 description: 'Specifies how offer conditions in `line_item_filters` are evaluated. Possible values: All, Any. The default value is "All". Use "All" when every condition must be met, or "Any" when satisfying at least one condition is sufficient.' default: All discount_evaluation_strategy: type: string x-stoplight: id: pzgh5l2yr74vm description: 'Specifies whether the maximum or minimum discount should be applied when multiple conditions are met. Note: This parameter should be provided when `item_filter_expressions_operator` is set to Any. Possible values: Min, Max. The default value is "Min".' default: Min rounding_rule: type: string x-stoplight: id: 6nidyy7xcjlpn description: "If the processing function returns a float value, it will be rounded according to the chosen rounding rule. If no rule is selected, the float value will be used as is. A value is required to be sent in the parameter depending on the processing function selected. Possible values: \n* round: This rule rounds the float value to the nearest integer. If the decimal part is 0.5 or higher, the value is rounded up. If the decimal part is less than 0.5, the value is rounded down. For example, 4.3 becomes 4, and 4.7 becomes 5.\n* ceil: This rule rounds the float value up to the next highest integer, regardless of the decimal part. For example, 4.3 becomes 5.\n* floor: This rule rounds the float value down to the next lowest integer, regardless of the decimal part. For example, 4.3 becomes 4." max_discount_units: type: integer x-stoplight: id: 49gq1hglnuxez description: This value limits the number of units that can be discounted. A value is required to be sent in the parameter depending on the processing function (`qc_processing_function`) types selected, such as rate_rollback, bundle_price_target, bundle_price_target_advanced, and sum_amounts_incremental. minimum: 0 maximum: 99999 minimum_unit_rate: type: number x-stoplight: id: zfbtdc1ifud9v description: Minimum unit price threshold. After applying the discount, the minimum unit rate should not be below this amount. A value greater than or equal to 0.01 and less than or equal to 99999 is required if the processing method (`qc_processing_function`) is rate_rollback. minimum: 0.01 maximum: 99999 unit_discount: type: number x-stoplight: id: lxoccu80hjqgt description: Discount to be applied to the rate of the selected items chosen for the offer or promotion. The discount is based on a specific rate (e.g., per unit of item -- per gallon, per liter, etc.). For example, for a fuel discount of 20 cents per gallon, you need to specify the discount in a decimal format (like 0.2) to reflect a 20-cent reduction for each gallon of fuel. If the qualification criteria are attached to a subscription plan, the value of the unit discount will be picked up from the subscription plan; even though you are required to enter a value for the discount (e.g., 0.2 for 20 cents), this value will be ignored if the QC are part of a subscription plan, because the discount will be controlled by the subscription plan's settings instead. The value should be greater than or equal to 0.01 and less than or equal to 99999 if the processing method (`qc_processing_function`) is rate_rollback. A value is required to be sent in the parameter depending on the processing function selected. format: float target_price: type: - number x-stoplight: id: 1xqs99evdc90e description: Discount selected menu items to achieve this target unit price. For example, if locations sell a burger for variable pricing, a target unit price is achieved by using the appropriate processing function. If a burger is sold at different prices at different locations (e.g., one location sells it for $10, another for $12), you can set a target price (e.g., $9) to standardize the price across locations. The system applies discounts to bring the price down to $9, no matter what the original price was. A value is required to be sent in the parameter depending on the processing function (`qc_processing_function`) types selected, such as hit_target_price, hit_target_price_max_price_once, hit_target_price_min_price_once, bundle_price_target, and bundle_price_target_advanced. minimum: 0.01 effective_location: type: - array x-stoplight: id: xdwh79i6ie9ez description: 'An array of valid existing location IDs and/or location group (tag) IDs. The default is an empty array ([]). Restricts redemption to the specified locations or groups. Use the format "location:" or "tag:". Example: ["location:123", "tag:456"]. The maximum allowed combined total of locations and location groups is 50.' items: x-stoplight: id: rp8hc7d4ducg4 type: string stack_discounting: type: boolean x-stoplight: id: xfspaqyhy1rfi description: When stacking is set to true, this discount can be redeemed with any other discount that contains the same target item. If set to false, only one discount can be applied to the target item, even if multiple discounts are available. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. reuse_qualifying_items: type: boolean x-stoplight: id: 50m3u684y74bx description: When set to true, it allows qualifying item(s) to be reused when redeemed with other discounts that apply to the same item(s). When set to false, it restricts qualifying item(s) from being reused for multiple discounts. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. line_item_filters: $ref: '#/components/schemas/qc_line_item_filters_input' enable_menu_item_aggregator: type: boolean x-stoplight: id: h4ycxre7l7973 description: Whether the system will combine (aggregate) multiple instances of the same menu item into one entry based on the attributes defined in `aggregator_grouping_attributes`. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. aggregator_grouping_attributes: type: object x-stoplight: id: lni6h7tgnwsss description: Attributes that have to be matched to aggregate menu items. All menu items with identical attributes are treated as the same, and the total quantity is the sum of its occurrences on the receipt. This parameter is required if `enable_menu_item_aggregator` is sent as true. properties: item_name: x-stoplight: id: 1jyct3ow75yf2 type: boolean description: 'Indicates whether to group menu items with the same item name together and aggregate their quantities. Possible values: true, false' item_id: type: boolean x-stoplight: id: 8d7po504bgshy description: 'Indicates whether to group menu items with the same item ID together and aggregate their quantities. Possible values: true, false' item_major_group: type: boolean x-stoplight: id: orcwljrl9wn46 description: 'Indicates whether to group menu items with the same ID of the major grouping of items and aggregate their quantities. Possible values: true, false' item_family: type: boolean x-stoplight: id: 0xwndctk8bkq3 description: 'Indicates whether to group menu items with the same ID of the item’s family together and aggregate their quantities. Possible values: true, false' line_item_type: type: boolean x-stoplight: id: 7ch5hbxcx3eza description: 'Indicates whether to group menu items with the same type of menu item together and aggregate their quantities. Possible values: true, false' item_qualifiers: $ref: '#/components/schemas/qc_item_qualifiers_input' receipt_qualifiers: $ref: '#/components/schemas/receipt_qualifiers' required: - external_id - qc_processing_function required: - data qc_data_output: title: QC List Output (Object) x-stoplight: id: 2cpl8d7qmnsl7 type: object properties: data: type: array x-stoplight: id: shl1s59zemvqd description: A list of qualification criteria (QC) items: x-stoplight: id: aswag4t2up7bn type: object properties: name: type: string x-stoplight: id: uzk3pa4p6054v description: Name of the qualification criteria (QC). The name can be up to 255 characters long. external_id: type: string x-stoplight: id: goy2kiaapafu1 description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id` either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' amount_cap: type: number x-stoplight: id: znddjw2cwxyqe format: float description: Maximum amount that can be earned/redeemed on any receipt percentage_of_processed_amount: type: number x-stoplight: id: xcq9f0bqah9kz format: float description: Percentage of processed amount that can be earned/redeemed on any receipt qc_processing_function: type: string x-stoplight: id: 861nyi4m1yjev description: "Function applied on filtered menu items of the receipt. Processing functions return a processed value that governs discounting and earning depending on where the qualification criterion is attached. If it is applied in a discounting scenario, the processed value controls the discount amount. If it is applied in an earning scenario (e.g., a rewards program), the processed value controls how much is earned (such as reward points). \n\nPossible values: hit_target_price, rate_rollback, bundle_price_target, bundle_price_target_advanced, hit_target_price_max_price_once, hit_target_price_min_price_once, sum_amounts_incremental, static_amount, receipt_subtotal, bogof, bogof2, sum_amounts, receipt_total_amount, sum_qty\n\nFor more information on possible values, see the [Processing Functions]( https://support.punchh.com/s/article/Processing-Functions) article on the Support Portal.\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal." rounding_rule: type: string x-stoplight: id: lk57gnvx6nqmj description: "If the processing function returns a float value, it will be rounded according to the chosen rounding rule. If no rule is selected, the float value will be used as is. A value is required to be sent in the parameter depending on the processing function selected. Possible values: \n* round: This rule rounds the float value to the nearest integer. If the decimal part is 0.5 or higher, the value is rounded up. If the decimal part is less than 0.5, the value is rounded down. For example, 4.3 becomes 4, and 4.7 becomes 5.\n* ceil: This rule rounds the float value up to the next highest integer, regardless of the decimal part. For example, 4.3 becomes 5.\n* floor: This rule rounds the float value down to the next lowest integer, regardless of the decimal part. For example, 4.3 becomes 4." max_discount_units: type: integer x-stoplight: id: kq0qin1gzaiuy description: This value limits the number of units that can be discounted. It works only with specific `qc_processing_function` types, such as rate_rollback, bundle_price_target, bundle_price_target_advanced, and sum_amounts_incremental. minimum: 1 minimum_unit_rate: type: number x-stoplight: id: 7u3cakqb804a2 description: Minimum unit price threshold. After applying the discount, the minimum unit rate should be at this amount. unit_discount: type: number x-stoplight: id: 094l13tl26egj format: float description: Discount to be applied to the rate of the selected items chosen for the offer or promotion. The discount is based on a specific rate (e.g., per unit of item -- per gallon, per liter, etc.). For example, for a fuel discount of 20 cents per gallon, you need to specify the discount in a decimal format (like 0.2) to reflect a 20-cent reduction for each gallon of fuel. If these QC are attached to a subscription plan, the value of the unit discount will be picked up from the subscription plan; even though you are required to enter a value for the discount (e.g., 0.2 for 20 cents), this value will be ignored if the QC is part of a subscription plan, because the discount will be controlled by the subscription plan's settings instead. The value should be greater than or equal to 0.01 and less than or equal to 99999 if the processing method (`qc_processing_function`) is rate_rollback. A value is required to be sent in the parameter depending on the processing function selected. target_price: type: - number x-stoplight: id: 5r4b3thjf5y15 description: Discount selected menu items to achieve this target unit price. For example, if locations sell a burger for variable pricing, a target unit price is achieved by using the appropriate processing function, and this target price only works with specific `qc_processing_function`. If a burger is sold at different prices at different locations (e.g., one location sells it for $10, another for $12), you can set a target price (e.g., $9) to standardize the price across locations. The system applies discounts to bring the price down to $9, no matter what the original price was. effective_location: type: array x-stoplight: id: burcp8lmvqpbl description: 'An array of location and/or location group (tag) identifiers where the qualification criterion applies. The default is an empty array ([]). Each entry is in the format "location:" or "tag:". Example: ["location:123", "tag:456"]. The maximum allowed combined total of locations and tags is 50' items: x-stoplight: id: 964nzcxm85ttc type: string stack_discounting: type: boolean x-stoplight: id: r1hkkmmr9ziy0 description: When stacking is set to true, this discount can be redeemed with any other discount that contains the same target item. If set to false, only one discount can be applied to the target item, even if multiple discounts are available. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. reuse_qualifying_items: type: boolean x-stoplight: id: 8xwejpz1ybyhz description: When set to true, it allows qualifying item(s) to be reused when redeemed with other discounts that apply to the same item(s). When set to false, it restricts qualifying item(s) from being reused for multiple discounts. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. line_item_filters: type: array x-stoplight: id: ibshkriaq76x4 description: List of line item selectors (LIS) associated with the qualification criteria (QC) items: x-stoplight: id: sr7swfpo1xtmp type: object properties: processing_method: type: string x-stoplight: id: r5qu75b4qa49c description: 'The processing method for a line item filter determines how the selected items are handled when applying a discount. The system will skip the line item filter if the value of `processing_method` is invalid. The available processing methods are: * max_price: Applies the discount to the item with the highest price * min_price: Applies the discount to the item with the lowest price * exclude: Excludes the selected items from the discount * sum_of_amount (default): Applies the discount based on the total sum of the selected items'' prices' quantity: type: integer x-stoplight: id: 03rrwhmo0xuff description: 'Specifies how many units of a particular item will be selected or filtered for processing. A value is required if the processing function is selected as `min_price` or `max_price`. If you apply a filter on certain items and specify the quantity, the system will process only the selected number of units for that item. For example, if the quantity is set to 3, only 3 units of the item will be included in the filter or discount. The quantity value must adhere to certain rules: * The value of quantity must be a whole number. * The quantity cannot be negative. * You must have at least 1 unit of the item. * You can select up to 5 units of an item.' line_item_selector: $ref: '#/components/schemas/qc_line_item_selector' enable_menu_item_aggregator: type: boolean x-stoplight: id: vzeopj8obw0fz description: Whether the system will combine (aggregate) multiple instances of the same menu item into one entry based on the attributes defined in aggregator_grouping_attributes. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. aggregator_grouping_attributes: $ref: '#/components/schemas/aggregator_grouping_attributes' item_qualifiers: $ref: '#/components/schemas/item_qualifiers' receipt_qualifier: $ref: '#/components/schemas/receipt_qualifiers' meta: $ref: '#/components/schemas/meta' redeemable_redeeming_criterion: title: Redeeming Criterion (Object) x-stoplight: id: jojsfkft1uil5 type: object description: This object contains information about the qualification criteria that will be created and attached to the redeemable. It is required when `qualifier_type` is set to "new". properties: name: type: string x-stoplight: id: wkwstergomqnr description: Name of qualification criteria (QC). The name can be up to 255 characters long. minLength: 0 maxLength: 225 external_id: type: string x-stoplight: id: 90qxonbnlop6s description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id` either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' amount_cap: type: number x-stoplight: id: oxwadpyrf764i description: Maximum amount that can be earned/redeemed on any receipt. The value should be greater than or equal to 0 and less than or equal to 99999 if provided. format: float minimum: 0 maximum: 99999 percentage_of_processed_amount: type: number x-stoplight: id: xwie3xvrgdw2q format: float description: Percentage of processed amount that can be earned/redeemed on any receipt. The value should be greater than or equal to 0 and less than or equal to 99999 if provided. minimum: 0 maximum: 99999 qc_processing_function: type: string x-stoplight: id: w7xhz6u0ksna8 description: "Function applied on filtered menu items of the receipt. Processing functions return a processed value that governs discounting and earning depending on where the qualification criterion are attached. If it is applied in a discounting scenario, the processed value controls the discount amount. If it is applied in an earning scenario (e.g., a rewards program), the processed value controls how much is earned (such as reward points). \n\nPossible values: hit_target_price, rate_rollback, bundle_price_target, bundle_price_target_advanced, hit_target_price_max_price_once, hit_target_price_min_price_once, sum_amounts_incremental, static_amount, receipt_subtotal, bogof, bogof2, sum_amounts, receipt_total_amount, sum_qty\n\nFor more information on possible values, see the [Processing Functions](https://support.punchh.com/s/article/Processing-Functions) article on the Punchh Support Portal.\n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal." rounding_rule: type: string x-stoplight: id: zoqkuij01oaud description: "If the processing function returns a float value, it will be rounded according to the chosen rounding rule. If no rule is selected, the float value will be used as is. A value is required to be sent in the parameter depending on the processing function selected. Possible values: \n* round: This rule rounds the float value to the nearest integer. If the decimal part is 0.5 or higher, the value is rounded up. If the decimal part is less than 0.5, the value is rounded down. For example, 4.3 becomes 4, and 4.7 becomes 5.\n* ceil: This rule rounds the float value up to the next highest integer, regardless of the decimal part. For example, 4.3 becomes 5.\n* floor: This rule rounds the float value down to the next lowest integer, regardless of the decimal part. For example, 4.3 becomes 4." max_discount_units: type: integer x-stoplight: id: kn49zs35liiog description: This value limits the number of units that can be discounted. A value is required to be sent in the parameter depending on the processing function (`qc_processing_function`) types selected, such as rate_rollback, bundle_price_target, bundle_price_target_advanced, and sum_amounts_incremental. minimum: 1 unit_discount: type: number x-stoplight: id: k2cfku19gv7ee description: Discount to be applied to the rate of the selected items chosen for the offer or promotion. The discount is based on a specific rate (e.g., per unit of item - per gallon, per liter, etc.). For example, for a fuel discount of 20 cents per gallon, you need to specify the discount in a decimal format (0.2) to reflect a 20-cent reduction for each gallon of fuel. If the qualification criteria are attached to a subscription plan, the value of the unit discount will be picked up from the subscription plan, and even though you are required to enter a value for the discount (e.g., 0.2 for 20 cents), this value will be ignored if the qualification criteria are part of a subscription plan, because the discount will be controlled by the subscription plan's settings instead. The value should be greater than or equal to 0.01 and less than or equal to 99999 if the processing method (`qc_processing_function`) is rate_rollback. A value is required to be sent in the parameter depending on the processing function selected. format: float maximum: 99999 minimum: 0.01 minimum_unit_rate: type: number x-stoplight: id: p5an5geaz0kka description: Minimum unit price threshold. After applying the discount, the minimum unit rate should not be below this amount. A value greater than or equal to 0.01 and less than or equal to 99999 is required if the processing method (`qc_processing_function`) is rate_rollback. minimum: 0.01 maximum: 99999 target_price: type: integer x-stoplight: id: 96n35s1vh5b88 description: Discount selected menu items to achieve this target unit price. For example, if locations sell a burger for variable pricing, a target unit price is achieved by using the appropriate processing function. If a burger is sold at different prices at different locations (e.g., one location sells it for $10, another for $12), you can set a target price (e.g., $9) to standardize the price across locations. The system applies discounts to bring the price down to $9, no matter what the original price was. A value is required to be sent in the parameter depending on the processing function (`qc_processing_function`) types selected, such as hit_target_price, hit_target_price_max_price_once, hit_target_price_min_price_once, bundle_price_target, and bundle_price_target_advanced. effective_location: type: string x-stoplight: id: 0shnef5xs778r description: A valid or existing location ID or location group ID. The default value is null. Restricts redemption to the specified location(s). If a specific location needs to be specified, use the format "location:”. If a location group needs to be selected, use the format "tag:”. stack_discounting: type: boolean x-stoplight: id: vgcyndom3xq2v description: When stacking is set to true, this discount can be redeemed with any other discount that contains the same target item. If set to false, only one discount can be applied to the target item, even if multiple discounts are available. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. reuse_qualifying_items: type: boolean x-stoplight: id: nlw6bw79udofe description: When set to true, it allows qualifying item(s) to be reused when redeemed with other discounts that apply to the same item(s). When set to false, it restricts qualifying item(s) from being reused for multiple discounts. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. qualifying_expressions_operator: type: string x-stoplight: id: zhl3mem3g88kn description: 'Specifies how offer conditions in `item_qualifiers` are evaluated. Possible values: All, Any. The default value is "All". Use "All" when every condition must be met, or "Any" when satisfying at least one condition is sufficient.' item_filter_expressions_operator: type: string x-stoplight: id: 55psu44tsnb6d description: 'Specifies how offer conditions in `line_item_filters` are evaluated. Possible values: All, Any. The default value is "All". Use "All" when every condition must be met, or "Any" when satisfying at least one condition is sufficient.' discount_evaluation_strategy: type: string x-stoplight: id: 4bp3rh2ao6mbu description: 'Specifies whether the maximum or minimum discount should be applied when multiple conditions are met. Note: This parameter should be provided when `item_filter_expressions_operator` is set to Any. Possible values: Min, Max. The default value is "Min".' line_item_filters: $ref: '#/components/schemas/qc_line_item_filters_input' enable_menu_item_aggregator: type: boolean x-stoplight: id: a0i7wql9fvp37 description: Whether the system will combine (aggregate) multiple instances of the same menu item into one entry based on the attributes defined in `aggregator_grouping_attributes`. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. aggregator_grouping_attributes: $ref: '#/components/schemas/aggregator_grouping_attributes' item_qualifiers: $ref: '#/components/schemas/qc_item_qualifiers_input' receipt_qualifiers: $ref: '#/components/schemas/receipt_qualifiers' required: - external_id redeemable_data_output: title: Redeemable List Output (Object) x-stoplight: id: t61lenmp5uqwz type: object x-examples: [] properties: meta: $ref: '#/components/schemas/meta' data: type: array x-stoplight: id: ec1ri9dncp84y description: A list of redeemables items: x-stoplight: id: 2zahz3ebmckpk type: object properties: name: type: string x-stoplight: id: k09rslq64kf32 description: Name of the redeemable image: type: string x-stoplight: id: chogs4zmji0j3 description: URL of the image description: type: string x-stoplight: id: vcrhxc8st2hgv description: Description of the redeemable note: type: string x-stoplight: id: kqhsgagwc27ix description: An internal note provided by the business. This text is not visible in the app and is solely for the business to use internally to store information for future reference. allow_for_support_gifting: type: boolean x-stoplight: id: nvou63g2j70ap description: 'Indicates whether the redeemable is available for support gifting. Admins who have gifting permission will be able to gift this redeemable to guests for support purposes. Possible values: true, false' available_as_template: type: boolean x-stoplight: id: qx4jry2idts7f description: 'Indicates whether the redeemable is available for use as a template. If set to true, the redeemable can be reused and customized for creating new redeemables. Possible values: true, false' auto_applicable: type: boolean x-stoplight: id: jr50w0absakmc description: Indicates whether the offer (gifted and not tied to points) can be automatically redeemed without guest interaction. This is applicable for businesses with auto redemption enabled and for discount types defined in the Auto-Application strategy. start_time: type: string x-stoplight: id: 6nlkrgf3jzoty format: date-time description: Local date and time at which the offer starts end_time: type: string x-stoplight: id: 71qhw0kdu5huc format: date-time description: Local date and time at which the offer ends segment_definition_id: type: integer x-stoplight: id: g6ddjjvmpv9c5 description: ID of the segment as defined in the Punchh system. A value in the "punchh-segment-id" format is required in this parameter if `distributable` is set to true and `distributable_to_all_users` is set to false. This parameter is applicable when the business has enabled deals. timezone: type: string x-stoplight: id: mfk6z9x9dwj7f description: 'Valid time zone in which the offer is applicable or active. Possible values: Etc/GMT+12, Pacific/Pago_Pago, Pacific/Midway, Pacific/Honolulu, America/Juneau, America/Los_Angeles, America/Tijuana, America/Phoenix, America/Mazatlan, America/Denver, America/Guatemala, America/Chicago, America/Chihuahua, America/Mexico_City, America/Monterrey, America/Regina, America/Bogota, America/New_York, America/Indiana/Indianapolis, America/Lima, America/Halifax, America/Caracas, America/Guyana, America/La_Paz, America/Puerto_Rico, America/Santiago, America/St_Johns, America/Sao_Paulo, America/Argentina/Buenos_Aires, America/Montevideo, America/Godthab, Atlantic/South_Georgia, Atlantic/Azores, Atlantic/Cape_Verde, Europe/London, Europe/Lisbon, Africa/Monrovia, Etc/UTC, Europe/Amsterdam, Europe/Belgrade, Europe/Berlin, Europe/Zurich, Europe/Bratislava, Europe/Brussels, Europe/Budapest, Africa/Casablanca, Europe/Copenhagen, Europe/Dublin, Europe/Ljubljana, Europe/Madrid, Europe/Paris, Europe/Prague, Europe/Rome, Europe/Sarajevo, Europe/Skopje, Europe/Stockholm, Europe/Vienna, Europe/Warsaw, Africa/Algiers, Europe/Zagreb, Europe/Athens, Europe/Bucharest, Africa/Cairo, Africa/Harare, Europe/Helsinki, Asia/Jerusalem, Europe/Kaliningrad, Europe/Kiev, Africa/Johannesburg, Europe/Riga, Europe/Sofia, Europe/Tallinn, Europe/Vilnius, Asia/Baghdad, Europe/Istanbul, Asia/Kuwait, Europe/Minsk, Europe/Moscow, Africa/Nairobi, Asia/Riyadh, Europe/Volgograd, Asia/Tehran, Asia/Muscat, Asia/Baku, Asia/Tbilisi, Asia/Yerevan, Asia/Kabul, Asia/Almaty, Asia/Yekaterinburg, Asia/Karachi, Asia/Tashkent, Asia/Kolkata, Asia/Colombo, Asia/Kathmandu, Asia/Dhaka, Asia/Urumqi, Asia/Rangoon, Asia/Bangkok, Asia/Jakarta, Asia/Krasnoyarsk, Asia/Novosibirsk, Asia/Shanghai, Asia/Chongqing, Asia/Hong_Kong, Asia/Irkutsk, Asia/Kuala_Lumpur, Australia/Perth, Asia/Singapore, Asia/Taipei, Asia/Ulaanbaatar, Asia/Tokyo, Asia/Seoul, Asia/Yakutsk, Australia/Adelaide, Australia/Darwin, Australia/Brisbane, Australia/Melbourne, Pacific/Guam, Australia/Hobart, Pacific/Port_Moresby, Australia/Sydney, Asia/Vladivostok, Asia/Magadan, Pacific/Noumea, Pacific/Guadalcanal, Asia/Srednekolymsk, Pacific/Auckland, Pacific/Fiji, Asia/Kamchatka, Pacific/Majuro, Pacific/Chatham, Pacific/Tongatapu, Pacific/Apia, Pacific/Fakaofo' discount_channel: type: string x-stoplight: id: llo3t40qg98e0 description: 'Channels where this redeemable can be discounted. The value in this parameter is for informational purposes only and is not validated by Punchh. Third-party vendors can use this information to show/hide the redeemable on their platform. Possible values: all, online_only, offline_only. The default value is "all".' default: all points: type: integer x-stoplight: id: 5q23fkoa22jfj description: Number of points required to redeem the offer activate_now: type: boolean x-stoplight: id: zhl8p63egt1x5 description: 'Indicates whether the offer will be activated immediately. This applies when the `distributable` parameter for the offer is set to true, and the business has enabled deals. Possible values: true, false' applicable_as_loyalty_redemption: type: boolean x-stoplight: id: zf9q6cr9uqyk0 description: 'Indicates whether this redeemable is available for redemption using loyalty points. Possible values: true, false' indefinetely: type: boolean x-stoplight: id: n4n1ab3b6kzph description: 'Indicates whether the redeemable will be available indefinitely. If set to true, the offer will not expire. If set to false, you can specify the expiry period in the `expiry_days` parameter. Possible values: true, false' expiry_days: type: integer x-stoplight: id: 6n0gb7ay6p15l description: Number of days before the reward expires. If the value of this parameter is set to 5 and the reward is credited to a guest’s account before the day ends (i.e., 11:59 PM), that day will be counted as the first day of reward availability. The reward will then expire at 11:59 PM on the fifth day. remind_before: type: integer x-stoplight: id: qdznbozl10nwj description: Day(s) before the offer expires, as specified in expiry_days, when the system sends a reminder if the offer has not been used. expire_redemption_code_with_reward_end_date: type: boolean x-stoplight: id: rovf02mt1zj5x description: 'Indicates whether the redemption code expires on the reward''''s end date. Possible values: true, false' template: $ref: '#/components/schemas/redeemable_template' effective_location: type: string x-stoplight: id: pmeah3140682c description: A valid or existing location ID or location group ID. The default value is null. Restricts redemption to the specified location(s). The format for a specific location is "location:”, and the format for location group is “tag:”. lag_duration: $ref: '#/components/schemas/redeemable_lag_duration' recurrence_schedule: $ref: '#/components/schemas/redeemable_recurrence_schedule' meta_data: type: string x-stoplight: id: c2tpx51woub1p description: Custom information for the offer that the mobile app can use to implement specific filtering logic distributable: type: boolean x-stoplight: id: jth26495gqaar description: Indicates whether the redeemable will be available only for guests who validate their segments. This parameter is applicable when the business has enabled deals. alternate_locale_name: $ref: '#/components/schemas/redeemable_alternate_locale_name' alternate_locale_description: $ref: '#/components/schemas/redeemable_alternate_locale_description' external_id: type: string x-stoplight: id: zk4dmw9x196u9 description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id` either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' redemption_code_expiry_mins: type: integer x-stoplight: id: rkzhm73mydzlr description: Number of minutes before the redemption code attached to this redeemable expires distributable_to_all_users: type: boolean x-stoplight: id: lj520d2orzp9p description: Indicates whether the redeemable will be available to all loyalty guests. This parameter is applicable when the business has enabled deals. receipt_rule: x-stoplight: id: p9577xjpz6ive type: object description: Set of rules or conditions that determine how and when an offer can be redeemed properties: qualifier_type: type: string x-stoplight: id: jthruki0vsy3s description: 'Defines the criteria that apply to the processing of receipts, determining how the discount will be applied based on the items purchased. Possible values: * new: Indicates new qualification criteria are created for the offer to process the offer. If this option is chosen, the parameters in the `redeeming_criterion` object define the details of the new qualification criteria. * existing: Indicates existing qualification criteria are used to process the offer. The UUID of the chosen existing qualification criteria is specified in `redeeming_criterion_id`. * flat_discount: Indicates a fixed discount is set for the offer that will be applied to the receipt regardless of the items or total amount on the receipt (e.g., $50 off or 10% off). The discount value is specified in the ''discount_amount'' parameter.' redeeming_criterion_id: type: string x-stoplight: id: rk6kqlpblc5hr description: UUID of the qualification criteria you want to attach to the offer. The QC UUID is provided in the `external_id` response parameter when you create qualification criteria using [Create Qualification Criteria](/docs/dev-portal-platform-functions/009524a9d88ae-create-qualification-criteria-qc) API. A value is required for this parameter, when `qualifier_type is set to "existing". discount_amount: type: number x-stoplight: id: opdtza7f8b6bw format: float description: Fixed discount set for the offer that will be applied to the receipt regardless of the items or total amount on the receipt (e.g., $50 off or 10% off). A value is required for this parameter when `qualifier_type is "discount". redeeming_criterion: type: object x-stoplight: id: 3k6d07x56igzg description: This object contains information about the qualification criteria attached to the redeemable. properties: name: type: string x-stoplight: id: spjdlvk92siax description: Name of the qualification criteria (QC) minLength: 0 maxLength: 255 external_id: type: string x-stoplight: id: fk8q4my62v8r9 description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id` either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' amount_cap: type: number x-stoplight: id: 15xm7hatk1rkl description: Maximum amount that can be earned/redeemed on any receipt format: float percentage_of_processed_amount: type: number x-stoplight: id: zqmx32ncsz8de format: float description: Percentage of processed amount that can be earned/redeemed on any receipt qc_processing_function: type: string x-stoplight: id: kq1ob5yx3e0g3 description: "Function applied on filtered menu items of the receipt. Processing functions return a processed value that governs discounting and earning depending on where the qualification criterion is attached. If it is applied in a discounting scenario, the processed value controls the discount amount. If it is applied in an earning scenario (e.g., a rewards program), the processed value controls how much is earned (such as reward points). \n\nPossible values: hit_target_price, rate_rollback, bundle_price_target, bundle_price_target_advanced, hit_target_price_max_price_once, hit_target_price_min_price_once, sum_amounts_incremental, static_amount, receipt_subtotal, bogof, bogof2, sum_amounts, receipt_total_amount, sum_qty\n\nFor more information on possible values, see the [Processing Functions]( https://support.punchh.com/s/article/Processing-Functions) article on the Punchh Support Portal.\n\nNote: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions [here](https://support.punchh.com/s/article/How-do-I-access-the-Punchh-Support-Portal-Single-Sign-On) to access the Punchh Support Portal." rounding_rule: type: string x-stoplight: id: 7i4vuebgksdok description: "If the processing function returns a float value, it will be rounded according to the chosen rounding rule. If no rule is selected, the float value will be used as is. A value is required to be sent in the parameter depending on the processing function selected. Possible values: \n* round: This rule rounds the float value to the nearest integer. If the decimal part is 0.5 or higher, the value is rounded up. If the decimal part is less than 0.5, the value is rounded down. For example, 4.3 becomes 4, and 4.7 becomes 5.\n* ceil: This rule rounds the float value up to the next highest integer, regardless of the decimal part. For example, 4.3 becomes 5.\n* floor: This rule rounds the float value down to the next lowest integer, regardless of the decimal part. For example, 4.3 becomes 4." max_discount_units: type: integer x-stoplight: id: p8uikbdbo6vze description: This value limits the number of units that can be discounted. It works only with specific `qc_processing_function` types, such as rate_rollback, bundle_price_target, bundle_price_target_advanced, and sum_amounts_incremental. unit_discount: type: integer x-stoplight: id: lrq73jo6zoaop description: Discount to be applied to the rate of the selected items chosen for the offer or promotion. The discount is based on a specific rate (e.g., per unit of item - per gallon, per liter, etc.). For example, for a fuel discount of 20 cents per gallon, you need to specify the discount in a decimal format (i.e, 0.2) to reflect a 20-cent reduction for each gallon of fuel. If the qualification criteria are attached to a subscription plan, the value of the unit discount will be picked up from the subscription plan, and even though you are required to enter a value for the discount (e.g., 0.2 for 20 cents), this value will be ignored if the qualification criteria are part of a subscription plan, because the discount will be controlled by the subscription plan's settings instead. The value should be greater than or equal to 0.01 and less than or equal to 99999 if the processing method (`qc_processing_function`) is rate_rollback. A value is required to be sent in the parameter depending on the processing function selected. minimum_unit_rate: type: number x-stoplight: id: 4wimxxwag80dw description: Minimum unit price threshold. After applying the discount, the minimum unit rate should not be below this amount. target_price: type: - number x-stoplight: id: 3rtevu2q3ylki description: Discount selected menu items to achieve this target unit price. For example, if locations sell a burger for variable pricing, a target unit price is achieved by using the appropriate processing function, and this target price works only with a specific `qc_processing_function`. If a burger is sold at different prices at different locations (e.g., one location sells it for $10, another for $12), you can set a target price (e.g., $9) to standardize the price across locations. The system applies discounts to bring the price down to $9, no matter what the original price was. effective_location: type: string x-stoplight: id: 7xsva58swiaut description: A valid or existing location ID or location group ID. The default value is null. Restricts redemption to the specified location(s). The format for a specific location is "location:”, and the format for location group is “tag:”. stack_discounting: type: boolean x-stoplight: id: 2c67ao7rf5gl3 description: When stacking is set to true, this discount can be redeemed with any other discount that contains the same target item. If set to false, only one discount can be applied to the target item, even if multiple discounts are available. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. reuse_qualifying_items: type: boolean x-stoplight: id: gslykziz7j2ek description: When set to true, it allows qualifying item(s) to be reused when redeemed with other discounts that apply to the same item(s). When set to false, it restricts qualifying item(s) from being reused for multiple discounts. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. line_item_filters: type: array x-stoplight: id: fjr4qdtlhkzif items: x-stoplight: id: xeaqvfhrvdvwv type: object properties: quantity: type: string x-stoplight: id: f2wsbfyqwy87d description: 'Specifies how many units of a particular item will be selected or filtered for processing. A value is required if the processing function is selected as `min_price` or `max_price`. If you apply a filter on certain items and specify the quantity, the system will only process the selected number of units for that item. For example, if the quantity is set to 3, only 3 units of the item will be included in the filter or discount. The quantity value must adhere to certain rules: * The value of quantity must be a whole number. * The quantity cannot be negative. * You must have at least 1 unit of the item. * You can select up to 5 units of an item.' processing_method: type: string x-stoplight: id: eevuqhgpqy5uu description: 'The processing method for a line item filter determines how the selected items are handled when applying a discount. The system will skip the line item filter if the value of processing_method is invalid. The available processing methods are: * max_price: Applies the discount to the item with the highest price. * min_price: Applies the discount to the item with the lowest price. * exclude: Excludes the selected items from the discount. * sum_of_amount (default): Applies the discount based on the total sum of the selected items'' prices.' line_item_selector: $ref: '#/components/schemas/qc_line_item_selector' item_qualifiers: $ref: '#/components/schemas/item_qualifiers' receipt_qualifiers: $ref: '#/components/schemas/receipt_qualifiers' enable_menu_item_aggregator: type: boolean x-stoplight: id: vqrfqgzg4ze4i description: Whether the system will combine (aggregate) multiple instances of the same menu item into one entry based on the attributes defined in `aggregator_grouping_attributes`. "Y", "YES", "1", "TRUE", and "ON" (case-insensitive) are treated as true. Any other values are considered false. aggregator_grouping_attributes: $ref: '#/components/schemas/aggregator_grouping_attributes' required: - timezone redeemable_data_input: title: Redeemable Input (Object) x-stoplight: id: py6v9pco9txg3 type: object properties: data: type: array x-stoplight: id: nttkj2ju991hq description: 'A list of redeemables that needs to be created ' items: x-stoplight: id: eoav6ju4ony0e type: object properties: name: type: string x-stoplight: id: dhp1ab2v5jqc8 description: Name of the redeemable external_id: type: string x-stoplight: id: on1fi68g1fhnl description: 'A unique identifier (UUID) sent by the external system to track whether a particular entity is successfully created in the Punchh system. It serves as a primary key for the external system. If no `external_id` is provided, the Punchh system will automatically generate a default `external_id` either as a 40-character hexadecimal string or as a 36-character UUID. For example: * Alphanumeric hexadecimal with length 40: 875a6a33ed0f2410d8ac671c2d07c9351ca2f88e' alternate_locale_name: $ref: '#/components/schemas/redeemable_alternate_locale_name' alternate_locale_description: $ref: '#/components/schemas/redeemable_alternate_locale_description' description: type: string x-stoplight: id: 9g7xc3m4c5ct5 description: Description of the redeemable note: type: string x-stoplight: id: 4kyfgwknzl2iq description: An internal note provided by the business. This text is not visible in the app and is solely for the business to use internally to store information for future reference. allow_for_support_gifting: type: boolean x-stoplight: id: wwwiin82pahcl description: 'Indicates whether the redeemable is available for support gifting. Admins who have gifting permission will be able to gift this redeemable to guests for support purposes. Possible values: true, false' available_as_template: type: boolean x-stoplight: id: ukmib5x5s8x7p description: 'Indicates whether the redeemable is available for use as a template. If set to true, the redeemable can be reused and customized for creating new redeemables. Possible values: true, false' distributable: type: boolean x-stoplight: id: 1ywcatnlys4ne description: Indicates whether the redeemable will be available only for guests who validate their segments. This parameter is applicable when the business has enabled deals. distributable_to_all_users: type: boolean x-stoplight: id: cr976gvfywelx description: Indicates whether the redeemable will be available to all loyalty guests. This parameter is applicable when the business has enabled deals. segment_definition_id: type: integer x-stoplight: id: jg9uh12b3tf04 description: ID of the segment as defined in the Punchh system. A value in the "punchh-segment-id" format is required in this parameter if `distributable` is set to true and `distributable_to_all_users` is set to false. This parameter is applicable when the business has enabled deals. auto_applicable: type: boolean x-stoplight: id: cwsnod7d1u9io description: Indicates whether the offer (gifted and not tied to points) can be automatically redeemed without guest interaction. This is applicable for businesses with auto redemption enabled and for discount types defined in the Auto-Application strategy. receipt_rule: type: object x-stoplight: id: e4go768zliuup description: Set of rules or conditions that determine how and when an offer can be redeemed required: - qualifier_type - redeeming_criterion properties: qualifier_type: type: string x-stoplight: id: 8iwze6rf494wr description: "Defines the criteria that apply to the processing of receipts, determining how the discount will be applied based on the items purchased. Possible values:\n* new: Specify new if you want to create new qualification criteria to process the offer. If you choose this option, use the parameters in the `redeeming_criterion` object to create a new qualification criteria.\n* existing: Specify existing if you're going to use an existing qualification criteria to process the offer. The UUID of the existing qualification criteria should be specified in the `redeeming_criterion_id` parameter. \n* flat_discount: Specify flat_discount to set a fixed discount for the offer regardless of the items or total amount on the receipt. For example, $50 off or 10% off. The discount value should be specified in the `discount_amount` parameter." redeeming_criterion_id: type: string x-stoplight: id: 2oumywxdun122 description: UUID of the qualification criteria you want to attach to the offer. The QC UUID is provided in the `external_id` response parameter when you create qualification criteria using the [Create Qualification Criteria](/docs/dev-portal-platform-functions/009524a9d88ae-create-qualification-criteria-qc) API. A value is required for this parameter when `qualifier_type` is "existing". discount_amount: type: number x-stoplight: id: hsax2zubl1mvv description: Fixed discount set for the offer that will be applied to the receipt regardless of the items or total amount on the receipt (e.g., $50 off or 10% off). A positive value is required for this parameter when `qualifier_type` is "discount". format: float redeeming_criterion: $ref: '#/components/schemas/redeemable_redeeming_criterion' activate_now: type: boolean x-stoplight: id: jafcdzcpiczlx description: 'Indicates whether the offer will be activated immediately. This applies when the `distributable` parameter for the offer is set to true, and the business has enabled deals. Possible values: true, false' start_time: type: string x-stoplight: id: 8rwolvqehscj6 format: date-time description: Local date and time at which the offer starts end_time: type: string x-stoplight: id: 40mlgs55b1679 description: Local date and time at which the offer ends indefinetely: type: boolean x-stoplight: id: 57whtvdh9nhvj description: 'Indicates whether the redeemable will be available indefinitely. If set to true, the offer will not expire. If set to false, you can specify the expiry period in the `expiry_days` parameter. Possible values: true, false' expiry_days: type: integer x-stoplight: id: orp6tb0zslwq3 description: Number of days before the reward expires. If the value of this parameter is set to 5 and the reward is credited to a guest’s account before the day ends (i.e., 11:59 PM), that day will be counted as the first day of reward availability. The reward will then expire at 11:59 PM on the fifth day. timezone: type: string x-stoplight: id: lcqztohmx2jsh description: 'Valid time zone in which the offer is applicable or active. Possible values: Etc/GMT+12, Pacific/Pago_Pago, Pacific/Midway, Pacific/Honolulu, America/Juneau, America/Los_Angeles, America/Tijuana, America/Phoenix, America/Mazatlan, America/Denver, America/Guatemala, America/Chicago, America/Chihuahua, America/Mexico_City, America/Monterrey, America/Regina, America/Bogota, America/New_York, America/Indiana/Indianapolis, America/Lima, America/Halifax, America/Caracas, America/Guyana, America/La_Paz, America/Puerto_Rico, America/Santiago, America/St_Johns, America/Sao_Paulo, America/Argentina/Buenos_Aires, America/Montevideo, America/Godthab, Atlantic/South_Georgia, Atlantic/Azores, Atlantic/Cape_Verde, Europe/London, Europe/Lisbon, Africa/Monrovia, Etc/UTC, Europe/Amsterdam, Europe/Belgrade, Europe/Berlin, Europe/Zurich, Europe/Bratislava, Europe/Brussels, Europe/Budapest, Africa/Casablanca, Europe/Copenhagen, Europe/Dublin, Europe/Ljubljana, Europe/Madrid, Europe/Paris, Europe/Prague, Europe/Rome, Europe/Sarajevo, Europe/Skopje, Europe/Stockholm, Europe/Vienna, Europe/Warsaw, Africa/Algiers, Europe/Zagreb, Europe/Athens, Europe/Bucharest, Africa/Cairo, Africa/Harare, Europe/Helsinki, Asia/Jerusalem, Europe/Kaliningrad, Europe/Kiev, Africa/Johannesburg, Europe/Riga, Europe/Sofia, Europe/Tallinn, Europe/Vilnius, Asia/Baghdad, Europe/Istanbul, Asia/Kuwait, Europe/Minsk, Europe/Moscow, Africa/Nairobi, Asia/Riyadh, Europe/Volgograd, Asia/Tehran, Asia/Muscat, Asia/Baku, Asia/Tbilisi, Asia/Yerevan, Asia/Kabul, Asia/Almaty, Asia/Yekaterinburg, Asia/Karachi, Asia/Tashkent, Asia/Kolkata, Asia/Colombo, Asia/Kathmandu, Asia/Dhaka, Asia/Urumqi, Asia/Rangoon, Asia/Bangkok, Asia/Jakarta, Asia/Krasnoyarsk, Asia/Novosibirsk, Asia/Shanghai, Asia/Chongqing, Asia/Hong_Kong, Asia/Irkutsk, Asia/Kuala_Lumpur, Australia/Perth, Asia/Singapore, Asia/Taipei, Asia/Ulaanbaatar, Asia/Tokyo, Asia/Seoul, Asia/Yakutsk, Australia/Adelaide, Australia/Darwin, Australia/Brisbane, Australia/Melbourne, Pacific/Guam, Australia/Hobart, Pacific/Port_Moresby, Australia/Sydney, Asia/Vladivostok, Asia/Magadan, Pacific/Noumea, Pacific/Guadalcanal, Asia/Srednekolymsk, Pacific/Auckland, Pacific/Fiji, Asia/Kamchatka, Pacific/Majuro, Pacific/Chatham, Pacific/Tongatapu, Pacific/Apia, Pacific/Fakaofo' remind_before: type: integer x-stoplight: id: hflasli2nhjiu description: Day(s) before the offer expires, as specified in expiry_days, when the system sends a reminder if the offer has not been used discount_channel: type: string x-stoplight: id: crt1xpyf0hjdm description: 'Channels where this redeemable can be discounted. The value of this parameter is for informational purposes only and is not validated by Punchh. Third-party vendors can use this information to show/hide the redeemable on their platform. Possible values: all, online_only, offline_only. The default value is "all".' default: all points: type: integer x-stoplight: id: rfr7tjv089bwv description: Number of points required to redeem the offer redemption_code_expiry_mins: type: integer x-stoplight: id: n8sh4g00qgwn3 description: Number of minutes before the redemption code attached to this redeemable expires applicable_as_loyalty_redemption: type: boolean x-stoplight: id: qypwkih83qkqg description: 'Indicates whether this redeemable is available for redemption using loyalty points. Possible values: true, false' expire_redemption_code_with_reward_end_date: type: boolean x-stoplight: id: i4ixpihm4qe4n description: 'Indicates whether the redemption code expires on the reward''s end date. Possible values: true, false' template: $ref: '#/components/schemas/redeemable_template' lag_duration: $ref: '#/components/schemas/redeemable_lag_duration' recurrence_schedule: $ref: '#/components/schemas/redeemable_recurrence_schedule' effective_location: type: string x-stoplight: id: 7puasc43k08ca description: A valid or existing location ID or location group ID. The default value is null. Restricts redemption to the specified location(s). If a specific location needs to be specified, use the format "location:”. If a location group needs to be selected, use the format "tag:”. meta_data: type: string x-stoplight: id: x7g87ozg95mqi description: Custom information for the offer that the mobile app can use to implement specific filtering logic required: - name - external_id - receipt_rule required: - data redeemable_recurrence_schedule: title: Recurrence Schedule (Object) x-stoplight: id: oydu0pldcbie3 type: object description: Specifies how many times this redeemable should be awarded to the guest, along with the frequency properties: occurrences: type: integer x-stoplight: id: w5kr0ilaghndd description: The number of times the redeemable should be awarded to the guest, based on the recurrence interval defined. For example, if set to 2, the guest will receive the reward twice, once for each occurrence as defined by the schedule (e.g., once every 2 days). days_distance: type: integer x-stoplight: id: a6o1rjybs8wgz description: Defines the number of days after which the redeemable will be repeated. For example, if set to 2, the redeemable will be awarded again every 2 days. The recurrence days must be between 1 and 395. The total duration for recurrences cannot be greater than 13 months. For example, if the recurrence is set to 3 times every 90 days, the recurrence will be at Day 1, Day 90, and Day 180. However, if the recurrence is set to 6 times every 90 days, then recurrence would be at Day 1, Day 90, Day 180, Day 270, Day 360, and Day 450. This setup would result in an error message appearing in the platform as the total recurrence days are greater than 395 days. redeemable_results: title: Redeemable - Results (Array Object) x-stoplight: id: cqx3e81tlhtjw type: object properties: results: type: array x-stoplight: id: 58e86waoolby5 description: List of responses indicating if the entity is created or not items: x-stoplight: id: 18861zl3h5rt8 type: object properties: external_id: type: string x-stoplight: id: jit72m5gic8m4 description: Unique ID (UUID) sent by the external system to track if a particular entity is successfully updated in the Punchh system success: type: boolean x-stoplight: id: ymigj11x9qy4s description: 'Status of a specific entity created in the system. Possible values: true, false' errors: type: array x-stoplight: id: qdlanb08obe11 description: A list of error messages explaining why a specific entity is not created in the system items: x-stoplight: id: 40tjnhdcesv8p type: string warnings: type: object x-stoplight: id: 8o6vsbyxhopnh description: A list of warning messages indicating potential issues found when the redeemable is created or updated. These warnings do not prevent the redeemable from being created or updated but may require attention. These warnings were ignored as they did not trigger any validation errors. properties: receipt_rule: type: object x-stoplight: id: wuedblap730vk description: List of warnings generated due to validation errors for `receipt_rule` properties: redeeming_criterion: type: object x-stoplight: id: 5k4bgay4a2tbc description: List of warnings generated due to validation errors for `redeeming_criterion` properties: line_item_filters: $ref: '#/components/schemas/warnings_line_item_filters' item_qualifiers: $ref: '#/components/schemas/warnings_item_qualifiers' receipt_qualifiers: $ref: '#/components/schemas/warnings_receipt_qualifiers' qualifying_expressions_operator: $ref: '#/components/schemas/warnings_qualifying_expressions_operator' item_filter_expressions_operator: $ref: '#/components/schemas/warnings_item_filter_expressions_operator' discount_evaluation_strategy: $ref: '#/components/schemas/warnings_discount_evaluation_strategy' responses: 401-unauthorized: description: 'Unauthorized - A business admin key is missing or invalid. A request header in the following format is needed to make the request: Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' content: application/json: schema: type: object properties: error: type: string examples: default: value: error: You need to sign in or sign up before continuing. '401': description: Unauthorized - User not authenticated or created content: application/json: schema: type: object properties: error: type: string x-stoplight: id: rnkpi6hfoveqy examples: User not authenticated or created: value: error: You need to sign in or sign up before continuing. '400': description: Bad Request - Required parameter missing or empty content: application/json: schema: type: object properties: error: type: string x-stoplight: id: xtdcx8losb5tq examples: Required parameter missing or empty: value: error: 'Required parameter missing or the value is empty: data' '403': description: Forbidden - Functionality not available content: application/json: schema: type: object properties: error: type: string x-stoplight: id: un1ov0n2c1o1w examples: Functionality not available: value: error: Sorry, this functionality is not available. Please contact support@punchh.com to enable this. x-refined-from: - punchh-mobile-redemptions-legacy-openapi.yml - punchh-mobile-redemptions-v2-openapi.yml - punchh-mobile-subscription-openapi.yml - punchh-platform-functions-headless-offers-openapi.yml - punchh-platform-functions-offers-ingestion-openapi.yml - punchh-platform-functions-subscription-openapi.yml x-stoplight: id: bf6eddb435209 x-ext-urls: {}