Set an item quantity

Sets the quantity of one variant's line in the caller's cart and returns the cart. To remove a line, call `DELETE /cart/lines/{variantId}`. The line takes the current catalogue price. The call first removes the lines that can no longer be sold, the requested one included, and reports them in `removedLines`. Errors: 422 `OUT_OF_STOCK` above the variant's stock on a site that refuses overselling, with nothing changed, and 404 `CART_NOT_FOUND` when there is no cart or the variant is not in it. > **Note:** Available only on sites with e-commerce enabled.

Required access
Send
  • Publishable keyX-Lynkow-Pk
Optional: customer session tokenSite access
PATCH/cart/lines
Base URLhttps://api.lynkow.com/storefront/{siteId}

Request body
required

  • quantity
    integer
    required

    Required

  • variantId
    string
    required

    Required. Product variant identifier (var_ prefixed id)

Feedback

Was this page helpful?