M3ter · Capability

m3ter API — Debits

m3ter API — Debits. 5 operations. Lead operation: List Debit Line Items. Self-contained Naftiko capability covering one M3ter business surface.

Run with Naftiko M3terDebits

What You Can Do

GET
Listdebitlineitems — List Debit Line Items
/v1/organizations/{orgid}/bills/{billid}/debitlineitems
POST
Postdebitlineitem — Create Debit Line Item
/v1/organizations/{orgid}/bills/{billid}/debitlineitems
GET
Getdebitlineitem — Retrieve Debit Line Item
/v1/organizations/{orgid}/bills/{billid}/debitlineitems/{id}
PUT
Putdebitlineitem — Update Debit Line Item
/v1/organizations/{orgid}/bills/{billid}/debitlineitems/{id}
DELETE
Deletedebitlineitem — Delete Debit Line Item
/v1/organizations/{orgid}/bills/{billid}/debitlineitems/{id}

MCP Tools

list-debit-line-items

List Debit Line Items

read-only idempotent
create-debit-line-item

Create Debit Line Item

retrieve-debit-line-item

Retrieve Debit Line Item

read-only idempotent
update-debit-line-item

Update Debit Line Item

idempotent
delete-debit-line-item

Delete Debit Line Item

idempotent

Capability Spec

m3ter-debits.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: m3ter API — Debits
  description: 'm3ter API — Debits. 5 operations. Lead operation: List Debit Line Items. Self-contained Naftiko capability
    covering one M3ter business surface.'
  tags:
  - M3ter
  - Debits
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    M3TER_API_KEY: M3TER_API_KEY
capability:
  consumes:
  - type: http
    namespace: m3ter-debits
    baseUri: https://api.m3ter.com
    description: m3ter API — Debits business capability. Self-contained, no shared references.
    resources:
    - name: organizations-orgId-bills-billId-debitlineitems
      path: /organizations/{orgId}/bills/{billId}/debitlineitems
      operations:
      - name: listdebitlineitems
        method: GET
        description: List Debit Line Items
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: UUID of the Organization. The Organization represents your company as a direct customer of the m3ter
            service.
          required: true
        - name: billId
          in: path
          type: string
          description: UUID of the bill.
          required: true
        - name: pageSize
          in: query
          type: integer
          description: Number of line items to retrieve per page.
        - name: nextToken
          in: query
          type: string
          description: '`nextToken` for multi page retrievals.'
      - name: postdebitlineitem
        method: POST
        description: Create Debit Line Item
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: UUID of the Organization. The Organization represents your company as a direct customer of the m3ter
            service.
          required: true
        - name: billId
          in: path
          type: string
          description: UUID of the bill.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: organizations-orgId-bills-billId-debitlineitems-id
      path: /organizations/{orgId}/bills/{billId}/debitlineitems/{id}
      operations:
      - name: getdebitlineitem
        method: GET
        description: Retrieve Debit Line Item
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: UUID of the Organization. The Organization represents your company as a direct customer of the m3ter
            service.
          required: true
        - name: billId
          in: path
          type: string
          description: UUID of the bill.
          required: true
        - name: id
          in: path
          type: string
          description: The UUID of the debit line item to retrieve.
          required: true
      - name: putdebitlineitem
        method: PUT
        description: Update Debit Line Item
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: UUID of the Organization. The Organization represents your company as a direct customer of the m3ter
            service.
          required: true
        - name: billId
          in: path
          type: string
          description: UUID of the bill.
          required: true
        - name: id
          in: path
          type: string
          description: The UUID of the debit line item to update.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletedebitlineitem
        method: DELETE
        description: Delete Debit Line Item
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: UUID of the Organization. The Organization represents your company as a direct customer of the m3ter
            service.
          required: true
        - name: billId
          in: path
          type: string
          description: UUID of the bill.
          required: true
        - name: id
          in: path
          type: string
          description: UUID of the debit line item.
          required: true
    authentication:
      type: bearer
      token: '{{env.M3TER_API_KEY}}'
  exposes:
  - type: rest
    namespace: m3ter-debits-rest
    port: 8080
    description: REST adapter for m3ter API — Debits. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/organizations/{orgid}/bills/{billid}/debitlineitems
      name: organizations-orgid-bills-billid-debitlineitems
      description: REST surface for organizations-orgId-bills-billId-debitlineitems.
      operations:
      - method: GET
        name: listdebitlineitems
        description: List Debit Line Items
        call: m3ter-debits.listdebitlineitems
        with:
          orgId: rest.orgId
          billId: rest.billId
          pageSize: rest.pageSize
          nextToken: rest.nextToken
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postdebitlineitem
        description: Create Debit Line Item
        call: m3ter-debits.postdebitlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/organizations/{orgid}/bills/{billid}/debitlineitems/{id}
      name: organizations-orgid-bills-billid-debitlineitems-id
      description: REST surface for organizations-orgId-bills-billId-debitlineitems-id.
      operations:
      - method: GET
        name: getdebitlineitem
        description: Retrieve Debit Line Item
        call: m3ter-debits.getdebitlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putdebitlineitem
        description: Update Debit Line Item
        call: m3ter-debits.putdebitlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletedebitlineitem
        description: Delete Debit Line Item
        call: m3ter-debits.deletedebitlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: m3ter-debits-mcp
    port: 9090
    transport: http
    description: MCP adapter for m3ter API — Debits. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-debit-line-items
      description: List Debit Line Items
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: m3ter-debits.listdebitlineitems
      with:
        orgId: tools.orgId
        billId: tools.billId
        pageSize: tools.pageSize
        nextToken: tools.nextToken
      outputParameters:
      - type: object
        mapping: $.
    - name: create-debit-line-item
      description: Create Debit Line Item
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: m3ter-debits.postdebitlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-debit-line-item
      description: Retrieve Debit Line Item
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: m3ter-debits.getdebitlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-debit-line-item
      description: Update Debit Line Item
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: m3ter-debits.putdebitlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-debit-line-item
      description: Delete Debit Line Item
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: m3ter-debits.deletedebitlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.