Optimizely · Capability

Optimizely Commerce Service API — Orders

Optimizely Commerce Service API — Orders. 3 operations. Lead operation: Search orders. Self-contained Naftiko capability covering one Optimizely business surface.

Run with Naftiko OptimizelyOrders

What You Can Do

GET
Searchorders — Search orders
/v1/commerce/orders/search/{start}/{maxcount}
GET
Listcustomerorders — List customer orders
/v1/commerce/orders/{customerid}/all
GET
Getorder — Get an order
/v1/commerce/orders/{ordergroupid}

MCP Tools

search-orders

Search orders

read-only idempotent
list-customer-orders

List customer orders

read-only idempotent
get-order

Get an order

read-only idempotent

Capability Spec

commerce-service-orders.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Optimizely Commerce Service API — Orders
  description: 'Optimizely Commerce Service API — Orders. 3 operations. Lead operation: Search orders. Self-contained Naftiko
    capability covering one Optimizely business surface.'
  tags:
  - Optimizely
  - Orders
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OPTIMIZELY_API_KEY: OPTIMIZELY_API_KEY
capability:
  consumes:
  - type: http
    namespace: commerce-service-orders
    baseUri: ''
    description: Optimizely Commerce Service API — Orders business capability. Self-contained, no shared references.
    resources:
    - name: commerce-orders-search-start-maxCount
      path: /commerce/orders/search/{start}/{maxCount}
      operations:
      - name: searchorders
        method: GET
        description: Search orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: start
          in: path
          type: integer
          description: Starting index for results
          required: true
        - name: maxCount
          in: path
          type: integer
          description: Maximum number of results to return
          required: true
    - name: commerce-orders-customerId-all
      path: /commerce/orders/{customerId}/all
      operations:
      - name: listcustomerorders
        method: GET
        description: List customer orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: commerce-orders-orderGroupId
      path: /commerce/orders/{orderGroupId}
      operations:
      - name: getorder
        method: GET
        description: Get an order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.OPTIMIZELY_API_KEY}}'
  exposes:
  - type: rest
    namespace: commerce-service-orders-rest
    port: 8080
    description: REST adapter for Optimizely Commerce Service API — Orders. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/commerce/orders/search/{start}/{maxcount}
      name: commerce-orders-search-start-maxcount
      description: REST surface for commerce-orders-search-start-maxCount.
      operations:
      - method: GET
        name: searchorders
        description: Search orders
        call: commerce-service-orders.searchorders
        with:
          start: rest.start
          maxCount: rest.maxCount
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/commerce/orders/{customerid}/all
      name: commerce-orders-customerid-all
      description: REST surface for commerce-orders-customerId-all.
      operations:
      - method: GET
        name: listcustomerorders
        description: List customer orders
        call: commerce-service-orders.listcustomerorders
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/commerce/orders/{ordergroupid}
      name: commerce-orders-ordergroupid
      description: REST surface for commerce-orders-orderGroupId.
      operations:
      - method: GET
        name: getorder
        description: Get an order
        call: commerce-service-orders.getorder
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: commerce-service-orders-mcp
    port: 9090
    transport: http
    description: MCP adapter for Optimizely Commerce Service API — Orders. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: search-orders
      description: Search orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: commerce-service-orders.searchorders
      with:
        start: tools.start
        maxCount: tools.maxCount
      outputParameters:
      - type: object
        mapping: $.
    - name: list-customer-orders
      description: List customer orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: commerce-service-orders.listcustomerorders
      outputParameters:
      - type: object
        mapping: $.
    - name: get-order
      description: Get an order
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: commerce-service-orders.getorder
      outputParameters:
      - type: object
        mapping: $.