cart.apply_coupon
Apply a coupon code to the cart. Anonymous (cart_id). Refuses with a distinct reason per case; a code whose threshold is not reached yet is accepted and explains itself through the cart’s progress data.
- Scope:
public - System: no
- Reachable from:
POST /v1/cart/commands/cart.apply_coupon— an ANONYMOUS face:x-forge-storeis required, no credential is sent, and it is never on/v1/commands/*· MCP toolcart.apply_coupon - Events: none — Applying a code changes only this cart, read no-store;
promotion.appliedis emitted where the promotion is actually used.
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "cart_id": { "minLength": 1, "type": "string" }, "code": { "maxLength": 64, "minLength": 1, "type": "string" } }, "required": [ "cart_id", "code" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "cart_id": { "type": "string" }, "code": { "type": "string" } }, "required": [ "cart_id", "code" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)