| Previous Topic | Next Topic |
|---|---|
| POS Module 6b: Process an Auto-Redemption (Redemptions 2.0) | POS Module 6d: Manage Items in the Discount Basket (Redemptions 2.0) |
POS API Certification Tutorial - Module 6c: Look up Discounts (Redemptions 2.0)
Goal
Redemptions 2.0 - Look up a guest's available discount(s) in the loyalty account.
Prerequisites
You must have read the Module 6a: Find a User and Module 6b: Process an Auto-Redemption tutorials.
Use Cases and Context
You can use the Discount Look-up API to look up a guest's available discount(s) in the loyalty account, per the guest’s user ID, enabling evaluation of the guest’s discount basket against the receipt to verify the applicability of the discount(s) if needed.
Note: Only one active basket will be associated with the guest at a time.
Applicable API Endpoints
| Endpoint Name/Path | Relevant Request Parameters | Relevant Response Parameters |
| Discount Look-up POST {server-name}/api/pos/discounts/lookup |
user_id subtotal_amount transaction_no receipt_amount receipt_datetime The parameters under the line_items object: - item_name - item_qty - amount - item_type - item_id - item_family - item_group - serial_number external_uid (used for discount basket locking) |
redemption_id redemption_type qualified discount_type discount_id discount_value discount_amount discount_basket_item_id discount_details object selected_discounts object unselected_discounts object These parameters under the qualified_items object show the menu items to which the offer(s) can be applied: - item_name - item_qty - amount - item_type - item_id - item_family - item_group - serial_number |
Workflow
The Discount Look-up API returns the following:
- The
selected_discountsarray object in the API response includes any pre-selected discount items selected using the mobile app and the Add Selection to Discount Basket API. If the business is configured for auto-redemption, theselected_discountsobject will contain all available discounts for the user. If no discount items are pre-selected, the API returns an emptyselected_discountsobject. - The
unselected_discountsarray object in the API response includes any discount items that are available in the user account but not yet added to the discount basket. - The discount basket in the API response indicates which discounts in the basket are applicable and which do not apply to the check items.
Best Practices
We do not recommend sending the D (discount), T (tax), and P (payment) values in the item_type request parameter for Redemptions 2.0 API calls. Instead, send them in check-in API calls, such as Create Loyalty Check-in and Receipt Details.
For example, if a business offers a $2 discount on a $10 burger, send the burger as $8 ($10 - $2) in the API request. Send the discount as a line item in the Check-in API call.
If you must send D, T, and P menu item types, you must configure an exclusion qualification criterion (QC) for the offer in the Punchh platform. Create an exclusion filter using item types D, T, and P to ensure they are properly excluded. See the Qualification Criteria 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 to access the Punchh Support Portal.
Related Topics
Redemptions 2.0 POS API - Overview
Batch Redemption Process API - POS
Discount Basket Locking Developer Guide (Developer portal login required)