Api key provided on integrations tab in Easyflow platform.
Redeem voucher
Redeems a voucher using its unique identifier. Once redeemed, the voucher cannot be used again.
- An expired voucher is redeemed only when
forceRedeemIfExpiredistrue. - A voucher that was cancelled or already redeemed cannot be redeemed.
Headers
x-api-keystringrequiredx-api-secretstringrequiredApi Secret provided on integrations tab in Easyflow platform.
Path parameters
voucherIdstring · uuidrequiredUnique identifier of the voucher to be redeemed.
Query parameters
forceRedeemIfExpiredstringSend
trueto redeem the voucher even if it has expired. When it is omitted, the value isfalse. Onlytrueandfalseare accepted; another value returns400withInvalid param: [forceRedeemIfExpired].
Responses
200Voucher successfully redeemed.
Voucher successfully redeemed.
Content typeapplication/jsonobject
statusCodeintegerdataobjectShow child attributesHide child attributes
redeemedboolean
400voucherId is not a valid ID; or forceRedeemIfExpired is neither true nor false (message Invalid param: [forceRedeemIfExpired]); or the voucher cannot be redeemed: Invalid param: [this voucher has already expired] (send forceRedeemIfExpired=true to redeem it), Invalid param: [this voucher has already been cancelled] or Invalid param: [this voucher has already been redeemed].
voucherId is not a valid ID; or forceRedeemIfExpired is neither true nor false (message Invalid param: [forceRedeemIfExpired]); or the voucher cannot be redeemed: Invalid param: [this voucher has already expired] (send forceRedeemIfExpired=true to redeem it), Invalid param: [this voucher has already been cancelled] or Invalid param: [this voucher has already been redeemed].
Content typeapplication/jsonobject
messagestringInvalid param: []
errorstringBad Request
statusCodeinteger400
errorCodestringCode that identifies the error. Present only on some errors.
401If the request is unauthorized, the API will return the following error response:
If the request is unauthorized, the API will return the following error response:
Content typeapplication/jsonobject
messagestringInvalid field
errorstringUnauthorized
statusCodeinteger401
403If the request is forbidden, the API will return the following error response:
If the request is forbidden, the API will return the following error response:
Content typeapplication/jsonobject
messagestringForbidden resource
errorstringForbidden
statusCodeinteger403
404No voucher exists with this voucherId (message voucher not found).
No voucher exists with this voucherId (message voucher not found).
Content typeapplication/jsonobject
statusCodeintegerrequiredHTTP status code.
messagestringrequiredExplanation of the error.
errorstringName of the HTTP status, such as
Bad RequestorConflict.errorCodestringCode that identifies the error. Present only on some errors.
500If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.
If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.
Content typeapplication/jsonobject
statusCodeintegerHTTP status code.
messagestringExplanation of the error.