Commercetools HTTP API

The commercetools HTTP API is the core REST interface for programmatic access to all data and functionality within a Composable Commerce project. It covers a broad range of commerce resources including products, product types, categories, carts, orders, customers, payments, discounts, inventory, shipping methods, stores, and business units. All resources follow RESTful conventions using standard HTTP verbs and return JSON responses.

OpenAPI Specification

commercetools-http-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: commercetools HTTP API
  description: >-
    The commercetools HTTP API is the core REST interface for programmatic access
    to all data and functionality within a Composable Commerce project. It covers
    a broad range of commerce resources including products, product types, categories,
    carts, orders, customers, payments, discounts, inventory, shipping methods,
    stores, and business units. All resources follow RESTful conventions using
    standard HTTP verbs and return JSON responses. Authentication is handled via
    OAuth 2.0 client credentials, and requests are scoped per project and resource
    type.
  version: '1.0'
  contact:
    name: commercetools Support
    url: https://support.commercetools.com
  termsOfService: https://commercetools.com/terms-conditions
externalDocs:
  description: commercetools HTTP API Documentation
  url: https://docs.commercetools.com/api
servers:
  - url: https://api.{region}.commercetools.com
    description: Production Server
    variables:
      region:
        default: us-central1.gcp
        enum:
          - us-central1.gcp
          - us-east-2.aws
          - europe-west1.gcp
          - eu-central-1.aws
          - australia-southeast1.gcp
        description: The deployment region for the commercetools API.
tags:
  - name: Carts
    description: Manage shopping carts with line items, discounts, shipping, and tax calculations.
  - name: Categories
    description: Organize products into hierarchical category structures.
  - name: Customers
    description: Manage customer accounts, addresses, authentication, and group assignments.
  - name: Inventory
    description: Manage inventory entries tracking stock levels per channel and SKU.
  - name: Orders
    description: Create and manage orders resulting from cart checkouts or quotes.
  - name: Payments
    description: Track payment transactions and PSP interactions associated with orders.
  - name: Products
    description: Manage product catalog entries including variants, images, prices, and attributes.
  - name: Project
    description: Read and configure project-level settings including currencies, languages, and messages.
  - name: Subscriptions
security:
  - bearerAuth: []
