Skip to content
v0.3

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: an ANONYMOUS face — no credential, and never /v1/commands/*. Which path serves it is not derivable from the registry; see the anonymous faces.
  • Events: none — Applying a code changes only this cart, read no-store; promotion.applied is emitted where the promotion is actually used.
{
"properties": {
"cart_id": {
"minLength": 1,
"type": "string"
},
"code": {
"maxLength": 64,
"minLength": 1,
"type": "string"
}
},
"required": [
"cart_id",
"code"
],
"type": "object"
}
{
"additionalProperties": false,
"properties": {
"cart_id": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"cart_id",
"code"
],
"type": "object"
}

validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)