Codat · Capability

Lending — Accounts payable

Lending — Accounts payable. 16 operations. Lead operation: List bill attachments. Self-contained Naftiko capability covering one Codat business surface.

Run with Naftiko CodatAccounts payable

What You Can Do

GET
Listaccountingbillattachments — List bill attachments
/v1/companies/{companyid}/connections/{connectionid}/data/bills/{billid}/attachments
GET
Getaccountingbillattachment — Get bill attachment
/v1/companies/{companyid}/connections/{connectionid}/data/bills/{billid}/attachments/{attachmentid}
GET
Downloadaccountingbillattachment — Download bill attachment
/v1/companies/{companyid}/connections/{connectionid}/data/bills/{billid}/attachments/{attachmentid}/download
GET
Listaccountingsupplierattachments — List supplier attachments
/v1/companies/{companyid}/connections/{connectionid}/data/suppliers/{supplierid}/attachments
GET
Getaccountingsupplierattachment — Get supplier attachment
/v1/companies/{companyid}/connections/{connectionid}/data/suppliers/{supplierid}/attachments/{attachmentid}
GET
Downloadaccountingsupplierattachment — Download supplier attachment
/v1/companies/{companyid}/connections/{connectionid}/data/suppliers/{supplierid}/attachments/{attachmentid}/download
GET
Listaccountingbillcreditnotes — List bill credit notes
/v1/companies/{companyid}/data/billcreditnotes
GET
Getaccountingbillcreditnote — Get bill credit note
/v1/companies/{companyid}/data/billcreditnotes/{billcreditnoteid}
GET
Listaccountingbillpayments — List bill payments
/v1/companies/{companyid}/data/billpayments
GET
Getaccountingbillpayment — Get bill payment
/v1/companies/{companyid}/data/billpayments/{billpaymentid}
GET
Listaccountingbills — List bills
/v1/companies/{companyid}/data/bills
GET
Getaccountingbill — Get bill
/v1/companies/{companyid}/data/bills/{billid}
GET
Listaccountingsuppliers — List suppliers
/v1/companies/{companyid}/data/suppliers
GET
Getaccountingsupplier — Get supplier
/v1/companies/{companyid}/data/suppliers/{supplierid}
GET
Getaccountingagedcreditorsreport — Aged creditors report
/v1/companies/{companyid}/reports/agedcreditor
GET
Isagedcreditorsreportavailable — Aged creditors report available
/v1/companies/{companyid}/reports/agedcreditor/available

MCP Tools

list-bill-attachments

List bill attachments

read-only idempotent
get-bill-attachment

Get bill attachment

read-only idempotent
download-bill-attachment

Download bill attachment

read-only idempotent
list-supplier-attachments

List supplier attachments

read-only idempotent
get-supplier-attachment

Get supplier attachment

read-only idempotent
download-supplier-attachment

Download supplier attachment

read-only idempotent
list-bill-credit-notes

List bill credit notes

read-only idempotent
get-bill-credit-note

Get bill credit note

read-only idempotent
list-bill-payments

List bill payments

read-only idempotent
get-bill-payment

Get bill payment

read-only idempotent
list-bills

List bills

read-only idempotent
get-bill

Get bill

read-only idempotent
list-suppliers

List suppliers

read-only idempotent
get-supplier

Get supplier

read-only idempotent
aged-creditors-report

Aged creditors report

read-only idempotent
aged-creditors-report-available

Aged creditors report available

read-only idempotent

Capability Spec

