Create a cart
POST/carts
CreateCart. shopperId is optional (guest-first, D4; the body itself may be empty) but, when sent, must be a valid id (1 to 64 characters, letters or digits first, then letters, digits and . _ : -), else 422 validation-failed. A guest cart can be merged into a shopper's cart later.
Request
Responses
- 201
- 400
- 409
- 422
- 500
The created cart (OPEN).
Response Headers
"true" when the answer is the stored response of an earlier request with the same Idempotency-Key (a 2xx, or a refusal that is final for the request; a retryable refusal and a 5xx are never stored - the key is released); absent on the first execution.
idempotency-key-required (no Idempotency-Key header), idempotency-key-invalid (not 1 to 128 printable ASCII characters) or malformed-request (not JSON, an unknown field, a NUL character or a body over 64 KiB).
idempotency-key-reused (the Idempotency-Key was already used with a different request).
validation-failed (on a write it is stored and replayed; the request alone decides).
internal-error (an unexpected failure; the detail never carries the internal message).