cart.merge
Absorb another cart into this one: its lines are added (quantities SUM by the same sku + custom fields rule as add_line) and the absorbed cart is left empty. Requires possession of BOTH cart ids, in the same store. A primitive — deciding WHEN to merge (e.g. at login) is the channel’s policy, not the kernel’s.
- 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 — Merging an anonymous cart into a recognized one rewrites session state only; the recognition itself is what emits (cart.buyer_recognized).
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "cart_id": { "minLength": 1, "type": "string" }, "source_cart_id": { "minLength": 1, "type": "string" } }, "required": [ "cart_id", "source_cart_id" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "cart_id": { "type": "string" }, "merged_lines": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "source_cart_id": { "type": "string" } }, "required": [ "cart_id", "source_cart_id", "merged_lines" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)