Overview
The Offers API provides access to active promotional campaigns that can be applied to products or orders. Offers support various discount types and can be configured with specific eligibility conditions based on customers, products, categories, or order values.Offer System
Offer Types
Offers can be applied at two different levels:- Product-level offers: Apply to specific products or categories and are automatically applied for eligible products and customers
- Order-level offers: Apply to the entire order and are applied at checkout
Discount Types
Offers support the following discount types:- Percentage: A certain percentage off the price (e.g., 15% off)
- Fixed: A fixed amount off the price (e.g., $10 off)
Offer Conditions
Offers can have multiple conditions that determine when they can be applied:Customer Group Conditions
- All Customers: Offer is available to everyone
- First Time Buyers: Restricted to customers making their first purchase
Product Conditions (Product-level offers only)
- Specific Products: Offer applies only to selected products
- Specific Categories: Offer applies to all products in selected categories
Order Conditions (Order-level offers only)
- Minimum Order Value: Order subtotal must meet or exceed the specified amount
Voucher Requirements
Offers can optionally require a voucher code for redemption. Whenrequires_voucher is true, customers must provide a valid voucher code to apply the offer.
Discount Limits
Each offer has amax_discount_allowed that caps the total discount amount that can be given across all uses of the offer. The total_discount_offered tracks how much discount has been applied so far.
Get Offers
Retrieves all active offers. Returns offers that are currently within their validity period and haveis_active set to true.
Response
Unique identifier for the offer
Display name of the offer
ID of the store this offer is linked to (null if applicable to all stores)
Type of offer:
product for product-level or order for order-levelType of discount:
percentage or fixedThe discount amount (percentage value for percentage discounts, monetary amount for fixed discounts)
Whether a voucher code is required to redeem this offer
Total discount amount that has been applied using this offer
Maximum total discount that can be given across all uses of this offer
Start date and time when the offer becomes active
End date and time when the offer expires
Whether the offer is currently active
Timestamp when the offer was created
Timestamp when the offer was last updated
Array of customer IDs who have claimed this offer
Array of condition objects that define eligibility criteria
Array of voucher objects associated with this offer
Response Example
Offer Validation Logic
When an offer is applied (either automatically for product-level offers or via voucher for order-level offers), the system validates:- Time Period: Offer must be active and within its validity period (
valid_fromtovalid_to) - Customer Eligibility: Customer must meet any customer group conditions
- Product/Category Eligibility: For product-level offers, the product must be in the eligible products or categories
- Order Value: For order-level offers, the order subtotal must meet the minimum order value requirement
- Voucher Validity: If a voucher is required, it must be valid and within usage limits
- Discount Limit: The offer must not have exceeded its
max_discount_allowed
Related Endpoints
- Vouchers - Apply and manage voucher codes