Codat · Capability

Lending — Loan writeback

Lending — Loan writeback. 19 operations. Lead operation: List bank feed account mappings. Self-contained Naftiko capability covering one Codat business surface.

Run with Naftiko CodatLoan writeback

What You Can Do

GET
Getbankaccountmapping — List bank feed account mappings
/v1/companies/{companyid}/connections/{connectionid}/bankfeedaccounts/mapping
POST
Createbankaccountmapping — Create bank feed account mapping
/v1/companies/{companyid}/connections/{connectionid}/bankfeedaccounts/mapping
POST
Createsourceaccount — Create source account
/v1/companies/{companyid}/connections/{connectionid}/connectioninfo/bankfeedaccounts
GET
Getcreateupdatebankaccountsmodel — Get create/update bank account model
/v1/companies/{companyid}/connections/{connectionid}/options/bankaccounts
GET
Getcreatebanktransactionsmodel — Get create bank account transactions model
/v1/companies/{companyid}/connections/{connectionid}/options/bankaccounts/{accountid}/banktransactions
GET
Getcreatechartofaccountsmodel — Get create account model
/v1/companies/{companyid}/connections/{connectionid}/options/chartofaccounts
GET
Getcreatedirectcostsmodel — Get create direct cost model
/v1/companies/{companyid}/connections/{connectionid}/options/directcosts
GET
Getcreatepaymentmodel — Get create payment model
/v1/companies/{companyid}/connections/{connectionid}/options/payments
GET
Getcreateupdatesuppliersmodel — Get create/update supplier model
/v1/companies/{companyid}/connections/{connectionid}/options/suppliers
GET
Getcreatetransfersmodel — Get create transfer model
/v1/companies/{companyid}/connections/{connectionid}/options/transfers
POST
Createaccount — Create account
/v1/companies/{companyid}/connections/{connectionid}/push/accounts
POST
Createbankaccount — Create bank account
/v1/companies/{companyid}/connections/{connectionid}/push/bankaccounts
POST
Createbanktransactions — Create bank account transactions
/v1/companies/{companyid}/connections/{connectionid}/push/bankaccounts/{accountid}/banktransactions
POST
Createdirectcost — Create direct cost
/v1/companies/{companyid}/connections/{connectionid}/push/directcosts
POST
Createpayment — Create payment
/v1/companies/{companyid}/connections/{connectionid}/push/payments
POST
Createsupplier — Create supplier
/v1/companies/{companyid}/connections/{connectionid}/push/suppliers
POST
Createtransfer — Create transfer
/v1/companies/{companyid}/connections/{connectionid}/push/transfers
GET
Listcreateoperations — List create operations
/v1/companies/{companyid}/push
GET
Getcreateoperation — Get create operation
/v1/companies/{companyid}/push/{pushoperationkey}

MCP Tools

list-bank-feed-account-mappings

List bank feed account mappings

read-only idempotent
create-bank-feed-account-mapping

Create bank feed account mapping

create-source-account

Create source account

get-create-update-bank-account

Get create/update bank account model

read-only idempotent
get-create-bank-account-transactions

Get create bank account transactions model

read-only idempotent
get-create-account-model

Get create account model

read-only idempotent
get-create-direct-cost-model

Get create direct cost model

read-only idempotent
get-create-payment-model

Get create payment model

read-only idempotent
get-create-update-supplier-model

Get create/update supplier model

read-only idempotent
get-create-transfer-model

Get create transfer model

read-only idempotent
create-account

Create account

create-bank-account

Create bank account

create-bank-account-transactions

Create bank account transactions

create-direct-cost

Create direct cost

create-payment

Create payment

create-supplier

Create supplier

create-transfer

Create transfer

list-create-operations

List create operations

read-only idempotent
get-create-operation

Get create operation

read-only idempotent

Capability Spec

lending-loan-writeback.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Lending — Loan writeback
  description: 'Lending — Loan writeback. 19 operations. Lead operation: List bank feed account mappings. Self-contained Naftiko
    capability covering one Codat business surface.'
  tags:
  - Codat
  - Loan writeback
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CODAT_API_KEY: CODAT_API_KEY
capability:
  consumes:
  - type: http
    namespace: lending-loan-writeback
    baseUri: https://api.codat.io
    description: Lending — Loan writeback business capability. Self-contained, no shared references.
    resources:
    - name: companies-companyId-connections-connectionId-bankFeedAccounts-mapping
      path: /companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping
      operations:
      - name: getbankaccountmapping
        method: GET
        description: List bank feed account mappings
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createbankaccountmapping
        method: POST
        description: Create bank feed account mapping
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-connectionInfo-bankFeedAccounts
      path: /companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts
      operations:
      - name: createsourceaccount
        method: POST
        description: Create source account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-options-bankAccounts
      path: /companies/{companyId}/connections/{connectionId}/options/bankAccounts
      operations:
      - name: getcreateupdatebankaccountsmodel
        method: GET
        description: Get create/update bank account model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-options-bankAccounts-accountId-bank
      path: /companies/{companyId}/connections/{connectionId}/options/bankAccounts/{accountId}/bankTransactions
      operations:
      - name: getcreatebanktransactionsmodel
        method: GET
        description: Get create bank account transactions model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-options-chartOfAccounts
      path: /companies/{companyId}/connections/{connectionId}/options/chartOfAccounts
      operations:
      - name: getcreatechartofaccountsmodel
        method: GET
        description: Get create account model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-options-directCosts
      path: /companies/{companyId}/connections/{connectionId}/options/directCosts
      operations:
      - name: getcreatedirectcostsmodel
        method: GET
        description: Get create direct cost model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-options-payments
      path: /companies/{companyId}/connections/{connectionId}/options/payments
      operations:
      - name: getcreatepaymentmodel
        method: GET
        description: Get create payment model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-options-suppliers
      path: /companies/{companyId}/connections/{connectionId}/options/suppliers
      operations:
      - name: getcreateupdatesuppliersmodel
        method: GET
        description: Get create/update supplier model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-options-transfers
      path: /companies/{companyId}/connections/{connectionId}/options/transfers
      operations:
      - name: getcreatetransfersmodel
        method: GET
        description: Get create transfer model
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-connections-connectionId-push-accounts
      path: /companies/{companyId}/connections/{connectionId}/push/accounts
      operations:
      - name: createaccount
        method: POST
        description: Create account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-push-bankAccounts
      path: /companies/{companyId}/connections/{connectionId}/push/bankAccounts
      operations:
      - name: createbankaccount
        method: POST
        description: Create bank account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-push-bankAccounts-accountId-bankTra
      path: /companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions
      operations:
      - name: createbanktransactions
        method: POST
        description: Create bank account transactions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-push-directCosts
      path: /companies/{companyId}/connections/{connectionId}/push/directCosts
      operations:
      - name: createdirectcost
        method: POST
        description: Create direct cost
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-push-payments
      path: /companies/{companyId}/connections/{connectionId}/push/payments
      operations:
      - name: createpayment
        method: POST
        description: Create payment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-push-suppliers
      path: /companies/{companyId}/connections/{connectionId}/push/suppliers
      operations:
      - name: createsupplier
        method: POST
        description: Create supplier
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-connections-connectionId-push-transfers
      path: /companies/{companyId}/connections/{connectionId}/push/transfers
      operations:
      - name: createtransfer
        method: POST
        description: Create transfer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: companies-companyId-push
      path: /companies/{companyId}/push
      operations:
      - name: listcreateoperations
        method: GET
        description: List create operations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: companies-companyId-push-pushOperationKey
      path: /companies/{companyId}/push/{pushOperationKey}
      operations:
      - name: getcreateoperation
        method: GET
        description: Get create operation
        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-loan-writeback-rest
    port: 8080
    description: REST adapter for Lending — Loan writeback. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/companies/{companyid}/connections/{connectionid}/bankfeedaccounts/mapping
      name: companies-companyid-connections-connectionid-bankfeedaccounts-mapping
      description: REST surface for companies-companyId-connections-connectionId-bankFeedAccounts-mapping.
      operations:
      - method: GET
        name: getbankaccountmapping
        description: List bank feed account mappings
        call: lending-loan-writeback.getbankaccountmapping
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createbankaccountmapping
        description: Create bank feed account mapping
        call: lending-loan-writeback.createbankaccountmapping
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/connectioninfo/bankfeedaccounts
      name: companies-companyid-connections-connectionid-connectioninfo-bankfeedaccounts
      description: REST surface for companies-companyId-connections-connectionId-connectionInfo-bankFeedAccounts.
      operations:
      - method: POST
        name: createsourceaccount
        description: Create source account
        call: lending-loan-writeback.createsourceaccount
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/options/bankaccounts
      name: companies-companyid-connections-connectionid-options-bankaccounts
      description: REST surface for companies-companyId-connections-connectionId-options-bankAccounts.
      operations:
      - method: GET
        name: getcreateupdatebankaccountsmodel
        description: Get create/update bank account model
        call: lending-loan-writeback.getcreateupdatebankaccountsmodel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/options/bankaccounts/{accountid}/banktransactions
      name: companies-companyid-connections-connectionid-options-bankaccounts-accountid-bank
      description: REST surface for companies-companyId-connections-connectionId-options-bankAccounts-accountId-bank.
      operations:
      - method: GET
        name: getcreatebanktransactionsmodel
        description: Get create bank account transactions model
        call: lending-loan-writeback.getcreatebanktransactionsmodel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/options/chartofaccounts
      name: companies-companyid-connections-connectionid-options-chartofaccounts
      description: REST surface for companies-companyId-connections-connectionId-options-chartOfAccounts.
      operations:
      - method: GET
        name: getcreatechartofaccountsmodel
        description: Get create account model
        call: lending-loan-writeback.getcreatechartofaccountsmodel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/options/directcosts
      name: companies-companyid-connections-connectionid-options-directcosts
      description: REST surface for companies-companyId-connections-connectionId-options-directCosts.
      operations:
      - method: GET
        name: getcreatedirectcostsmodel
        description: Get create direct cost model
        call: lending-loan-writeback.getcreatedirectcostsmodel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/options/payments
      name: companies-companyid-connections-connectionid-options-payments
      description: REST surface for companies-companyId-connections-connectionId-options-payments.
      operations:
      - method: GET
        name: getcreatepaymentmodel
        description: Get create payment model
        call: lending-loan-writeback.getcreatepaymentmodel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/options/suppliers
      name: companies-companyid-connections-connectionid-options-suppliers
      description: REST surface for companies-companyId-connections-connectionId-options-suppliers.
      operations:
      - method: GET
        name: getcreateupdatesuppliersmodel
        description: Get create/update supplier model
        call: lending-loan-writeback.getcreateupdatesuppliersmodel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/options/transfers
      name: companies-companyid-connections-connectionid-options-transfers
      description: REST surface for companies-companyId-connections-connectionId-options-transfers.
      operations:
      - method: GET
        name: getcreatetransfersmodel
        description: Get create transfer model
        call: lending-loan-writeback.getcreatetransfersmodel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/push/accounts
      name: companies-companyid-connections-connectionid-push-accounts
      description: REST surface for companies-companyId-connections-connectionId-push-accounts.
      operations:
      - method: POST
        name: createaccount
        description: Create account
        call: lending-loan-writeback.createaccount
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/push/bankaccounts
      name: companies-companyid-connections-connectionid-push-bankaccounts
      description: REST surface for companies-companyId-connections-connectionId-push-bankAccounts.
      operations:
      - method: POST
        name: createbankaccount
        description: Create bank account
        call: lending-loan-writeback.createbankaccount
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/push/bankaccounts/{accountid}/banktransactions
      name: companies-companyid-connections-connectionid-push-bankaccounts-accountid-banktra
      description: REST surface for companies-companyId-connections-connectionId-push-bankAccounts-accountId-bankTra.
      operations:
      - method: POST
        name: createbanktransactions
        description: Create bank account transactions
        call: lending-loan-writeback.createbanktransactions
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/push/directcosts
      name: companies-companyid-connections-connectionid-push-directcosts
      description: REST surface for companies-companyId-connections-connectionId-push-directCosts.
      operations:
      - method: POST
        name: createdirectcost
        description: Create direct cost
        call: lending-loan-writeback.createdirectcost
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/push/payments
      name: companies-companyid-connections-connectionid-push-payments
      description: REST surface for companies-companyId-connections-connectionId-push-payments.
      operations:
      - method: POST
        name: createpayment
        description: Create payment
        call: lending-loan-writeback.createpayment
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/push/suppliers
      name: companies-companyid-connections-connectionid-push-suppliers
      description: REST surface for companies-companyId-connections-connectionId-push-suppliers.
      operations:
      - method: POST
        name: createsupplier
        description: Create supplier
        call: lending-loan-writeback.createsupplier
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/connections/{connectionid}/push/transfers
      name: companies-companyid-connections-connectionid-push-transfers
      description: REST surface for companies-companyId-connections-connectionId-push-transfers.
      operations:
      - method: POST
        name: createtransfer
        description: Create transfer
        call: lending-loan-writeback.createtransfer
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/push
      name: companies-companyid-push
      description: REST surface for companies-companyId-push.
      operations:
      - method: GET
        name: listcreateoperations
        description: List create operations
        call: lending-loan-writeback.listcreateoperations
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/companies/{companyid}/push/{pushoperationkey}
      name: companies-companyid-push-pushoperationkey
      description: REST surface for companies-companyId-push-pushOperationKey.
      operations:
      - method: GET
        name: getcreateoperation
        description: Get create operation
        call: lending-loan-writeback.getcreateoperation
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: lending-loan-writeback-mcp
    port: 9090
    transport: http
    description: MCP adapter for Lending — Loan writeback. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-bank-feed-account-mappings
      description: List bank feed account mappings
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getbankaccountmapping
      outputParameters:
      - type: object
        mapping: $.
    - name: create-bank-feed-account-mapping
      description: Create bank feed account mapping
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createbankaccountmapping
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-source-account
      description: Create source account
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createsourceaccount
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-update-bank-account
      description: Get create/update bank account model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreateupdatebankaccountsmodel
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-bank-account-transactions
      description: Get create bank account transactions model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreatebanktransactionsmodel
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-account-model
      description: Get create account model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreatechartofaccountsmodel
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-direct-cost-model
      description: Get create direct cost model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreatedirectcostsmodel
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-payment-model
      description: Get create payment model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreatepaymentmodel
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-update-supplier-model
      description: Get create/update supplier model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreateupdatesuppliersmodel
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-transfer-model
      description: Get create transfer model
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreatetransfersmodel
      outputParameters:
      - type: object
        mapping: $.
    - name: create-account
      description: Create account
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createaccount
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-bank-account
      description: Create bank account
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createbankaccount
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-bank-account-transactions
      description: Create bank account transactions
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createbanktransactions
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-direct-cost
      description: Create direct cost
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createdirectcost
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-payment
      description: Create payment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createpayment
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-supplier
      description: Create supplier
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createsupplier
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-transfer
      description: Create transfer
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lending-loan-writeback.createtransfer
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-create-operations
      description: List create operations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.listcreateoperations
      outputParameters:
      - type: object
        mapping: $.
    - name: get-create-operation
      description: Get create operation
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lending-loan-writeback.getcreateoperation
      outputParameters:
      - type: object
        mapping: $.