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. Mutually exclusive with deviceId. |
Reference to a previously-sent device. Mutually exclusive with device. Minimum length: 1 Maximum length: 300 |
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"
}
Ravelin's recommendation for whether to apply the voucher. One of: | |
Details of the client rules triggered by this assessment. | |
The client rules triggered by this assessment. | |
The ID of the rule which triggered. | |
The version of the rule which triggered. | |
The recommendation produced by the rule. | |
Whether the rule triggered. This is always | |
Whether the rule was in live or test mode. One of: | |
Warnings when the request data may negatively impact abuse detection. | |
The identifier for this warning. | |
A link to more information about this warning. | |
Why the warning was issued. |
{
"action": "ALLOW",
"rules": {
"triggered": [
{
"ruleId": 1,
"ruleVersion": 1,
"action": "ALLOW",
"triggered": true,
"state": "active"
}
]
}
}
Was this page helpful?