Supported methods
List of all supported methods.Error format
All errors are answered with HTTP 400 and the following body:error=invalidParametersfor errors in parameters/field types (details inparamErrors, key = parameter name, value{"type": "missing" | "invalidFormat" | "invalidValue" | "unknownField" | …}).error=actionFailedfor functional errors. The error codes listed in the following tables then appear inactionErrors[].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 number7G3M-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 voucher7G3M-L2UU-CK1B-A2J2:
Example request
Parameter overview
Header parameters
Body parameters
Example response
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 code7G3M-L2UU-CK1B-A2J2:
