CMiC · Capability

CMiC Construction ERP API — Subcontractors

CMiC Construction ERP API — Subcontractors. 2 operations. Lead operation: List vendors and subcontractors. Self-contained Naftiko capability covering one Cmic business surface.

Run with Naftiko CmicSubcontractors

What You Can Do

GET
Listvendors — List vendors and subcontractors
/v1/ap-rest-api/v1/apvendor
GET
Getvendor — Get vendor details
/v1/ap-rest-api/v1/apvendor/{vendorid}

MCP Tools

list-vendors-and-subcontractors

List vendors and subcontractors

read-only idempotent
get-vendor-details

Get vendor details

read-only idempotent

Capability Spec

construction-erp-subcontractors.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CMiC Construction ERP API — Subcontractors
  description: 'CMiC Construction ERP API — Subcontractors. 2 operations. Lead operation: List vendors and subcontractors.
    Self-contained Naftiko capability covering one Cmic business surface.'
  tags:
  - Cmic
  - Subcontractors
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CMIC_API_KEY: CMIC_API_KEY
capability:
  consumes:
  - type: http
    namespace: construction-erp-subcontractors
    baseUri: https://api.cmic.ca/rest
    description: CMiC Construction ERP API — Subcontractors business capability. Self-contained, no shared references.
    resources:
    - name: ap-rest-api-v1-APvendor
      path: /ap-rest-api/v1/APvendor
      operations:
      - name: listvendors
        method: GET
        description: List vendors and subcontractors
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vendorType
          in: query
          type: string
        - name: limit
          in: query
          type: integer
    - name: ap-rest-api-v1-APvendor-vendorId
      path: /ap-rest-api/v1/APvendor/{vendorId}
      operations:
      - name: getvendor
        method: GET
        description: Get vendor details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vendorId
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.CMIC_API_KEY}}'
  exposes:
  - type: rest
    namespace: construction-erp-subcontractors-rest
    port: 8080
    description: REST adapter for CMiC Construction ERP API — Subcontractors. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/ap-rest-api/v1/apvendor
      name: ap-rest-api-v1-apvendor
      description: REST surface for ap-rest-api-v1-APvendor.
      operations:
      - method: GET
        name: listvendors
        description: List vendors and subcontractors
        call: construction-erp-subcontractors.listvendors
        with:
          vendorType: rest.vendorType
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/ap-rest-api/v1/apvendor/{vendorid}
      name: ap-rest-api-v1-apvendor-vendorid
      description: REST surface for ap-rest-api-v1-APvendor-vendorId.
      operations:
      - method: GET
        name: getvendor
        description: Get vendor details
        call: construction-erp-subcontractors.getvendor
        with:
          vendorId: rest.vendorId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: construction-erp-subcontractors-mcp
    port: 9090
    transport: http
    description: MCP adapter for CMiC Construction ERP API — Subcontractors. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: list-vendors-and-subcontractors
      description: List vendors and subcontractors
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: construction-erp-subcontractors.listvendors
      with:
        vendorType: tools.vendorType
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: get-vendor-details
      description: Get vendor details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: construction-erp-subcontractors.getvendor
      with:
        vendorId: tools.vendorId
      outputParameters:
      - type: object
        mapping: $.