List all coupons
How to fetch a collection of coupons via API
To fetch a collection of coupons, send a GET
request to the /api/coupons
endpoint.
Request
GET https://yourdomain.commercelayer.io/api/coupons
Example
The following request fetches a collection of coupons:
curl -g -X GET \
'https://yourdomain.commercelayer.io/api/coupons/' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token'
Remember that when you fetch a list of resources you get paginated result.
Sortable fields
The list of coupons can be sorted by the following fields:
Attributes
code
customer_single_use
usage_limit
usage_count
expires_at
id
created_at
updated_at
reference
reference_origin
Relationships
coupon_recipient
Filterable fields
The list of coupons can be filtered by the following fields:
Attributes
code
customer_single_use
usage_limit
usage_count
expires_at
id
created_at
updated_at
reference
reference_origin
metadata
Relationships
promotion_rule
coupon_recipient
events
tags
Last updated