Shop

Change a cart line (JSON Merge Patch)

patch/cart-items/{id}

Request

  • Base URL
    https://gorest.co.in/public/v3
  • URL
    https://gorest.co.in/public/v3/cart-items/{id}
  • Auth
    HTTP bearer

Headers

If-Matchstring

The strong ETag the change is based on, from a read without include or from the last write; when the item changed since, the answer is 412. A weak ETag never matches.

Prefer'return=minimal' | 'return=representation'

return=minimal for an answer with no body, return=representation (the default) for the full item (RFC 7240).

Request body

quantityinteger required

Response

The changed cart line.

cart_idstring uuid
created_atstring date-time
currencystring

The cart's currency.

idstring uuid required
product_idstring uuid
quantityinteger
read_onlyboolean

True for sample data (the seed); it cannot be changed.

updated_atstring date-time

Example response

{
  "product": {
    "category": {
      "name": "Home and kitchen",
      "slug": "home-kitchen"
    },
    "currency": "INR",
    "name": "Wireless earbuds",
    "price_minor": 249900,
    "sku": "EL-1001"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.