paths:
  /{projectKey}/products:
    get:
      operationId: listProducts
      summary: List products
      description: >-
        Returns a paginated list of all products in the project. Supports
        filtering, sorting, and field expansion via query parameters. Use the
        Product Projections endpoint for storefront display queries.
      tags:
        - Products
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
        - $ref: '#/components/parameters/sortQuery'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A paged list of products.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductPagedQueryResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createProduct
      summary: Create a product
      description: >-
        Creates a new product with the given draft. The product type reference
        in the draft determines which attributes are valid. The product is
        created with a staged version and requires publication to become visible
        in product projections.
      tags:
        - Products
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductDraft'
      responses:
        '201':
          description: The created product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /{projectKey}/products/{id}:
    get:
      operationId: getProductById
      summary: Get a product by ID
      description: >-
        Retrieves a single product by its system-generated ID. The response
        includes both the current (published) and staged versions of the product
        data.
      tags:
        - Products
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: The requested product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updateProductById
      summary: Update a product by ID
      description: >-
        Applies one or more update actions to the product identified by the
        given ID. The request must include the current version to enable
        optimistic concurrency control. Supported actions include changing names,
        setting attributes, adding variants, and publishing.
      tags:
        - Products
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductUpdate'
      responses:
        '200':
          description: The updated product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          $ref: '#/components/responses/Conflict'
    delete:
      operationId: deleteProductById
      summary: Delete a product by ID
      description: >-
        Permanently deletes the product with the given ID. The current version
        must be provided as a query parameter for concurrency control. Deletion
        cannot be undone.
      tags:
        - Products
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          description: The deleted product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '409':
          $ref: '#/components/responses/Conflict'
  /{projectKey}/categories:
    get:
      operationId: listCategories
      summary: List categories
      description: >-
        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.
      tags:
        - Categories
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
        - $ref: '#/components/parameters/sortQuery'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A paged list of categories.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryPagedQueryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createCategory
      summary: Create a category
      description: >-
        Creates a new category. Categories support localized names, slugs, and
        metadata, and can optionally reference a parent category to build a
        hierarchy.
      tags:
        - Categories
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CategoryDraft'
      responses:
        '201':
          description: The created category.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Category'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{projectKey}/categories/{id}:
    get:
      operationId: getCategoryById
      summary: Get a category by ID
      description: >-
        Retrieves a single category by its system-generated unique identifier,
        including its ancestors array representing the full path to the root
        category.
      tags:
        - Categories
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: The requested category.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Category'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updateCategoryById
      summary: Update a category by ID
      description: >-
        Applies update actions to the category with the given ID. Supported
        actions include changing the name, slug, parent, order hint, and custom
        fields.
      tags:
        - Categories
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CategoryUpdate'
      responses:
        '200':
          description: The updated category.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Category'
    delete:
      operationId: deleteCategoryById
      summary: Delete a category by ID
      description: >-
        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.
      tags:
        - Categories
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          description: The deleted category.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Category'
  /{projectKey}/carts:
    get:
      operationId: listCarts
      summary: List carts
      description: >-
        Returns a paginated list of carts in the project. Supports filtering by
        customer ID, cart state, store key, and other predicates. Active carts
        are retained based on project-configured retention policies.
      tags:
        - Carts
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A paged list of carts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CartPagedQueryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createCart
      summary: Create a cart
      description: >-
        Creates a new shopping cart. The cart can be associated with a customer
        or anonymous session, assigned to a specific store, and configured with
        tax mode, inventory mode, and shipping mode settings.
      tags:
        - Carts
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CartDraft'
      responses:
        '201':
          description: The created cart.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{projectKey}/carts/{id}:
    get:
      operationId: getCartById
      summary: Get a cart by ID
      description: >-
        Retrieves a single cart by its system-generated ID, including all line
        items, applied discounts, shipping methods, and tax calculations.
      tags:
        - Carts
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: The requested cart.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updateCartById
      summary: Update a cart by ID
      description: >-
        Applies update actions to the cart with the given ID. Common actions
        include adding or removing line items, setting shipping addresses,
        applying discount codes, and setting customer details.
      tags:
        - Carts
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CartUpdate'
      responses:
        '200':
          description: The updated cart.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
    delete:
      operationId: deleteCartById
      summary: Delete a cart by ID
      description: >-
        Permanently deletes the cart with the given ID. The current version must
        be provided. Carts in the Ordered state cannot be deleted.
      tags:
        - Carts
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          description: The deleted cart.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
  /{projectKey}/orders:
    get:
      operationId: listOrders
      summary: List orders
      description: >-
        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.
      tags:
        - Orders
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
        - $ref: '#/components/parameters/sortQuery'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A paged list of orders.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderPagedQueryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createOrderFromCart
      summary: Create an order from a cart
      description: >-
        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.
      tags:
        - Orders
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderFromCartDraft'
      responses:
        '201':
          description: The created order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{projectKey}/orders/{id}:
    get:
      operationId: getOrderById
      summary: Get an order by ID
      description: >-
        Retrieves a single order by its system-generated ID, including all line
        items, deliveries, return items, payment information, and state history.
      tags:
        - Orders
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: The requested order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updateOrderById
      summary: Update an order by ID
      description: >-
        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.
      tags:
        - Orders
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderUpdate'
      responses:
        '200':
          description: The updated order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
    delete:
      operationId: deleteOrderById
      summary: Delete an order by ID
      description: >-
        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.
      tags:
        - Orders
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          description: The deleted order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
  /{projectKey}/customers:
    get:
      operationId: listCustomers
      summary: List customers
      description: >-
        Returns a paginated list of all customers in the project. Supports
        filtering by email, customer group, and other predicates. For large
        customer bases use the Customer Search endpoint for improved performance.
      tags:
        - Customers
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
        - $ref: '#/components/parameters/sortQuery'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A paged list of customers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPagedQueryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createCustomer
      summary: Create a customer
      description: >-
        Creates a new customer account. The email address must be unique within
        the project (or store if store-scoped). Optionally assigns the customer
        to a customer group and pre-verifies the email address.
      tags:
        - Customers
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerDraft'
      responses:
        '201':
          description: The created customer sign-in result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerSignInResult'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{projectKey}/customers/{id}:
    get:
      operationId: getCustomerById
      summary: Get a customer by ID
      description: >-
        Retrieves a single customer by their system-generated ID, including
        addresses, customer group assignments, store assignments, and custom
        fields.
      tags:
        - Customers
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: The requested customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updateCustomerById
      summary: Update a customer by ID
      description: >-
        Applies update actions to the customer with the given ID. Supported
        actions include adding addresses, changing email, setting customer group,
        adding store assignments, and setting custom fields.
      tags:
        - Customers
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerUpdate'
      responses:
        '200':
          description: The updated customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
    delete:
      operationId: deleteCustomerById
      summary: Delete a customer by ID
      description: >-
        Permanently deletes the customer with the given ID. The current version
        must be provided. Associated carts, orders, and payment records are not
        deleted.
      tags:
        - Customers
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          description: The deleted customer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
  /{projectKey}/payments:
    get:
      operationId: listPayments
      summary: List payments
      description: >-
        Returns a paginated list of payments in the project. Supports filtering
        by customer, interface ID, and other predicates. Payments track financial
        transactions and PSP interactions associated with orders.
      tags:
        - Payments
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A paged list of payments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentPagedQueryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createPayment
      summary: Create a payment
      description: >-
        Creates a new payment resource representing intent to pay a specific
        amount. The payment records PSP details, method information, and
        transaction history. Payments are linked to orders via the cart or order
        update actions.
      tags:
        - Payments
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentDraft'
      responses:
        '201':
          description: The created payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{projectKey}/payments/{id}:
    get:
      operationId: getPaymentById
      summary: Get a payment by ID
      description: >-
        Retrieves a single payment by its system-generated ID, including all
        transactions, interface interactions, payment method info, and current
        status.
      tags:
        - Payments
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: The requested payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updatePaymentById
      summary: Update a payment by ID
      description: >-
        Applies update actions to the payment with the given ID. Supported
        actions include adding transactions, setting the payment status, adding
        interface interactions, and setting custom fields.
      tags:
        - Payments
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentUpdate'
      responses:
        '200':
          description: The updated payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
  /{projectKey}/inventory:
    get:
      operationId: listInventoryEntries
      summary: List inventory entries
      description: >-
        Returns a paginated list of inventory entries. Each entry tracks the
        available quantity and restockable quantity for a specific SKU, optionally
        scoped to a supply channel. Supports filtering and sorting.
      tags:
        - Inventory
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
        - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A paged list of inventory entries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryPagedQueryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createInventoryEntry
      summary: Create an inventory entry
      description: >-
        Creates a new inventory entry for a given SKU. The entry can be scoped
        to a supply channel for multi-warehouse tracking. Optionally set expected
        delivery dates and restockable quantities.
      tags:
        - Inventory
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InventoryEntryDraft'
      responses:
        '201':
          description: The created inventory entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryEntry'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{projectKey}/subscriptions:
    get:
      operationId: listSubscriptions
      summary: List subscriptions
      description: >-
        Returns a paginated list of all subscriptions configured in the project.
        Subscriptions define destinations for change notifications and message
        delivery to external services such as SQS, SNS, Google Pub/Sub, or
        Azure Service Bus.
      tags:
        - Subscriptions
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/where'
      responses:
        '200':
          description: A paged list of subscriptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionPagedQueryResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createSubscription
      summary: Create a subscription
      description: >-
        Creates a new subscription that routes messages and change notifications
        to an external destination. Supported destinations include AWS SQS, SNS,
        EventBridge, Azure Service Bus, Event Grid, Google Pub/Sub, and Confluent
        Cloud. A maximum of 50 subscriptions per project is allowed.
      tags:
        - Subscriptions
      parameters:
        - $ref: '#/components/parameters/projectKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionDraft'
      responses:
        '201':
          description: The created subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/BadRequest'
  /{projectKey}/subscriptions/{id}:
    get:
      operationId: getSubscriptionById
      summary: Get a subscription by ID
      description: >-
        Retrieves a single subscription by its system-generated ID, including
        its destination configuration, message type filters, change filters, and
        delivery format settings.
      tags:
        - Subscriptions
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: The requested subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: updateSubscriptionById
      summary: Update a subscription by ID
      description: >-
        Applies update actions to the subscription with the given ID. Supported
        actions include changing the destination, setting message types, setting
        changes, and changing the format.
      tags:
        - Subscriptions
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionUpdate'
      responses:
        '200':
          description: The updated subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
    delete:
      operationId: deleteSubscriptionById
      summary: Delete a subscription by ID
      description: >-
        Permanently deletes the subscription with the given ID. The current
        version must be provided. After deletion, no further messages are routed
        to the associated destination.
      tags:
        - Subscriptions
      parameters:
        - $ref: '#/components/parameters/projectKey'
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          description: The deleted subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
  /{projectKey}:
    get:
      operationId: getProject

# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/commercetools/refs/heads/main/openapi/commercetools-http-api-openapi.yml