﻿> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Cart

GraphQL object

A cart

Reference: https://docs.bigcommerce.com/developer/api-reference/graphql/storefront/types/objects/cart

## Fields

- `id` — The ID of an object
- `entityId` — Cart ID.
- `currencyCode` — ISO-4217 currency code.
- `displayCurrencyCode` — ISO-4217 currency code. Applied DisplayCurrencyCode for the cart.
- `isTaxIncluded` — Whether this item is taxable.
- `baseAmount` — Cost of cart's contents, before applying discounts.
- `baseAmountInDisplayCurrency` — Base amount in display currency.
- `discountedAmount` — Discounted amount.
- `discountedAmountInDisplayCurrency` — Discounted amount in display currency.
- `amount` — Sum of line-items amounts, minus cart-level discounts and coupons. This amount includes taxes (where applicable).
- `amountInDisplayCurrency` — Amount in display currency.
- `discounts` — List of discounts applied to this cart.
- `lineItems` — List of line items.
- `createdAt` — Time when the cart was created.
- `updatedAt` — Time when the cart was last updated.
- `locale` — Locale of the cart.
- `version` — The current version of the cart, which is updated with every change.
- `externalSource` — The external source that the cart originated from.
- `metafields` — Metafield data related to a cart.
- `source` — The source that created the cart.
- `companyId` — The B2B company ID associated with the cart.

## Definition

```graphql
type Cart implements Node {
  id: String!
  entityId: String!
  currencyCode: String!
  displayCurrencyCode: String!
  isTaxIncluded: Boolean!
  baseAmount: Money!
  baseAmountInDisplayCurrency: Money!
  discountedAmount: Money!
  discountedAmountInDisplayCurrency: Money!
  amount: Money!
  amountInDisplayCurrency: Money!
  discounts: [CartDiscount!]!
  lineItems: CartLineItems!
  createdAt: DateTimeExtended!
  updatedAt: DateTimeExtended!
  locale: String!
  version: Int
  externalSource: String
  metafields(namespace: String!, keys: [String!], before: String, after: String, first: Int, last: Int): MetafieldConnection!
  source: CartSource
  companyId: Int
}
```