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.

POST api.ravelin.com/v2/voucher

Show all
timestamp integer required

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).

voucher object required

A voucher is added whenever a new voucher code is created.

Show definition
eventType string optional

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


status integer

The HTTP response status code.

timestamp integer

A unix timestamp indicating when we finished handling the request.

  "status": 200,
  "timestamp": 1512828988