New: Stripe & TossPayments integration guides now available →
curl --request GET \
--url https://api.headlesscommerce.io/v1/admin/discounts/{id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"type": "code",
"value_type": "fixed",
"value": 123,
"target": "order",
"usage_limit": 123,
"usage_count": 123,
"per_customer_limit": 123,
"minimum_amount": {
"amount": 123,
"currency": "<string>"
},
"maximum_discount": {
"amount": 123,
"currency": "<string>"
},
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"is_active": true,
"conditions": [
{
"id": "<string>",
"type": "product",
"operator": "in",
"values": [
"<string>"
]
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z"
}curl --request GET \
--url https://api.headlesscommerce.io/v1/admin/discounts/{id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"code": "<string>",
"type": "code",
"value_type": "fixed",
"value": 123,
"target": "order",
"usage_limit": 123,
"usage_count": 123,
"per_customer_limit": 123,
"minimum_amount": {
"amount": 123,
"currency": "<string>"
},
"maximum_discount": {
"amount": 123,
"currency": "<string>"
},
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"is_active": true,
"conditions": [
{
"id": "<string>",
"type": "product",
"operator": "in",
"values": [
"<string>"
]
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z"
}API Key. Example: sk_live_xxxxx or pk_live_xxxxx
Resource ID
Success
code, automatic fixed, percentage, free_shipping order, line_item, shipping Show child attributes
Show child attributes
Show child attributes