Create Discount
Discounts
Create Discount
Create a new discount code
POST
Create Discount
Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
Create Discount
Creates a new discount code in the store.Request
Body Parameters
Unique discount code (case-insensitive, alphanumeric and dashes only)
Internal title/description for the discount
Discount type:
percentage, fixed_amount, free_shipping, buy_x_get_yDiscount value. For
percentage, enter 20 for 20%. For fixed_amount, enter amount in cents (2000 for $20.00).Maximum number of times the discount can be used (null for unlimited)
Limit to one use per customer
Minimum order amount in cents (null for no minimum)
Minimum quantity of items required (null for no minimum)
What the discount applies to:
all, specific_products, specific_collectionsArray of product IDs (required when applies_to is
specific_products)Array of collection IDs (required when applies_to is
specific_collections)Who can use:
all, specific_customers, specific_segmentsArray of customer IDs (required when customer_eligibility is
specific_customers)Start date (ISO 8601). Defaults to now if not provided.
End date (ISO 8601). Null for no expiration.
Whether this discount can be combined with product-level discounts
Whether this discount can be combined with shipping discounts
Response
Whether the request succeeded
The created discount object
Example Response
Buy X Get Y Example
Create a “Buy 2 Get 1 Free” discount:Error Codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing access token |
FORBIDDEN | App doesn’t have write_discounts scope |
VALIDATION_ERROR | Invalid request body (see error details) |
DUPLICATE_CODE | A discount with this code already exists |