Merge this cart into another OPEN cart of the same shopper
POST/carts/:cartId/merges
MergeInto. The source cart becomes MERGED; the target must be OPEN, belong to the same shopper and never be the cart itself (ErrMergeTarget).
Request
Responses
- 200
- 400
- 404
- 409
- 422
- 500
The target cart after the merge.
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).
not-found (no such cart or line, or an identifier over 128 characters; on a write it is not stored - the key is released and the same Idempotency-Key runs again, a cart or line can appear later) or resource-not-found (a NUL character in the path).
cart-closed (ErrCartClosed; stored and replayed - a closed cart never changes) or concurrent-update (not stored; the key is released and the same Idempotency-Key runs again). Or idempotency-key-reused (the Idempotency-Key was already used with a different request).
merge-target (ErrMergeTarget; not stored - the key is released and the same Idempotency-Key runs again) or validation-failed (stored and replayed).
internal-error (an unexpected failure; the detail never carries the internal message).