Skip to main content

Update a shopping cart item by ID

PATCH 

/api/cart/:id/item/update/:itemId

Update a specific item in a shopping cart using the cart ID and item ID.

Request

Path Parameters

    id stringrequired

    The ID of the cart containing the item to be updated

    itemId stringrequired

    The ID of the item to be updated

Body

You may update either qty, shipping_id, or both, depending on the requirement. Both fields are optional.

    qty number

    Quantity (optional, can be updated independently).

    shipping_id string

    The shipping country id (optional, can be updated independently).

Responses

Successful update of the cart item

Schema

    cart_id string
    customer_session_id string
    shipping_country string

    line_items

    object[]

  • Array [

  • id string
    supplier string

    product_available_shippings

    object[]

  • Array [

  • id string
    name string
    description string
    country_code string

    price

    object

    amount number
    amount_incl_taxes number
    tax_amount number
    tax_rate number
    currency_code string
  • ]

  • product_brand string
    product_sku string
    product_barcode string
    product_id number
    product_title string

    product_image

    object[]

  • Array [

  • id number
    url string
    width number
    height number
  • ]

  • variant_id numbernullable
    variant_title stringnullable
    variant object[]
    quantity number

    shipping

    object

    nullable

    id string
    name string
    description string

    price

    object

    amount number
    amount_incl_taxes number
    tax_amount number
    tax_rate number
    currency_code string

    price

    object

    amount number
    discount number
    currency_code string
    compare_at number
    amount_incl_taxes number
    compare_at_incl_taxes number
    tax_amount number
    tax_rate number
  • ]

  • subtotal number
    shipping number
    currency string
    available_shipping_countries string[]
Loading...