lending-accounts-payable.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Lending — Accounts payable
  description: 'Lending — Accounts payable. 16 operations. Lead operation: List bill attachments. Self-contained Naftiko capability
    covering one Codat business surface.'
  tags:
  - Codat
  - Accounts payable
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CODAT_API_KEY: CODAT_API_KEY
capability:
  consumes:
  - type: http
    namespace: lending-accounts-payable
    baseUri: https://api.codat.io
    description: Lending — Accounts payable business capability. Self-contained, no shared references.
    resources:
    - name: companies-companyId-connections-connectionId-data-bills-billId-attachments
      path: /companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments
      operations:
      - name: listaccountingbillattachments
        method: GET
        description: List bill attachments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-data-bills-billId-attachments-attac
      path: /companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}
      operations:
      - name: getaccountingbillattachment
        method: GET
        description: Get bill attachment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-data-bills-billId-attachments-attac
      path: /companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}/download
      operations:
      - name: downloadaccountingbillattachment
        method: GET
        description: Download bill attachment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-data-suppliers-supplierId-attachmen
      path: /companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments
      operations:
      - name: listaccountingsupplierattachments
        method: GET
        description: List supplier attachments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-data-suppliers-supplierId-attachmen
      path: /companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}
      operations:
      - name: getaccountingsupplierattachment
        method: GET
        description: Get supplier attachment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-data-suppliers-supplierId-attachmen
      path: /companies/{companyId}/connections/{connectionId}/data/suppliers/{supplierId}/attachments/{attachmentId}/download
      operations:
      - name: downloadaccountingsupplierattachment
        method: GET
        description: Download supplier attachment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-billCreditNotes
      path: /companies/{companyId}/data/billCreditNotes
      operations:
      - name: listaccountingbillcreditnotes
        method: GET
        description: List bill credit notes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-billCreditNotes-billCreditNoteId
      path: /companies/{companyId}/data/billCreditNotes/{billCreditNoteId}
      operations:
      - name: getaccountingbillcreditnote
        method: GET
        description: Get bill credit note
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-billPayments
      path: /companies/{companyId}/data/billPayments
      operations:
      - name: listaccountingbillpayments
        method: GET
        description: List bill payments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-billPayments-billPaymentId
      path: /companies/{companyId}/data/billPayments/{billPaymentId}
      operations:
      - name: getaccountingbillpayment
        method: GET
        description: Get bill payment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-bills
      path: /companies/{companyId}/data/bills
      operations:
      - name: listaccountingbills
        method: GET
        description: List bills
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-bills-billId
      path: /companies/{companyId}/data/bills/{billId}
      operations:
      - name: getaccountingbill
        method: GET
        description: Get bill
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-suppliers
      path: /companies/{companyId}/data/suppliers
      operations:
      - name: listaccountingsuppliers
        method: GET
        description: List suppliers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-data-suppliers-supplierId
      path: /companies/{companyId}/data/suppliers/{supplierId}
      operations:
      - name: getaccountingsupplier
        method: GET
        description: Get supplier
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-reports-agedCreditor
      path: /companies/{companyId}/reports/agedCreditor
      operations:
      - name: getaccountingagedcreditorsreport
        method: GET
        description: Aged creditors report
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-reports-agedCreditor-available
      path: /companies/{companyId}/reports/agedCreditor/available
      operations:
      - name: isagedcreditorsreportavailable
        method: GET
        description: Aged creditors report available
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.CODAT_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: lending-accounts-payable-rest
    port: 8080
    description: REST adapter for Lending — Accounts payable. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/companies/{companyid}/connections/{connectionid}/data/bills/{billid}/attachments
      name: companies-companyid-connections-connectionid-data-bills-billid-attachments
      description: REST surface for companies-companyId-connections-connectionId-data-bills-billId-attachments.
      operations:
      - method: GET
        name: listaccountingbillattachments
        description: List bill attachments
        call: lending-accounts-payable.listaccountingbillattachments
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/data/bills/{billid}/attachments/{attachmentid}
      name: companies-companyid-connections-connectionid-data-bills-billid-attachments-attac
      description: REST surface for companies-companyId-connections-connectionId-data-bills-billId-attachments-attac.
      operations:
      - method: GET
        name: getaccountingbillattachment
        description: Get bill attachment
        call: lending-accounts-payable.getaccountingbillattachment
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/data/bills/{billid}/attachments/{attachmentid}/download
      name: companies-companyid-connections-connectionid-data-bills-billid-attachments-attac
      description: REST surface for companies-companyId-connections-connectionId-data-bills-billId-attachments-attac.
      operations:
      - method: GET
        name: downloadaccountingbillattachment
        description: Download bill attachment
        call: lending-accounts-payable.downloadaccountingbillattachment
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/data/suppliers/{supplierid}/attachments
      name: companies-companyid-connections-connectionid-data-suppliers-supplierid-attachmen
      description: REST surface for companies-companyId-connections-connectionId-data-suppliers-supplierId-attachmen.
      operations:
      - method: GET
        name: listaccountingsupplierattachments
        description: List supplier attachments
        call: lending-accounts-payable.listaccountingsupplierattachments
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/data/suppliers/{supplierid}/attachments/{attachmentid}
      name: companies-companyid-connections-connectionid-data-suppliers-supplierid-attachmen
      description: REST surface for companies-companyId-connections-connectionId-data-suppliers-supplierId-attachmen.
      operations:
      - method: GET
        name: getaccountingsupplierattachment
        description: Get supplier attachment
        call: lending-accounts-payable.getaccountingsupplierattachment
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/data/suppliers/{supplierid}/attachments/{attachmentid}/download
      name: companies-companyid-connections-connectionid-data-suppliers-supplierid-attachmen
      description: REST surface for companies-companyId-connections-connectionId-data-suppliers-supplierId-attachmen.
      operations:
      - method: GET
        name: downloadaccountingsupplierattachment
        description: Download supplier attachment
        call: lending-accounts-payable.downloadaccountingsupplierattachment
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/billcreditnotes
      name: companies-companyid-data-billcreditnotes
      description: REST surface for companies-companyId-data-billCreditNotes.
      operations:
      - method: GET
        name: listaccountingbillcreditnotes
        description: List bill credit notes
        call: lending-accounts-payable.listaccountingbillcreditnotes
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/billcreditnotes/{billcreditnoteid}
      name: companies-companyid-data-billcreditnotes-billcreditnoteid
      description: REST surface for companies-companyId-data-billCreditNotes-billCreditNoteId.
      operations:
      - method: GET
        name: getaccountingbillcreditnote
        description: Get bill credit note
        call: lending-accounts-payable.getaccountingbillcreditnote
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/billpayments
      name: companies-companyid-data-billpayments
      description: REST surface for companies-companyId-data-billPayments.
      operations:
      - method: GET
        name: listaccountingbillpayments
        description: List bill payments
        call: lending-accounts-payable.listaccountingbillpayments
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/billpayments/{billpaymentid}
      name: companies-companyid-data-billpayments-billpaymentid
      description: REST surface for companies-companyId-data-billPayments-billPaymentId.
      operations:
      - method: GET
        name: getaccountingbillpayment
        description: Get bill payment
        call: lending-accounts-payable.getaccountingbillpayment
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/bills
      name: companies-companyid-data-bills
      description: REST surface for companies-companyId-data-bills.
      operations:
      - method: GET
        name: listaccountingbills
        description: List bills
        call: lending-accounts-payable.listaccountingbills
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/bills/{billid}
      name: companies-companyid-data-bills-billid
      description: REST surface for companies-companyId-data-bills-billId.
      operations:
      - method: GET
        name: getaccountingbill
        description: Get bill
        call: lending-accounts-payable.getaccountingbill
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/suppliers
      name: companies-companyid-data-suppliers
      description: REST surface for companies-companyId-data-suppliers.
      operations:
      - method: GET
        name: listaccountingsuppliers
        description: List suppliers
        call: lending-accounts-payable.listaccountingsuppliers
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/data/suppliers/{supplierid}
      name: companies-companyid-data-suppliers-supplierid
      description: REST surface for companies-companyId-data-suppliers-supplierId.
      operations:
      - method: GET
        name: getaccountingsupplier
        description: Get supplier
        call: lending-accounts-payable.getaccountingsupplier
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/reports/agedcreditor
      name: companies-companyid-reports-agedcreditor
      description: REST surface for companies-companyId-reports-agedCreditor.
      operations:
      - method: GET
        name: getaccountingagedcreditorsreport
        description: Aged creditors report
        call: lending-accounts-payable.getaccountingagedcreditorsreport
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/reports/agedcreditor/available
      name: companies-companyid-reports-agedcreditor-available
      description: REST surface for companies-companyId-reports-agedCreditor-available.
      operations:
      - method: GET
        name: isagedcreditorsreportavailable
        description: Aged creditors report available
        call: lending-accounts-payable.isagedcreditorsreportavailable
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: lending-accounts-payable-mcp
    port: 9090
    transport: http
    description: MCP adapter for Lending — Accounts payable. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-bill-attachments
      description: List bill attachments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.listaccountingbillattachments
      outputParameters:
      - type: object
        mapping: $.
    - name: get-bill-attachment
      description: Get bill attachment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.getaccountingbillattachment
      outputParameters:
      - type: object
        mapping: $.
    - name: download-bill-attachment
      description: Download bill attachment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.downloadaccountingbillattachment
      outputParameters:
      - type: object
        mapping: $.
    - name: list-supplier-attachments
      description: List supplier attachments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.listaccountingsupplierattachments
      outputParameters:
      - type: object
        mapping: $.
    - name: get-supplier-attachment
      description: Get supplier attachment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.getaccountingsupplierattachment
      outputParameters:
      - type: object
        mapping: $.
    - name: download-supplier-attachment
      description: Download supplier attachment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.downloadaccountingsupplierattachment
      outputParameters:
      - type: object
        mapping: $.
    - name: list-bill-credit-notes
      description: List bill credit notes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.listaccountingbillcreditnotes
      outputParameters:
      - type: object
        mapping: $.
    - name: get-bill-credit-note
      description: Get bill credit note
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.getaccountingbillcreditnote
      outputParameters:
      - type: object
        mapping: $.
    - name: list-bill-payments
      description: List bill payments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.listaccountingbillpayments
      outputParameters:
      - type: object
        mapping: $.
    - name: get-bill-payment
      description: Get bill payment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.getaccountingbillpayment
      outputParameters:
      - type: object
        mapping: $.
    - name: list-bills
      description: List bills
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.listaccountingbills
      outputParameters:
      - type: object
        mapping: $.
    - name: get-bill
      description: Get bill
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.getaccountingbill
      outputParameters:
      - type: object
        mapping: $.
    - name: list-suppliers
      description: List suppliers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.listaccountingsuppliers
      outputParameters:
      - type: object
        mapping: $.
    - name: get-supplier
      description: Get supplier
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.getaccountingsupplier
      outputParameters:
      - type: object
        mapping: $.
    - name: aged-creditors-report
      description: Aged creditors report
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.getaccountingagedcreditorsreport
      outputParameters:
      - type: object
        mapping: $.
    - name: aged-creditors-report-available
      description: Aged creditors report available
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-accounts-payable.isagedcreditorsreportavailable
      outputParameters:
      - type: object
        mapping: $.