Actions overview
| Action | Description |
|---|---|
VoucherAdd | Redeems a voucher code in the basket. |
VoucherDelete | Removes a redeemed voucher from the basket. |
Actions
VoucherAdd
This action redeems a voucher code in the basket. Usage exampleCan be used on the basket page or in the basket offcanvas, where customers can enter a voucher code and apply it directly to their order. Parameters
| Name | Description |
|---|---|
id | The voucher code to be redeemed. |
| Error code | Description |
|---|---|
missingId | Parameter id is missing. |
invalidVoucher | The specified voucher code is invalid or already redeemed. |
VoucherDelete
This action removes a voucher that has already been redeemed from the basket. Usage exampleCan be used on the basket page or in the basket offcanvas when customers want to remove a redeemed voucher. Parameters
| Name | Description |
|---|---|
id | The ID of the voucher to be removed. |
| Error code | Description |
|---|---|
missingId | Parameter id is missing. |
invalidVoucherId | The specified voucher does not exist or does not belong to this basket. |
