Import giveaway codes into a giveaway pool

POST {{baseUrl}}/v1/giveaways/pools/:poolId/import

Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data.

The CSV file contains the following columns: - code (required): the code of your giveaway, for instance, a gift card redemption code. - startdate: the start date in RFC3339 of the code redemption period. - enddate: the last date in RFC3339 of the code redemption period. - attributes: A json object describing custom giveaway attribute names and their values. Double the double-quotes in the object. For example, if you created a custom attribute called provider associated to the giveaway entity, set it with "{""provider"": ""myPartnerCompany""}".

The startdate and enddate have nothing to do with the validity of the codes. They are only used by the Rule Engine to award the codes or not. 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:

code,startdate,enddate,attributes
GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Amazon""}"
GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Amazon""}"
GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Aliexpress""}"

Request Body

[{"name"=>"upFile", "value"=>"velit", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring