{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/commercetools/main/json-schema/commercetools-cart-paged-query-response-schema.json", "title": "CartPagedQueryResponse", "description": "Paginated response containing a list of carts.", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/commercetools-carts-api-openapi.yml#/components/schemas/CartPagedQueryResponse", "type": "object", "required": [ "limit", "offset", "count", "total", "results" ], "properties": { "limit": { "type": "integer" }, "offset": { "type": "integer" }, "count": { "type": "integer" }, "total": { "type": "integer" }, "results": { "type": "array", "items": { "$ref": "#/$defs/Cart" } } }, "$defs": { "Address": { "type": "object", "description": "A postal address with country and optional structured fields.", "required": [ "country" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the address within the resource." }, "key": { "type": "string", "description": "User-defined identifier for the address." }, "country": { "type": "string", "description": "ISO 3166-1 alpha-2 country code." }, "firstName": { "type": "string", "description": "First name of the address recipient." }, "lastName": { "type": "string", "description": "Last name of the address recipient." }, "streetName": { "type": "string", "description": "Street name component of the address." }, "streetNumber": { "type": "string", "description": "Street number component of the address." }, "city": { "type": "string", "description": "City of the address." }, "postalCode": { "type": "string", "description": "Postal or ZIP code of the address." }, "region": { "type": "string", "description": "Region, state, or province of the address." }, "email": { "type": "string", "format": "email", "description": "Email address associated with this postal address." }, "phone": { "type": "string", "description": "Phone number associated with this postal address." } } }, "Attribute": { "type": "object", "description": "A name-value pair representing a product attribute as defined by the product type.", "required": [ "name", "value" ], "properties": { "name": { "type": "string", "description": "Attribute name as defined in the product type." }, "value": { "description": "Attribute value. Type depends on the attribute type definition." } } }, "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": "#/$defs/LineItem" }, "description": "Product line items in the cart." }, "customLineItems": { "type": "array", "items": { "type": "object" }, "description": "Custom line items with user-defined pricing." }, "totalPrice": { "$ref": "#/$defs/Money" }, "taxedPrice": { "type": "object", "description": "The total price with tax breakdown if tax calculation is complete." }, "billingAddress": { "$ref": "#/$defs/Address" }, "shippingAddress": { "$ref": "#/$defs/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." } } }, "Image": { "type": "object", "description": "A product image with URL, dimensions, and optional label.", "required": [ "url", "dimensions" ], "properties": { "url": { "type": "string", "format": "uri", "description": "URL of the image." }, "dimensions": { "type": "object", "description": "Pixel dimensions of the image.", "required": [ "w", "h" ], "properties": { "w": { "type": "integer", "description": "Image width in pixels." }, "h": { "type": "integer", "description": "Image height in pixels." } } }, "label": { "type": "string", "description": "Optional label for the image." } } }, "LineItem": { "type": "object", "description": "A product line item in a cart or order with quantity, pricing, and discount information.", "required": [ "id", "productId", "name", "variant", "price", "totalPrice", "quantity", "lineItemMode", "priceMode" ], "properties": { "id": { "type": "string", "description": "Unique identifier for the line item within the cart." }, "productId": { "type": "string", "description": "ID of the product this line item references." }, "name": { "$ref": "#/$defs/LocalizedString" }, "variant": { "$ref": "#/$defs/ProductVariant" }, "price": { "$ref": "#/$defs/Price" }, "totalPrice": { "$ref": "#/$defs/Money" }, "quantity": { "type": "integer", "minimum": 1, "description": "Quantity of this product variant in the cart." }, "lineItemMode": { "type": "string", "enum": [ "Standard", "GiftLineItem" ], "description": "Whether this is a standard or gift line item." }, "priceMode": { "type": "string", "enum": [ "Platform", "ExternalTotal", "ExternalPrice" ], "description": "How the price for this line item is determined." } } }, "LocalizedString": { "type": "object", "description": "A map of locale keys to string values used for multilingual content. Keys follow IETF language tag format (e.g., 'en', 'de', 'en-US').", "additionalProperties": { "type": "string" } }, "Money": { "type": "object", "description": "A monetary value with currency code and amount in the smallest currency unit.", "required": [ "currencyCode", "centAmount" ], "properties": { "currencyCode": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 three-letter currency code (e.g., USD, EUR)." }, "centAmount": { "type": "integer", "description": "The amount in the smallest indivisible unit of the currency." }, "fractionDigits": { "type": "integer", "description": "Number of fraction digits for the currency. Defaults to 2." } } }, "Price": { "type": "object", "description": "A price entry for a product variant with optional scoping by channel, customer group, country, or validity period.", "required": [ "id", "value" ], "properties": { "id": { "type": "string", "description": "System-generated unique identifier for the price." }, "value": { "$ref": "#/$defs/Money" }, "country": { "type": "string", "description": "ISO 3166-1 alpha-2 country code to scope the price geographically." }, "customerGroup": { "$ref": "#/$defs/Reference" }, "channel": { "$ref": "#/$defs/Reference" }, "validFrom": { "type": "string", "format": "date-time", "description": "Start of the price validity period." }, "validUntil": { "type": "string", "format": "date-time", "description": "End of the price validity period." } } }, "ProductVariant": { "type": "object", "description": "A product variant with SKU, attributes, prices, and images.", "required": [ "id" ], "properties": { "id": { "type": "integer", "description": "Variant ID unique within the product (starting at 1 for master)." }, "sku": { "type": "string", "description": "Stock keeping unit identifier for this variant." }, "key": { "type": "string", "description": "User-defined unique key for the variant." }, "prices": { "type": "array", "items": { "$ref": "#/$defs/Price" }, "description": "List of prices for different currencies, channels, and customer groups." }, "attributes": { "type": "array", "items": { "$ref": "#/$defs/Attribute" }, "description": "Product attributes as defined by the product type." }, "images": { "type": "array", "items": { "$ref": "#/$defs/Image" }, "description": "List of images for this variant." } } }, "Reference": { "type": "object", "description": "A reference to another resource by its typeId and id.", "required": [ "typeId", "id" ], "properties": { "typeId": { "type": "string", "description": "The type identifier of the referenced resource (e.g., 'product', 'category')." }, "id": { "type": "string", "description": "The system-generated unique identifier of the referenced resource." } } } } }