Discount Object
A discount contains the following information:Discount Types
Discount Statuses
Listing Discounts
Retrieve all discounts for your store:Query Parameters
Filtering Examples
Example Response
Getting a Single Discount
Retrieve a specific discount by its public ID:Applying Discounts at Checkout
Use a discount code when initiating checkout:Discount Restrictions
Discounts can have various restrictions:Usage Limits
Usage Limits
Limit how many times a discount can be used:When
usage_count reaches usage_limit, the discount becomes invalid.Date Restrictions
Date Restrictions
Set start and end dates for the discount:The discount is only valid between these dates.
Product Restrictions
Product Restrictions
Limit the discount to specific products:If
products is empty, the discount applies to all products.Customer Restrictions
Customer Restrictions
Limit the discount to a specific customer:Only the specified customer can use this discount.
Discount Validation
When applying a discount at checkout, it’s automatically validated against these criteria:- Status - Must be
active - Date range - Current date must be within
start_dateandend_date(if specified) - Usage limit -
usage_countmust not have reachedusage_limit(if specified) - Product eligibility - Product must be in the
productsarray (if not empty, applies to all products) - Customer eligibility - Customer email must match
customer_email(if specified)
expired when:
- The
end_datehas passed - The current date is before
start_date - The
usage_limithas been reached
Common Use Cases
Promotional Campaigns
Promotional Campaigns
Track discount performance for marketing campaigns:
Affiliate Codes
Affiliate Codes
Create unique discount codes for affiliates and track usage:
VIP Customers
VIP Customers
Create single-use discounts for VIP customers:
Related Resources
Checkout Guide
Apply discounts during checkout
Discounts API
View the complete Discounts API reference