Voucher abuse recommendations need to be enabled on your account before they can be used. Please speak to your account manager about enabling refund abuse recommendations.
The ID of the customer attempting to redeem this voucher. |
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 unique identifier for the voucher, usually the code a customer enters to redeed the voucher. |
The type of voucher.
One of:
|
How far Ravelin will search for the voucher from the target customer. If omitted or zero, Ravelin will use the configured value for the voucher type, or the default value (10) if there is no configuration. Maxmimum depth is 10. |
The threshold for deciding upon abuse. Ravelin searches for the owner and users of the voucher from the target customer Id for the configured depth. We return ABUSE if the total found is greater than the threshold. If omitted or zero Ravelin will use the configured value for the voucher type, or the default value (2) if there is no configuration. |
POST https://api.ravelin.com/v2/voucher/check HTTP/1.1
Authorization: token ...
Content-Type: application/json
{
"timestamp": 1512828988826,
"voucherCode": "DISCOUNT-1234",
"customerId": "abc-123-ZYZ",
"voucherType": "GENERAL",
"depth": 10,
"threshold": 2
}
{
"timestamp": 1512828988,
"recommendation": "OK"
}
Was this page helpful?