Giveaways
Import giveaway codes into a giveaway pool
[!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.
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, enclosed with double quotation marks.<br /> For example, if you created a custom attribute called provider associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: "{"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 setting of your choice. The values are converted to UTC internally by Talon.One.
[!note] Note
- We recommend limiting your file size to 500MB.
- You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes.
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""}"
post/v1/giveaways/pools/{poolId}/import
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
poolIdinteger required
The ID of the pool. You can find it in the Campaign Manager, in the Giveaways section.
Request body multipart/form-data
Response
OK
Example response
{
"id": 6,
"created": "2020-06-10T09:05:27.993483Z",
"accountId": 3886,
"userId": 388,
"entity": "AttributeAllowedList",
"amount": 10
}Changes
No recorded changes to this operation across all 2 revisions of this API.