Import coupons
POST {{baseUrl}}/v1/applications/:applicationId/campaigns/:campaignId/import_coupons?skipDuplicates=true
Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data.
The CSV file contains the following columns:
value(required): The coupon code.expirydate: The end date in RFC3339 of the code redemption period.startdate: The start date in RFC3339 of the code redemption period.recipientintegrationid: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about coupon reservation.limitval: The maximum number of redemptions of this code. For unlimited redemptions, use0. Defaults to1when not provided.discountlimit: The total discount value that the code can give. This is typically used to represent a gift card value.attributes: A json object describing custom referral attribute names and their values. Double the double-quotes in the object. For example, if you created a custom attribute calledcategoryassociated to the coupon entity, set it with"{""category"": ""10_off""}".
You can use the time zone of your choice. It is converted to UTC internally by Talon.One.
Note: We recommend limiting your file size to 500MB.
Example:
"value","expirydate","startdate","recipientintegrationid","limitval","attributes","discountlimit"
COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,"{""Category"": ""10_off""}",2.4
Once imported, you can find the batchId in the Campaign Manager or by
using List coupons.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
skipDuplicates | boolean | An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when skipDuplicates=true. |
Request Body
[{"name"=>"upFile", "value"=>"velit", "datatype"=>"string"}]
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
Content-Type | string | ||
Accept | string |