Export 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.
Download a CSV file containing the coupons that match the given properties.
[!tip] If the exported CSV file is too large to view, you can split it into multiple files.
The CSV file can contain the following columns:
- accountid: The ID of your deployment.
- applicationid: The ID of the Application this coupon is related to.
- attributes: A json object describing custom referral attribute names and their values.
- batchid: The ID of the batch this coupon is part of.
- campaignid: The ID of the campaign this coupon is related to.
- counter: The number of times this coupon has been redeemed.
- created: The creation date in RFC3339 of the coupon code.
- deleted: Whether the coupon code is deleted.
- deleted_changelogid: The ID of the delete event in the logs.
- discount_counter: The amount of discount given by this coupon.
- discount_limitval: The maximum discount amount that can be given be this coupon.
- expirydate: The end date in RFC3339 of the code redemption period.
- id: The internal ID of the coupon code.
- importid: The ID of the import job that created this coupon.
- is_reservation_mandatory: Whether this coupon requires a reservation to be redeemed.
- limits: The limits set on this coupon.
- limitval: The maximum number of redemptions of this code.
- recipientintegrationid: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes.
- referralid: The ID of the referral code that triggered the creation of this coupon (create coupon effect).
- reservation: Whether the coupon can be reserved for multiple customers.
- reservation_counter: How many times this coupon has been reserved.
- reservation_limitval: The maximum of number of reservations this coupon can have.
- startdate: The start date in RFC3339 of the code redemption period.
- value: The coupon code.
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.
Query parameters
Filter results by campaign ID.
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.
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.
Determines the format of dates in the export document.
Filter results by the state of the campaign.
- enabled: Campaigns that are scheduled, running (active), or expired.
- running: Campaigns that are running (active).
- disabled: Campaigns that are disabled.
- expired: Campaigns that are expired.
- archived: Campaigns that are archived.
Filter results to only return the coupon codes (value column) without the associated coupon data.
Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
Note: Only coupons deleted in the last 7 days will appear in the results.
Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
Note: Only coupons deleted in the last 7 days will appear in the results.
Response
OK
Changes
No recorded changes to this operation across all 2 revisions of this API.