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

Reverse a Redemption

Using the value of the redemptions array provided when redeeming a voucher or part of a voucher you can reverse this redemption in the event of a void or refund of that voucher redemption or transaction.

Request

Headers

POST REQUEST (/redeem/reverse)

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.

For the redemptions you should provide an array of redemption ID's as provided in the redemption step.

{
    "voucher_no":"XXXXXXXXXX",
    "site_id": "X",
    "value": 10,
    "redemptions": [
        21, 22, 23
    ]
}

Success Response


{
    "message": "Redemption reversal complete"
}

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": {
        "redemptions": [
            "Please provide a valid list of redemptions to reverse"
        ]
    }
}