List coupons
[!note] Management API endpoints are not meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.
List all the coupons matching the specified criteria.
Request
- Base URLhttps://yourbaseurl.talon.one
- Auth
- API key in header Authorization
- or API key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The ID of the Application. It is displayed in your Talon.One deployment URL.
The ID of the campaign. It is displayed in your Talon.One deployment URL.
Query parameters
The number of items in the response.
The number of items to skip when paging through large result sets.
The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with -.
Note: You may not be able to use all fields for sorting. This is due to performance limitations.
Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters.
Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
Either "expired", "validNow", or "validFuture". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future.
Either "true" or "false". If "true", only coupons where usageCounter < usageLimit will be returned, "false" will return only coupons where usageCounter >= usageLimit.
- true: only coupons where usageCounter > 0 will be returned.
- false: only coupons where usageCounter = 0 will be returned.
- This field cannot be used in conjunction with the usable query parameter.
Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
Filter results by match with a profile ID specified in the coupon's RecipientIntegrationId field.
Filter results by batches of coupons
Filter results to an exact case-insensitive matching against the coupon code.
Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon expiration date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon start date timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
Filter results to only return the coupon codes (value column) without the associated coupon data.
Response
OK
Example response
{
"hasMore": true,
"data": [
{
"id": 6,
"created": "2020-06-10T09:05:27.993483Z",
"campaignId": 211,
"value": "XMAS-20-2021",
"usageLimit": 100,
"discountLimit": 30,
"reservationLimit": 45,
"startDate": "2020-01-24T14:15:22Z",
"expiryDate": "2023-08-24T14:15:22Z",
"limits": [
{
"action": "createCoupon",
"limit": 1000,
"period": "yearly",
"entities": [
"Coupon"
]
}
],
"usageCounter": 10,
"discountCounter": 10,
"discountRemainder": 5,
"reservationCounter": 1,
"referralId": 326632952,
"recipientIntegrationId": "URNGV8294NV",
"importId": 4,
"batchId": "32535-43255"
}
]
}Changes
No recorded changes to this operation across all 2 revisions of this API.