| Previous Topic | Next Topic |
|---|---|
| Online Ordering Module 5b: Manage Items in the Discount Basket (Redemptions 2.0) | Online Ordering Module 5d: Process/Create a Batch Redemption (Redemptions 2.0) |
Online Ordering API Certification Tutorial - Module 5c: Get the Active Discount Basket (Redemptions 2.0)
Goal
Redemptions 2.0 - Get a list of discounts that have been selected by a guest.
Prerequisites
You must have read the Online Ordering Module 5b: Manage Items in the Discount Basket tutorial.
Use Cases and Context
With Redemptions 2.0, only one active discount basket will be associated with a guest at a time. The Get Active Discount Basket API retrieves a list of discount details that have been selected by the guest. 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 of the Add Selection to Discount Basket API.
Applicable API Endpoints
| Endpoint Name/Path | Relevant Request Parameters | Relevant Response Parameters |
| Get Active Discount Basket GET {server-name}/api/auth/discounts/active |
client access_token |
redemption_ref locked These parameters under the discount_basket_items object list the attributes of each discount in the active discount basket: - discount_type - discount_id - discount_value - discount_basket_item_id - created_at - discount_details object |
Workflow
The Get Active Discount Basket API call returns a detailed list of discount basket items that have been selected by the guest. For each item in the discount basket, the discount_details response parameter includes information such as the item ID, item name, number of points, etc. A unique ID associated with the discount basket is stored in the redemption_ref parameter in the API response. Save this in your system for future reference. You will need the redemption_ref if you want to void the discount basket.
Related Topics
Redemptions 2.0 Online Ordering API - Overview