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 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 redeem 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 uses of the voucher from the target customer to the configured depth in their network. We return ABUSE if the total count of uses in the customer's network is greater than or equal to the threshold. If omitted or zero, Ravelin will use the configured value for the voucher type, or the default value (3) 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?