{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/commercetools/main/json-schema/commercetools-order-paged-query-response-schema.json", "title": "OrderPagedQueryResponse", "description": "Paginated response containing a list of orders.", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/commercetools-orders-api-openapi.yml#/components/schemas/OrderPagedQueryResponse", "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/Order" } } }, "$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." } } }, "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." } } }, "Order": { "type": "object", "description": "An order created from a cart after checkout, containing immutable line items, pricing, and fulfillment data.", "required": [ "id", "version", "orderState", "lineItems", "customLineItems", "totalPrice" ], "properties": { "id": { "type": "string", "description": "System-generated unique identifier." }, "version": { "type": "integer", "description": "Current version for optimistic concurrency control." }, "orderNumber": { "type": "string", "description": "User-defined order number for human-readable identification." }, "customerId": { "type": "string", "description": "ID of the customer who placed the order." }, "customerEmail": { "type": "string", "format": "email", "description": "Email of the customer at time of order." }, "orderState": { "type": "string", "enum": [ "Open", "Confirmed", "Complete", "Cancelled" ], "description": "Current high-level state of the order." }, "shipmentState": { "type": "string", "enum": [ "Shipped", "Ready", "Pending", "Delayed", "Partial", "Backorder" ], "description": "Current fulfillment state of the order." }, "paymentState": { "type": "string", "enum": [ "Paid", "Pending", "Failed", "CreditOwed", "BalanceDue" ], "description": "Current payment state of the order." }, "lineItems": { "type": "array", "items": { "$ref": "#/$defs/LineItem" }, "description": "Line items captured at time of order creation." }, "customLineItems": { "type": "array", "items": { "type": "object" }, "description": "Custom line items captured at time of order creation." }, "totalPrice": { "$ref": "#/$defs/Money" }, "billingAddress": { "$ref": "#/$defs/Address" }, "shippingAddress": { "$ref": "#/$defs/Address" }, "createdAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the order was created." }, "lastModifiedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp when the order was last modified." } } }, "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." } } } } }