Coupons
Update coupon
[!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.
Update the specified coupon.
[!note] With this PUT endpoint, if you do not explicitly set a value for the startDate, expiryDate, and recipientIntegrationId properties in your request, it is automatically set to null.
put/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}
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
applicationIdinteger required
The ID of the Application. It is displayed in your Talon.One deployment URL.
campaignIdinteger required
The ID of the campaign. It is displayed in your Talon.One deployment URL.
couponIdstring required
The internal ID of the coupon code. You can find this value in the id property from the List coupons endpoint response.
Request body
Example request
{
"usageLimit": 100,
"discountLimit": 30,
"reservationLimit": 45,
"startDate": "2020-01-24T14:15:22Z",
"expiryDate": "2023-08-24T14:15:22Z",
"limits": [
{
"action": "createCoupon",
"limit": 1000,
"period": "yearly",
"entities": [
"Coupon"
]
}
],
"recipientIntegrationId": "URNGV8294NV"
}Response
OK
Example response
{
"id": 6,
"created": "2020-06-10T09:05:27.993483Z",
"campaignId": 211,
"value": "XMAS-20-2021",
"usageLimit": 100,
"discountLimit": 30,
"reservationLimit": 45,
"startDate": "2020-01-24T14:15:22Z",
"expiryDate": "2023-08-24T14:15:22Z",
"limits": [
{
"action": "createCoupon",
"limit": 1000,
"period": "yearly",
"entities": [
"Coupon"
]
}
],
"usageCounter": 10,
"discountCounter": 10,
"discountRemainder": 5,
"reservationCounter": 1,
"referralId": 326632952,
"recipientIntegrationId": "URNGV8294NV",
"importId": 4,
"batchId": "32535-43255"
}Changes
No recorded changes to this operation across all 2 revisions of this API.