target · Capability

Target API — Orders

Target API — Orders. 2 operations. Lead operation: List Orders. Self-contained Naftiko capability covering one Target business surface.

Run with Naftiko TargetOrders

What You Can Do

GET
Listorders — List Orders
/v1/orders/v1
GET
Getorder — Get Order Details
/v1/orders/v1/{order-id}

MCP Tools

list-orders

List Orders

read-only idempotent
get-order-details

Get Order Details

read-only idempotent

Capability Spec

target-orders.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Target API — Orders
  description: 'Target API — Orders. 2 operations. Lead operation: List Orders. Self-contained Naftiko capability covering
    one Target business surface.'
  tags:
  - Target
  - Orders
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TARGET_API_KEY: TARGET_API_KEY
capability:
  consumes:
  - type: http
    namespace: target-orders
    baseUri: https://api.target.com
    description: Target API — Orders business capability. Self-contained, no shared references.
    resources:
    - name: orders-v1
      path: /orders/v1
      operations:
      - name: listorders
        method: GET
        description: List Orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: status
          in: query
          type: string
          description: Filter by order status
        - name: from_date
          in: query
          type: string
          description: Start date filter (ISO 8601)
        - name: to_date
          in: query
          type: string
          description: End date filter (ISO 8601)
        - name: limit
          in: query
          type: integer
          description: Maximum orders to return
        - name: offset
          in: query
          type: integer
          description: Pagination offset
    - name: orders-v1-order_id
      path: /orders/v1/{order_id}
      operations:
      - name: getorder
        method: GET
        description: Get Order Details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: order_id
          in: path
          type: string
          description: Target order ID
          required: true
    authentication:
      type: bearer
      token: '{{env.TARGET_API_KEY}}'
  exposes:
  - type: rest
    namespace: target-orders-rest
    port: 8080
    description: REST adapter for Target API — Orders. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/orders/v1
      name: orders-v1
      description: REST surface for orders-v1.
      operations:
      - method: GET
        name: listorders
        description: List Orders
        call: target-orders.listorders
        with:
          status: rest.status
          from_date: rest.from_date
          to_date: rest.to_date
          limit: rest.limit
          offset: rest.offset
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orders/v1/{order-id}
      name: orders-v1-order-id
      description: REST surface for orders-v1-order_id.
      operations:
      - method: GET
        name: getorder
        description: Get Order Details
        call: target-orders.getorder
        with:
          order_id: rest.order_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: target-orders-mcp
    port: 9090
    transport: http
    description: MCP adapter for Target API — Orders. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-orders
      description: List Orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: target-orders.listorders
      with:
        status: tools.status
        from_date: tools.from_date
        to_date: tools.to_date
        limit: tools.limit
        offset: tools.offset
      outputParameters:
      - type: object
        mapping: $.
    - name: get-order-details
      description: Get Order Details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: target-orders.getorder
      with:
        order_id: tools.order_id
      outputParameters:
      - type: object
        mapping: $.