Skip to navigation

Check a voucher balance

Looks up a gift card or voucher by the code printed on it and returns what is left to spend. A code that is unknown, or belongs to a voucher that has been fully used, is a 404 VOUCHER_NOT_FOUND (Business Central archives a spent voucher, so the two cannot be told apart). An expired voucher is still returned, with validUntil saying so. Only on stores that accept vouchers; the others answer 404 VOUCHERS_NOT_ENABLED.

Headers

x-entriastringRequired

Identifies which store this request is for. Required on every store-scoped route. It is not authentication and not a secret — it grants no privileges and is safe to send from a browser. You receive the value once your Entria backend has been created and configured. Missing header returns 400; an unknown store returns 404.

Request

This endpoint expects an object.
codestringRequired1-64 characters
The voucher code.

Response

The voucher was found
voucherobject

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
502
Bad Gateway Error
503
Service Unavailable Error