Carts

Apply Promo

Apply a promo code to a cart (Cart-of-1).

Persists cart.promo_code + cart.campaign_id and per-line discount_amount + pms_discount_id. Idempotent under Idempotency-Key (5-minute replay window). Failures surface as typed CartServiceError / CampaignServiceError (the standard handlers in app.main build the envelope).

post/carts/{cart_id}/promo

Request

  • Base URL: http://localhost:8000
  • URL: http://localhost:8000/carts/{cart_id}/promo
  • Auth: none declared

Path parameters

cart_idinteger required

Headers

authorizationstring nullable
Idempotency-Keystring nullable
API-Version'1'

Major API version. Omit or send 1 for the current v1 surface. Retired operations use RFC 9745 Deprecation and RFC 8594 Sunset headers.

Cookies

tp_cartstring nullable

Request body

codestring required

Promo code to apply. Case-insensitive; canonicalised server-side.

Response

Successful Response

cart_tokenstring nullable

Plaintext cart token — returned ONCE on create and link-user.

Changes

No recorded changes to this operation across all 1 revision of this API.