Get Discount
curl --request GET \
--url https://api.launchmystore.io/api/v1/discounts/{id}.json \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"id": "<string>",
"code": "<string>",
"title": "<string>",
"type": "<string>",
"value": 123,
"value_type": "<string>",
"status": "<string>",
"usage_count": 123,
"usage_limit": 123,
"once_per_customer": true,
"minimum_order_amount": 123,
"minimum_quantity": 123,
"applies_to": "<string>",
"product_ids": [
{}
],
"collection_ids": [
{}
],
"customer_eligibility": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}Discounts
Get Discount
Retrieve a single discount code
GET
/
api
/
v1
/
discounts
/
{id}
.json
Get Discount
curl --request GET \
--url https://api.launchmystore.io/api/v1/discounts/{id}.json \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"id": "<string>",
"code": "<string>",
"title": "<string>",
"type": "<string>",
"value": 123,
"value_type": "<string>",
"status": "<string>",
"usage_count": 123,
"usage_limit": 123,
"once_per_customer": true,
"minimum_order_amount": 123,
"minimum_quantity": 123,
"applies_to": "<string>",
"product_ids": [
{}
],
"collection_ids": [
{}
],
"customer_eligibility": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}Get Discount
Returns a single discount code by its ID.Request
curl -X GET "https://api.launchmystore.io/api/v1/discounts/disc_abc123.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Path Parameters
The unique discount ID
Response
Whether the request succeeded
Discount object
Show Discount Object
Show Discount Object
Unique discount ID
Discount code
Internal title/description
Discount type:
percentage, fixed_amount, free_shipping, buy_x_get_yDiscount value
Value type:
percentage, fixed_amountCurrent status:
active, expired, scheduled, disabledNumber of times used
Maximum uses (null for unlimited)
Whether limited to one use per customer
Minimum order amount in cents (null for no minimum)
Minimum quantity of items (null for no minimum)
What the discount applies to:
all, specific_products, specific_collectionsArray of product IDs (when applies_to is
specific_products)Array of collection IDs (when applies_to is
specific_collections)Who can use:
all, specific_customers, specific_segmentsStart date (ISO 8601)
End date (ISO 8601)
Creation timestamp
Last update timestamp
Example Response
{
"success": true,
"data": {
"id": "disc_abc123",
"code": "SUMMER20",
"title": "Summer Sale 20% Off",
"type": "percentage",
"value": 20,
"value_type": "percentage",
"status": "active",
"usage_count": 145,
"usage_limit": 500,
"once_per_customer": true,
"minimum_order_amount": 5000,
"minimum_quantity": null,
"applies_to": "specific_collections",
"product_ids": [],
"collection_ids": ["col_summer1", "col_summer2"],
"customer_eligibility": "all",
"customer_ids": [],
"segment_ids": [],
"starts_at": "2024-06-01T00:00:00Z",
"ends_at": "2024-08-31T23:59:59Z",
"created_at": "2024-05-15T10:00:00Z",
"updated_at": "2024-05-15T10:00:00Z"
}
}
Error Codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing access token |
FORBIDDEN | App doesn’t have read_discounts scope |
NOT_FOUND | Discount with the specified ID does not exist |
⌘I