Voucher Validations

Operations related to validating voucher codes.

Validate a Voucher by Code

get

Checks the validity of a voucher code and returns its details if valid.

Authorizations
Query parameters
voucher_codestringRequired

The voucher code to validate.

Example: E57BB0J3EH6R2
Responses
200
Voucher validation status and details.
application/json
get
GET /vouchers/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "validation_status": {
    "status": 1000,
    "message": "Voucher is valid"
  },
  "data": {
    "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5",
    "type": "voucher",
    "id": "vcr-150659959859cce2ae044b5",
    "voucher_code": "E57BBO2ASPF25",
    "tag": "text",
    "created": 1506599598,
    "start_time": 1506579300,
    "expiry_time": 1509474600,
    "value": "50.00",
    "value_unit": "percentage",
    "currency": "USD",
    "redeemed": 1,
    "redeemed_date": 1506601978,
    "teams": [
      "text"
    ],
    "brands": [
      "text"
    ]
  }
}

Validate a Voucher by ID

get

Checks the validity of a specific voucher by its ID.

Authorizations
Path parameters
voucherIdstringRequired

The ID of the voucher to validate.

Example: vcr-150676308659cf614e36e1e
Responses
200
Voucher validation status and details.
application/json
get
GET /vouchers/{voucherId}/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "validation_status": {
    "status": 1000,
    "message": "Voucher is valid"
  },
  "data": {
    "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5",
    "type": "voucher",
    "id": "vcr-150659959859cce2ae044b5",
    "voucher_code": "E57BBO2ASPF25",
    "tag": "text",
    "created": 1506599598,
    "start_time": 1506579300,
    "expiry_time": 1509474600,
    "value": "50.00",
    "value_unit": "percentage",
    "currency": "USD",
    "redeemed": 1,
    "redeemed_date": 1506601978,
    "teams": [
      "text"
    ],
    "brands": [
      "text"
    ]
  }
}