Codat · Capability

Platform API — Companies

Platform API — Companies. 12 operations. Lead operation: List companies. Self-contained Naftiko capability covering one Codat business surface.

Run with Naftiko CodatCompanies

What You Can Do

GET
Listcompanies — List companies
/v1/companies
POST
Createcompany — Create company
/v1/companies
GET
Getcompany — Get company
/v1/companies/{companyid}
DELETE
Deletecompany — Delete a company
/v1/companies/{companyid}
PUT
Replacecompany — Replace company
/v1/companies/{companyid}
PATCH
Updatecompany — Update company
/v1/companies/{companyid}
GET
Getcompanyaccesstoken — Get company access token
/v1/companies/{companyid}/accesstoken
PUT
Addproduct — Add product
/v1/companies/{companyid}/products/{productidentifier}
DELETE
Removeproduct — Remove product
/v1/companies/{companyid}/products/{productidentifier}
POST
Refreshproductdata — Refresh product data
/v1/companies/{companyid}/products/{productidentifier}/refresh
GET
Getcompanysyncsettings — Get company sync settings
/v1/companies/{companyid}/syncsettings
POST
Setcompanysyncsettings — Set company sync settings
/v1/companies/{companyid}/syncsettings

MCP Tools

list-companies

List companies

read-only idempotent
create-company

Create company

get-company

Get company

read-only idempotent
delete-company

Delete a company

idempotent
replace-company

Replace company

idempotent
update-company

Update company

idempotent
get-company-access-token

Get company access token

read-only idempotent
add-product

Add product

idempotent
remove-product

Remove product

idempotent
refresh-product-data

Refresh product data

get-company-sync-settings

Get company sync settings

read-only idempotent
set-company-sync-settings

Set company sync settings

Capability Spec

platform-companies.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Platform API — Companies
  description: 'Platform API — Companies. 12 operations. Lead operation: List companies. Self-contained Naftiko capability
    covering one Codat business surface.'
  tags:
  - Codat
  - Companies
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CODAT_API_KEY: CODAT_API_KEY
capability:
  consumes:
  - type: http
    namespace: platform-companies
    baseUri: https://api.codat.io
    description: Platform API — Companies business capability. Self-contained, no shared references.
    resources:
    - name: companies
      path: /companies
      operations:
      - name: listcompanies
        method: GET
        description: List companies
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tags
          in: query
          type: string
          description: Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with
            [Codat’s query language](https://docs.codat.io/using-the-a
      - name: createcompany
        method: POST
        description: Create company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId
      path: /companies/{companyId}
      operations:
      - name: getcompany
        method: GET
        description: Get company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletecompany
        method: DELETE
        description: Delete a company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: replacecompany
        method: PUT
        description: Replace company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: updatecompany
        method: PATCH
        description: Update company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-accessToken
      path: /companies/{companyId}/accessToken
      operations:
      - name: getcompanyaccesstoken
        method: GET
        description: Get company access token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-products-productIdentifier
      path: /companies/{companyId}/products/{productIdentifier}
      operations:
      - name: addproduct
        method: PUT
        description: Add product
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: removeproduct
        method: DELETE
        description: Remove product
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-products-productIdentifier-refresh
      path: /companies/{companyId}/products/{productIdentifier}/refresh
      operations:
      - name: refreshproductdata
        method: POST
        description: Refresh product data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-syncSettings
      path: /companies/{companyId}/syncSettings
      operations:
      - name: getcompanysyncsettings
        method: GET
        description: Get company sync settings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: setcompanysyncsettings
        method: POST
        description: Set company sync settings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.CODAT_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: platform-companies-rest
    port: 8080
    description: REST adapter for Platform API — Companies. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/companies
      name: companies
      description: REST surface for companies.
      operations:
      - method: GET
        name: listcompanies
        description: List companies
        call: platform-companies.listcompanies
        with:
          tags: rest.tags
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcompany
        description: Create company
        call: platform-companies.createcompany
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}
      name: companies-companyid
      description: REST surface for companies-companyId.
      operations:
      - method: GET
        name: getcompany
        description: Get company
        call: platform-companies.getcompany
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecompany
        description: Delete a company
        call: platform-companies.deletecompany
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: replacecompany
        description: Replace company
        call: platform-companies.replacecompany
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatecompany
        description: Update company
        call: platform-companies.updatecompany
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/accesstoken
      name: companies-companyid-accesstoken
      description: REST surface for companies-companyId-accessToken.
      operations:
      - method: GET
        name: getcompanyaccesstoken
        description: Get company access token
        call: platform-companies.getcompanyaccesstoken
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/products/{productidentifier}
      name: companies-companyid-products-productidentifier
      description: REST surface for companies-companyId-products-productIdentifier.
      operations:
      - method: PUT
        name: addproduct
        description: Add product
        call: platform-companies.addproduct
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: removeproduct
        description: Remove product
        call: platform-companies.removeproduct
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/products/{productidentifier}/refresh
      name: companies-companyid-products-productidentifier-refresh
      description: REST surface for companies-companyId-products-productIdentifier-refresh.
      operations:
      - method: POST
        name: refreshproductdata
        description: Refresh product data
        call: platform-companies.refreshproductdata
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/syncsettings
      name: companies-companyid-syncsettings
      description: REST surface for companies-companyId-syncSettings.
      operations:
      - method: GET
        name: getcompanysyncsettings
        description: Get company sync settings
        call: platform-companies.getcompanysyncsettings
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: setcompanysyncsettings
        description: Set company sync settings
        call: platform-companies.setcompanysyncsettings
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: platform-companies-mcp
    port: 9090
    transport: http
    description: MCP adapter for Platform API — Companies. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-companies
      description: List companies
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-companies.listcompanies
      with:
        tags: tools.tags
      outputParameters:
      - type: object
        mapping: $.
    - name: create-company
      description: Create company
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: platform-companies.createcompany
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-company
      description: Get company
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-companies.getcompany
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-company
      description: Delete a company
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: platform-companies.deletecompany
      outputParameters:
      - type: object
        mapping: $.
    - name: replace-company
      description: Replace company
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: platform-companies.replacecompany
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-company
      description: Update company
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: platform-companies.updatecompany
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-company-access-token
      description: Get company access token
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-companies.getcompanyaccesstoken
      outputParameters:
      - type: object
        mapping: $.
    - name: add-product
      description: Add product
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: platform-companies.addproduct
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-product
      description: Remove product
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: platform-companies.removeproduct
      outputParameters:
      - type: object
        mapping: $.
    - name: refresh-product-data
      description: Refresh product data
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: platform-companies.refreshproductdata
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-company-sync-settings
      description: Get company sync settings
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-companies.getcompanysyncsettings
      outputParameters:
      - type: object
        mapping: $.
    - name: set-company-sync-settings
      description: Set company sync settings
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: platform-companies.setcompanysyncsettings
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.