{warning} This API is likely to change before the Beta period is over, please check back regularly to see the latest changes.

Redeem A Voucher

Redeeming a voucher only requires that you send us the voucher number and a limited set of fields, like the value to redeem or the experiences that are being used.

Request

Headers

POST REQUEST (/redeem)

Header: Content-Type - application/json
Header: Accepts - application/json
Header: Smart-Auth sk_XXXXXXXXXXXXXXXXXX

Body

You can find the site number you should submit along with this request in the company configuration on the Smart Gift dashboard.

For the value you should either submit the monetary value OR the sum of the bit_value of the experiences that you wish to redeem.

{
    "voucher_no":"XXXXXXXXXX",
    "site_id": "X",
    "value": 10
}

Success Response

{
    "data": {
        "message": "The voucher has been redeemed.",
        "redemptions": [
            21, 22, 23
        ]
    }
}

Errors

Errors will be displayed in the following format and will be returned along with a 422 http response code. In cases where a single field has multiple errors, it is most likely the case that the first message is the error you need to look out for.

{
    "message": "The given data was invalid.",
    "errors": {
        "value": [
            "There is not enough balance on this voucher to redeem or the selected experiences have already been used."
        ]
    }
}