External Promotion
Tonos has an API that communicates with your external service partner so that it can verify voucher code redemptions. Your external service provider has to make the API call at this endpoint:
/webhook/addon/promotion-code/notify
- POST
The object that this endpoint accepts should look like this.
{
"addoncustomid": "customId",
"code": "DISCOUNT22",
"email": "john@gmail.com"
}
Field & Description |
---|
addoncustomid - the cutsom ID of your addon |
code - the discount code that has been used |
email - the email of the user that used the voucher code |
In order for the POST request to be successful, an API Key is needed for authorization.
After the API call is successfully made, the external partner will be notified that the user with the email address has the right to redeem the voucher code. In order for this to be completed, Tonos uses webhooks to notify the external partners that the code has been assigned to a user.