commercetools · Schema

Cart

A shopping cart resource containing line items, discounts, shipping configuration, and pricing.

CommerceComposable CommerceE-CommerceGraphQLRESTSDK

Properties

Name Type Description
id string System-generated unique identifier.
version integer Current version for optimistic concurrency control.
key string User-defined unique identifier.
customerId string ID of the customer who owns this cart.
customerEmail string Email of the customer associated with this cart.
cartState string Current state of the cart lifecycle.
lineItems array Product line items in the cart.
customLineItems array Custom line items with user-defined pricing.
totalPrice object
taxedPrice object The total price with tax breakdown if tax calculation is complete.
billingAddress object
shippingAddress object
taxMode string Tax calculation mode for this cart.
inventoryMode string Inventory tracking mode for line items.
createdAt string ISO 8601 timestamp when the cart was created.
lastModifiedAt string ISO 8601 timestamp when the cart was last modified.
View JSON Schema on GitHub

JSON Schema

commercetools-cart-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Cart",
  "title": "Cart",
  "type": "object",
  "description": "A shopping cart resource containing line items, discounts, shipping configuration, and pricing.",
  "required": [
    "id",
    "version",
    "cartState",
    "lineItems",
    "customLineItems",
    "totalPrice"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "System-generated unique identifier."
    },
    "version": {
      "type": "integer",
      "description": "Current version for optimistic concurrency control."
    },
    "key": {
      "type": "string",
      "description": "User-defined unique identifier."
    },
    "customerId": {
      "type": "string",
      "description": "ID of the customer who owns this cart."
    },
    "customerEmail": {
      "type": "string",
      "format": "email",
      "description": "Email of the customer associated with this cart."
    },
    "cartState": {
      "type": "string",
      "enum": [
        "Active",
        "Merged",
        "Ordered",
        "Frozen"
      ],
      "description": "Current state of the cart lifecycle."
    },
    "lineItems": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/LineItem"
      },
      "description": "Product line items in the cart."
    },
    "customLineItems": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Custom line items with user-defined pricing."
    },
    "totalPrice": {
      "$ref": "#/components/schemas/Money"
    },
    "taxedPrice": {
      "type": "object",
      "description": "The total price with tax breakdown if tax calculation is complete."
    },
    "billingAddress": {
      "$ref": "#/components/schemas/Address"
    },
    "shippingAddress": {
      "$ref": "#/components/schemas/Address"
    },
    "taxMode": {
      "type": "string",
      "enum": [
        "Platform",
        "External",
        "ExternalAmount",
        "Disabled"
      ],
      "description": "Tax calculation mode for this cart."
    },
    "inventoryMode": {
      "type": "string",
      "enum": [
        "None",
        "TrackOnly",
        "ReserveOnOrder"
      ],
      "description": "Inventory tracking mode for line items."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the cart was created."
    },
    "lastModifiedAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the cart was last modified."
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/commercetools-cart"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.