Voucher
POST
api.ravelin.com/v2/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 1970-01-01T00:00
UTC
(nanoseconds are also accepted).
A voucher is added whenever a new voucher code is created.
Show definition
A unique identifier for the voucher, usually the code a customer enters to redeed the voucher.
The value of the voucher.
The ISO 4217 currency code
Pattern: ^[a-zA-Z]{3}$
The time the voucher was created.
A unix timestamp preferably as an
integer count of milliseconds since 1970-01-01T00:00
UTC
(nanoseconds are also accepted).
The customerId of the customer who created this voucher.
The time after which the voucher can no longer be redeemed.
A unix timestamp preferably as an
integer count of milliseconds since 1970-01-01T00:00
UTC
(nanoseconds are also accepted).
The amount the owner of the voucher gets when the voucher is used.
One of:
REFERRAL
, REACTIVATION
, GENERAL
, or STAFF
.
Custom data that is relevant to your domain. This can be any json object.
Please include any details that you think are relevant to fraud that our
schema does not capture.
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
}
}
Response
The HTTP response status code.
A unix timestamp indicating when we finished handling the request.
{
"status": 200,
"timestamp": 1512828988
}
Feedback
Was this page helpful?
Yes
No
Thanks for the feedback.
If you'd like to provide more detail you can share it in our Help Center .