{ "opencollection": "1.0.0", "info": { "name": "commercetools Change History Carts Categories API", "version": "1.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Categories", "type": "folder" }, "items": [ { "info": { "name": "List categories", "type": "http" }, "http": { "method": "GET", "url": "https://history.{region}.commercetools.com/:projectKey/categories", "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 all categories in the project. Categories can be filtered and sorted using standard query predicates. Use parent references to reconstruct the category hierarchy." }, { "info": { "name": "Create a category", "type": "http" }, "http": { "method": "POST", "url": "https://history.{region}.commercetools.com/:projectKey/categories", "params": [ { "name": "projectKey", "value": "", "type": "path", "description": "The unique key identifying the commercetools project." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates a new category. Categories support localized names, slugs, and metadata, and can optionally reference a parent category to build a hierarchy." }, { "info": { "name": "Get a category by ID", "type": "http" }, "http": { "method": "GET", "url": "https://history.{region}.commercetools.com/:projectKey/categories/: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 category by its system-generated unique identifier, including its ancestors array representing the full path to the root category." }, { "info": { "name": "Update a category by ID", "type": "http" }, "http": { "method": "POST", "url": "https://history.{region}.commercetools.com/:projectKey/categories/: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 category with the given ID. Supported actions include changing the name, slug, parent, order hint, and custom fields." }, { "info": { "name": "Delete a category by ID", "type": "http" }, "http": { "method": "DELETE", "url": "https://history.{region}.commercetools.com/:projectKey/categories/: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 category with the given ID. The current version must be provided. Categories with children or product assignments cannot be deleted until those references are removed." }, { "info": { "name": "Import categories", "type": "http" }, "http": { "method": "POST", "url": "https://history.{region}.commercetools.com/:projectKey/categories/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 category import requests for asynchronous processing. Categories are matched by key for upsert behavior. Parent category references are resolved after all categories in the batch are processed." } ] } ], "bundled": true }