List Coupons
Endpoint
GET /coupons/list
Optional parameters
archived-BOOLEAN- Set totrueto retrieve archived coupons. Defaults tofalse(returns only active coupons).
Example request
curl https://api.zylvie.com/coupons/list \
-h "Authorization: Bearer e97f0aafe4884bc380c81fdb2347dc55"
To get archived coupons:
curl https://api.zylvie.com/coupons/list?archived=true \
-h "Authorization: Bearer e97f0aafe4884bc380c81fdb2347dc55"
Example response
{
"count": 2,
"coupons": [
{
"id": "8x9Pqm3N",
"created": "2024-01-15T10:30:00Z",
"code": "SUMMER2024",
"type": "percentage",
"amount": 25.0,
"is_storewide": true,
"is_live": true,
"is_archived": false,
"limit": 100,
"duration_in_months": null,
"start": "2024-06-01T00:00:00Z",
"end": "2024-08-31T23:59:59Z",
"redemption_count": 12,
"products": [],
"affiliate": null,
"requires_subscription_product": null
},
{
"id": "7y8Oqn2M",
"created": "2024-02-01T14:20:00Z",
"code": "WINTER2024",
"type": "fixed",
"amount": 15.0,
"is_storewide": false,
"is_live": true,
"is_archived": false,
"limit": null,
"duration_in_months": 6,
"start": null,
"end": null,
"redemption_count": 5,
"products": ["6v8Obm2M", "5u7Npm1L"],
"affiliate": "4t6Mok0K",
"requires_subscription_product": "6v8Obm2M"
}
]
}
Notes
- Returns all coupons for your authenticated brand.
- By default, only active (non-archived) coupons are returned.
- Use the
archived=truequery parameter to retrieve archived coupons. - The response includes a
countfield indicating the total number of coupons returned. - Each coupon includes its current
redemption_countshowing how many times it has been used.