Claim a guest cart after signing in

Moves the guest cart of `cartToken` to the signed-in customer. Requires a customer session, else 401. A customer without a cart takes the guest cart whole. Otherwise the guest lines merge into the customer's cart, summing a shared variant's quantities up to 999, and the guest cart is closed. Unsellable lines are removed and reported in `removedLines`. Always returns the customer's cart, created empty if needed. A wrong, used or other-site token claims nothing. Errors: 422 `OUT_OF_STOCK` when a sum exceeds the stock where overselling is refused, 422 `CART_LINES_LIMIT_REACHED` past the line limit. Both keep the token valid. > **Note:** Available only on sites with e-commerce enabled.

Required access
Send
  • Publishable keyX-Lynkow-Pk
  • Customer session tokenAuthorization
Site access
POST/cart/claim
Base URLhttps://api.lynkow.com/storefront/{siteId}

Request body
required

  • cartToken
    string
    required

    Required. 43-43 characters

Feedback

Was this page helpful?