Claim a guest cart after signing in
Transfers the cart built as a guest to the now-authenticated buyer, so a shopper who signs in keeps what they had assembled. Authenticated-only: the destination is always the calling customer and can never be named in the body. The guest cart is identified solely by the `cartToken` the client already holds. When the buyer has no cart of their own the guest cart is adopted in place, keeping its id, its items, and every price captured when those items were added. When they already have one, the guest items are folded into it: a variant present in both has its quantities summed and clamped at the per-line cap while keeping the existing line's captured price, a variant present only in the guest cart is carried over with its own captured price, and the guest cart is then closed. Totals are recomputed server-side. The whole transfer is one transaction, so it never leaves a half-merged cart. The claim also SELF-HEALS the surviving cart (Phase 5): a folded or adopted line whose variant is no longer sellable is auto-removed and reported in `removedLines`, so the buyer never signs in to a cart total carrying an item that cannot be sold. The response is ALWAYS the caller's own cart, with an identical shape whether anything was claimed or not. A wrong, absent, already-claimed, or other-site token transfers nothing and is reported as nothing: there is no status flag, no reason, and no error branch, because distinguishing those cases would tell a caller about carts that are not theirs. A token can be claimed once; replaying it is a no-op. > **Note:** This endpoint requires the e-commerce feature to be enabled on your site.
/cart/claimhttps://api.lynkow.com/storefront/{siteId}Request bodyrequired
cartTokenstringrequiredRequired. 43-43 characters