Add an item to the cart
Adds `quantity` of a product variant to the caller's cart. The first add creates the cart, with `locale` as its language; later adds ignore `locale`. A variant already in the cart has its quantity increased, up to 999. A guest's first add returns `cartToken` once: send it in `X-Lynkow-Cart-Token` on later guest calls. The add also removes the lines that can no longer be sold and reports them in `removedLines`. Errors: 422 `OUT_OF_STOCK` past the stock on a site that refuses overselling, 422 `CART_LINES_LIMIT_REACHED` on a full cart, 404 `CART_NOT_FOUND` for a variant not for sale. > **Note:** Available only on sites with e-commerce enabled.
/cart/lineshttps://api.lynkow.com/storefront/{siteId}Request bodyrequired
quantityintegerrequiredRequired
variantIdstringrequiredRequired. Product variant identifier (var_ prefixed id)
localestringBCP 47 locale code (e.g. "en", "fr")