Voucher abuse recommendations need to be enabled on your account before they can be used. Please speak to your account manager about enabling voucher abuse recommendations.
The time at which this data payload was valid. When sending events in realtime, this will usually be 'now'. This is used to merge data that arrives out-of-order. A Unix timestamp preferably as an
integer count of milliseconds since |
A voucher is added whenever a new voucher code is created. |
An eventType should identify what event in your system triggered this API call. Pattern:
^[a-zA-Z0-9][a-zA-Z0-9-_]*$ |
POST https://api.ravelin.com/v2/voucher HTTP/1.1
Authorization: token ...
Content-Type: application/json
{
"timestamp": 1512828988826,
"voucher": {
"voucherCode": "DISCOUNT-1234",
"referrerId": "USER-1234",
"expiry": 1512828988826,
"value": 20,
"currency": "GBP",
"voucherType": "GENERAL",
"referralValue": 10,
"creationTime": 1512828988826
}
}
{
"status": 200,
"timestamp": 1512828988
}
Was this page helpful?