Carts
Cart lifecycle and reads (Cart aggregate).
Create a cart
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.
List carts of a shopper
ListCarts, filtered by shopperId and optionally state, newest first (createdAt, cartId descending). Keyset-paged: follow nextCursor until it is absent and repeat the filters on every page request.
Get a cart with its quote, selections and estimate
GetCart. Includes the CheckoutReadiness view (every group selected, no offer expired) and the labelled, non-binding estimate. Called by the BFF and, at checkout session open, by checkout.
Merge this cart into another OPEN cart of the same shopper
MergeInto. The source cart becomes MERGED; the target must be OPEN, belong to the same shopper and never be the cart itself (ErrMergeTarget).