Previous Topic Next Topic
POS Module 6c: Look up Discounts (Redemptions 2.0) POS Module 6e: Process/Create a Batch Redemption (Redemptions 2.0)

POS API Certification Tutorial - Module 6d: Manage Items in the Discount Basket (Redemptions 2.0)

Goal

Redemptions 2.0 - Add items to or remove items from a guest’s discount basket.

Prerequisites

You must have read the Module 6a: Find a User, Module 6b: Process an Auto-Redemption, and Module 6c: Look up Discounts tutorials.

Use Cases and Context

There are two POS API endpoints for managing items in the discount basket: Add Selection to Discount Basket and Remove Item From Discount Basket. A guest can add a discount to the basket, if not already selected. The items in the discount basket can be updated as needed via the add/remove discount API calls. Removing items from the discount basket should be done when the guest chooses to remove a discount or when the Possible Redemptions call shows a discount under failures.

The discount basket extends past the initial session, so if the customer decides to leave a discount basket mid-transaction, the developer must decide whether to purge the cart after the web/app session ends or allow it to be recovered/displayed when the user returns to the UI. If purging the cart, the developer must iterate through and call the Remove Item From Discount Basket API until the discount basket is empty.

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
Add Selection to Discount Basket
POST {server-name}/api/pos/discounts/select
user_id

These parameters under the discount_basket_items_attributes object define each discount that will be added to the discount basket:
- discount_type
- discount_id
- discount_value
redemption_ref
locked

These parameters under the discount_basket_items object list the attributes of each discount added to the discount basket:
- discount_type
- discount_id
- discount_value
- discount_basket_item_id
- created_at
- discount_details object
Remove Item From Discount Basket
DELETE {server-name}/api/pos/discounts/unselect
user_id
discount_basket_item_ids
locked

These parameters under the discount_basket_items object list the attributes of each discount added to the discount basket:
- discount_type
- discount_id
- discount_value
- discount_basket_item_id
- created_at
- discount_details object

Workflow

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 of the Add Selection to Discount Basket API.

The value of the discount_basket_item_id parameter returned in the response of the Add Selection to Discount Basket API is specific and unique to that basket. Save this value in your system for future reference. You will need this value if you want to remove the item from the discount basket.

Redemptions 2.0 POS API - Overview

Add Selection to Discount Basket API - POS

Remove Item From Discount Basket API - POS

Discount Look-up API - POS

Auto Redemption API - POS

Batch Redemption Process API - POS

Void Redemption API - POS

Punchh Offers and Program Types