Import 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.
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. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set skipDuplicates to true.
- 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes.
- limitval: The maximum number of redemptions of this code. For unlimited redemptions, use 0. Defaults to 1 when 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 coupon attribute names and their values, enclosed with double quotation marks.<br /> For example, if you created a custom attribute called category associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: "{"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 500 MB.
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
- 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
An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when skipDuplicates=true.
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.