Shop

Get a cart line

get/cart-items/{id}

Request

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

Query parameters

cart-itemsstring

fields[cart-items]=product_id,quantity returns only those fields; included items are added whole.

includestring

Adds related items to each item, one level deep: product. Comma separated.

Headers

If-None-Matchstring

An ETag from an earlier answer; an unchanged item answers 304 with no body.

Response

The cart line. With include the ETag is weak, as it covers the included items too.

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.