commercetools · Capability

commercetools HTTP API — Customers

commercetools HTTP API — Customers. 5 operations. Lead operation: List customers. Self-contained Naftiko capability covering one Commercetools business surface.

Run with Naftiko CommercetoolsCustomers

What You Can Do

GET
Listcustomers — List customers
/v1/{projectkey}/customers
POST
Createcustomer — Create a customer
/v1/{projectkey}/customers
GET
Getcustomerbyid — Get a customer by ID
/v1/{projectkey}/customers/{id}
POST
Updatecustomerbyid — Update a customer by ID
/v1/{projectkey}/customers/{id}
DELETE
Deletecustomerbyid — Delete a customer by ID
/v1/{projectkey}/customers/{id}

MCP Tools

list-customers

List customers

read-only idempotent
create-customer

Create a customer

get-customer-id

Get a customer by ID

read-only idempotent
update-customer-id

Update a customer by ID

delete-customer-id

Delete a customer by ID

idempotent

Capability Spec

http-customers.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: commercetools HTTP API — Customers
  description: 'commercetools HTTP API — Customers. 5 operations. Lead operation: List customers. Self-contained Naftiko capability
    covering one Commercetools business surface.'
  tags:
  - Commercetools
  - Customers
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COMMERCETOOLS_API_KEY: COMMERCETOOLS_API_KEY
capability:
  consumes:
  - type: http
    namespace: http-customers
    baseUri: https://api.{region}.commercetools.com
    description: commercetools HTTP API — Customers business capability. Self-contained, no shared references.
    resources:
    - name: projectKey-customers
      path: /{projectKey}/customers
      operations:
      - name: listcustomers
        method: GET
        description: List customers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createcustomer
        method: POST
        description: Create a customer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: projectKey-customers-id
      path: /{projectKey}/customers/{id}
      operations:
      - name: getcustomerbyid
        method: GET
        description: Get a customer by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatecustomerbyid
        method: POST
        description: Update a customer by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecustomerbyid
        method: DELETE
        description: Delete a customer by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.COMMERCETOOLS_API_KEY}}'
  exposes:
  - type: rest
    namespace: http-customers-rest
    port: 8080
    description: REST adapter for commercetools HTTP API — Customers. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/{projectkey}/customers
      name: projectkey-customers
      description: REST surface for projectKey-customers.
      operations:
      - method: GET
        name: listcustomers
        description: List customers
        call: http-customers.listcustomers
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcustomer
        description: Create a customer
        call: http-customers.createcustomer
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{projectkey}/customers/{id}
      name: projectkey-customers-id
      description: REST surface for projectKey-customers-id.
      operations:
      - method: GET
        name: getcustomerbyid
        description: Get a customer by ID
        call: http-customers.getcustomerbyid
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: updatecustomerbyid
        description: Update a customer by ID
        call: http-customers.updatecustomerbyid
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecustomerbyid
        description: Delete a customer by ID
        call: http-customers.deletecustomerbyid
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: http-customers-mcp
    port: 9090
    transport: http
    description: MCP adapter for commercetools HTTP API — Customers. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-customers
      description: List customers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-customers.listcustomers
      outputParameters:
      - type: object
        mapping: $.
    - name: create-customer
      description: Create a customer
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-customers.createcustomer
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-customer-id
      description: Get a customer by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-customers.getcustomerbyid
      outputParameters:
      - type: object
        mapping: $.
    - name: update-customer-id
      description: Update a customer by ID
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-customers.updatecustomerbyid
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-customer-id
      description: Delete a customer by ID
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: http-customers.deletecustomerbyid
      outputParameters:
      - type: object
        mapping: $.