Skip to main content
The Storefront API Vouchers allows voucher codes to be redeemed and removed in the storefront. The API automatically checks whether a code is valid and, after redemption, returns the updated shopping cart values (e.g. discounts and totals) as well as notices/error messages if needed.

Supported methods

List of all supported methods.

Error format

All errors are answered with HTTP 400 and the following body:
  • error = invalidParameters for errors in parameters/field types (details in paramErrors, key = parameter name, value {"type": "missing" | "invalidFormat" | "invalidValue" | "unknownField" | …}).
  • error = actionFailed for functional errors. The error codes listed in the following tables then appear in actionErrors[].code.
  • A call with a wrong HTTP method is answered with HTTP 404 (not 405).
  • If the session (x-session) is missing, the response is HTTP 400.

Methods for vouchers

These methods allow you to check, redeem, and remove vouchers directly in the shopping cart or checkout.

GET voucher/get

This call reads master data for a voucher code (e.g. value, currency, minimum order value). This information can be used in the shopping cart and checkout to check a voucher before redeeming it and to display info such as amount and conditions. Example call for the voucher with the voucher number 7G3M-L2UU-CK1B-A2J2:

Parameter overview

Query parameters

Example response

POST voucher/redeem

This call redeems a voucher code for the current shopping cart and returns information about the redeemed voucher and the remaining value. This command can be used in the shopping cart or checkout to offset the voucher or to display the redeemed amount and, if applicable, the remaining value. Example call for redeeming the voucher 7G3M-L2UU-CK1B-A2J2:

Example request

Parameter overview

Header parameters

Body parameters

Example response

Ineffective vouchers voucher/redeem only checks the validity of the code, not its effect on the current shopping cart. A voucher can be redeemed without error and still result in a 0.00 discount. Therefore, after redeeming, check ineffectiveVoucherErrors and isOrderBlockedByIneffectiveVoucher from the checkout data. Each entry has the fields code, subCode (always empty), field (always empty), text (translated message text), and details.voucherId (missing if the error refers to the sum of several vouchers). If isOrderBlockedByIneffectiveVoucher = true, the shop rejects the order confirmation with the error code voucherIneffective.

Error codes

DELETE voucher/delete

This call removes a redeemed voucher code from the current shopping cart and updates the voucher overview. This command can be used in the shopping cart or checkout to undo an accidentally redeemed or unwanted voucher application. Example call for removing the voucher with the code 7G3M-L2UU-CK1B-A2J2:

Example request

Parameter overview

Header parameters

Body parameters

Example response

Error codes