{ "opencollection": "1.0.0", "info": { "name": "commercetools Change History Carts Orders API", "version": "1.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Orders", "type": "folder" }, "items": [ { "info": { "name": "List orders", "type": "http" }, "http": { "method": "GET", "url": "https://history.{region}.commercetools.com/:projectKey/orders", "params": [ { "name": "projectKey", "value": "", "type": "path", "description": "The unique key identifying the commercetools project." }, { "name": "limit", "value": "", "type": "query", "description": "Maximum number of results to return. Defaults to 20, maximum 500." }, { "name": "offset", "value": "", "type": "query", "description": "Number of results to skip for pagination. Maximum 10000." }, { "name": "where", "value": "", "type": "query", "description": "Query predicate string for filtering results. Uses commercetools predicate syntax (e.g., 'customerEmail = \"user@example.com\"')." }, { "name": "sort", "value": "", "type": "query", "description": "Sort expression string (e.g., 'createdAt desc'). Multiple sort expressions can be provided as separate parameters." }, { "name": "expand", "value": "", "type": "query", "description": "Reference expansion path to inline referenced resources in the response (e.g., 'productType', 'categories[*]')." } ] }, "docs": "Returns a paginated list of orders in the project. Supports filtering by customer ID, order state, payment state, shipment state, and other predicates. Orders are created from carts upon successful checkout." }, { "info": { "name": "Create an order from a cart", "type": "http" }, "http": { "method": "POST", "url": "https://history.{region}.commercetools.com/:projectKey/orders", "params": [ { "name": "projectKey", "value": "", "type": "path", "description": "The unique key identifying the commercetools project." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates an order from an existing active cart. The cart is transitioned to the Ordered state. The request body requires the cart ID, version, and optionally an order number and payment state." }, { "info": { "name": "Get an order by ID", "type": "http" }, "http": { "method": "GET", "url": "https://history.{region}.commercetools.com/:projectKey/orders/:id", "params": [ { "name": "projectKey", "value": "", "type": "path", "description": "The unique key identifying the commercetools project." }, { "name": "id", "value": "", "type": "path", "description": "The system-generated unique identifier of the resource." }, { "name": "expand", "value": "", "type": "query", "description": "Reference expansion path to inline referenced resources in the response (e.g., 'productType', 'categories[*]')." } ] }, "docs": "Retrieves a single order by its system-generated ID, including all line items, deliveries, return items, payment information, and state history." }, { "info": { "name": "Update an order by ID", "type": "http" }, "http": { "method": "POST", "url": "https://history.{region}.commercetools.com/:projectKey/orders/:id", "params": [ { "name": "projectKey", "value": "", "type": "path", "description": "The unique key identifying the commercetools project." }, { "name": "id", "value": "", "type": "path", "description": "The system-generated unique identifier of the resource." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Applies update actions to the order with the given ID. Common actions include changing order state, adding deliveries, adding return info, setting tracking data, and updating payment state." }, { "info": { "name": "Delete an order by ID", "type": "http" }, "http": { "method": "DELETE", "url": "https://history.{region}.commercetools.com/:projectKey/orders/:id", "params": [ { "name": "projectKey", "value": "", "type": "path", "description": "The unique key identifying the commercetools project." }, { "name": "id", "value": "", "type": "path", "description": "The system-generated unique identifier of the resource." }, { "name": "version", "value": "", "type": "query", "description": "Current version of the resource for optimistic concurrency control." } ] }, "docs": "Permanently deletes the order with the given ID. This operation cannot be undone. Only orders that have not been shipped or paid should be deleted." }, { "info": { "name": "Import orders", "type": "http" }, "http": { "method": "POST", "url": "https://history.{region}.commercetools.com/:projectKey/orders/import-containers/:importContainerKey", "params": [ { "name": "projectKey", "value": "", "type": "path", "description": "The unique key of the commercetools project." }, { "name": "importContainerKey", "value": "", "type": "path", "description": "The user-defined key of the import container." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Submits a batch of order import requests for asynchronous processing. Order imports bypass the normal checkout flow and directly create orders in the system. Each request accepts up to 20 order resources." } ] } ], "bundled": true }