To request a recommendation at this endpoint use the
Voucher Assessment checkpoint.
Ravelin will return a recommendation of ALLOW or PREVENT.
Promo abuse recommendations need to be enabled on your account before they can be used. Please speak to your account manager about enabling promo abuse recommendations.
Use this endpoint when a customer enters a voucher or promo code and before you apply the code.
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 |
The customer applying the voucher or promo code. Always sent as an object, even when only the ID is known. |
The single code being assessed in this call. One code in, one recommendation out. |
Standard Ravelin device object. Device/IP/session reuse across accounts is a core collusion signal, available at code-entry time regardless of cart or order state. |
Send when an order or basket identifier already exists on the merchant side. Minimum length: 1 |
POST https://api.ravelin.com/v3/voucher?score=voucherAssessment HTTP/1.1
Authorization: token ...
Content-Type: application/json
{
"timestamp": 1512828988826,
"customer": {
"customerId": "customer-123",
"email": "jsmith123@example.com"
},
"voucher": {
"voucherCode": "20OFF",
"valueType": "PERCENTAGE",
"percentage": 20,
"maxDiscountValue": 1500,
"currency": "GBP",
"voucherType": "GENERAL"
},
"device": {
"deviceId": "device-123",
"ipAddress": "81.152.92.84"
},
"orderId": "order-987"
}
action
string Ravelin's recommendation for whether to apply the voucher.
Only present when One of:
|
rules
object Details of the client rules triggered by this assessment. |
warnings
array Warnings when the request data may negatively impact abuse detection. |
{
"action": "ALLOW",
"rules": {
"triggered": [
{
"ruleId": 1,
"ruleVersion": 1,
"action": "ALLOW",
"triggered": true,
"state": "active"
}
]
}
}
Was this page helpful?