Unlock value voucher

In order to unlock value vouchers with Centili Vouchers API, you need to send HTTP PUT request with voucher codes in request body and Content-Type: application/json.

Before initiating an unlock voucher request you will need to obtain an access token, with client vouchers and provided secret.

URL to which a request should be sent:

https://{host}/vouchers/v1/value/unlock

PUT unlock voucher request

https://{host}/vouchers/v1/value/unlock HTTP/1.1
Host: {host}:443
Content-Type: application/json
Authorization:bearer token

{
     "codes": ["35V7CN67FT","J9J6UID26U"]
}
ParameterDescriptionExampleRequired
codesVoucher codes you want to unlock["35V7CN67FT","J9J6UID26U"]mandatory
hostHostnameapi.example.commandatory

All vouchers must be in status LOCKED in order to be unlocked. If any of the voucher codes are in a different status, none of them will be unlocked.

PUT unlock voucher response

👍

200

Vouchers are unlocked

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "code": "35V7CN67FT",
    "status": "INACTIVE"
  },
  {
    "code": "J9J6UID26U",
    "status": "INACTIVE"
  }
]

🛑

409

Some or all of the provided vouchers are in wrong state for unlocking (not in LOCKED state)

HTTP/1.1 409 CONFLICT
Content-Type: application/json

[
  "errorCode": "INVALID_STATE",
  "errorMessage": "All vouchers must be LOCKED in order to become INACTIVE"
]