Coupons
Returns a paginated list of coupons defined in your catalog
Returns a paginated list of coupons defined in your catalog.
GET
https://example.thoughtindustries.com/incoming/v2/couponsExample request
curl "https://example.thoughtindustries.com/incoming/v2/coupons" \
-H 'Authorization: Bearer YOUR_API_KEY'Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
cursor | string | No | query | Opaque cursor for the next page of results. Omit to fetch the first page. |
Example response
{
"pageInfo": {
"total": 0,
"hasMore": true,
"cursor": "string"
},
"coupons": [
{
"id": "00000000-0000-0000-0000-000000000000",
"active": true,
"allowMultipleInCart": true,
"amountOffInCents": 0,
"multicurrencyAmountOff": {},
"appliesToUser": true,
"code": "string",
"maxRedemptions": 0,
"percentOff": 0,
"redeemBy": "2024-01-01T00:00:00.000Z",
"timesRedeemed": 0
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
pageInfo | object | Cursor-based pagination metadata for the result set. |
pageInfo.total | integer | Total number of records matching the query. |
pageInfo.hasMore | boolean | Whether additional pages of results are available. |
pageInfo.cursor | string | Opaque cursor to pass on the next request. Present when hasMore is true. |
coupons | object[] | Array of coupon objects for the current page. |
coupons.id | uuid | Identifier of the coupon. |
coupons.active | boolean | Whether the coupon is currently active. |
coupons.allowMultipleInCart | boolean | Whether multiple uses are allowed in a single cart. |
coupons.amountOffInCents | integer | Flat discount amount in cents. |
coupons.multicurrencyAmountOff | object | Per-currency flat discount amounts. |
coupons.appliesToUser | boolean | Whether the coupon applies to the current user. |
coupons.code | string | Redemption code for the coupon. |
coupons.maxRedemptions | integer | Maximum number of redemptions allowed. |
coupons.percentOff | number | Percentage discount applied. |
coupons.redeemBy | ISO 8601 timestamp | Date by which the coupon must be redeemed. |
coupons.timesRedeemed | integer | Number of times the coupon has been redeemed. |