M3ter · Capability

m3ter API — Credits

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

Run with Naftiko M3terCredits

What You Can Do

GET
Listcreditlineitems — List Credit Line Items
/v1/organizations/{orgid}/bills/{billid}/creditlineitems
POST
Postcreditlineitem — Create Credit Line Item
/v1/organizations/{orgid}/bills/{billid}/creditlineitems
GET
Getcreditlineitem — Retrieve Credit Line Item
/v1/organizations/{orgid}/bills/{billid}/creditlineitems/{id}
PUT
Putcreditlineitem — Update Credit Line Item
/v1/organizations/{orgid}/bills/{billid}/creditlineitems/{id}
DELETE
Deletecreditlineitem — Delete Credit Line Item
/v1/organizations/{orgid}/bills/{billid}/creditlineitems/{id}

MCP Tools

list-credit-line-items

List Credit Line Items

read-only idempotent
create-credit-line-item

Create Credit Line Item

retrieve-credit-line-item

Retrieve Credit Line Item

read-only idempotent
update-credit-line-item

Update Credit Line Item

idempotent
delete-credit-line-item

Delete Credit Line Item

idempotent

Capability Spec

m3ter-credits.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: m3ter API — Credits
  description: 'm3ter API — Credits. 5 operations. Lead operation: List Credit Line Items. Self-contained Naftiko capability
    covering one M3ter business surface.'
  tags:
  - M3ter
  - Credits
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    M3TER_API_KEY: M3TER_API_KEY
capability:
  consumes:
  - type: http
    namespace: m3ter-credits
    baseUri: https://api.m3ter.com
    description: m3ter API — Credits business capability. Self-contained, no shared references.
    resources:
    - name: organizations-orgId-bills-billId-creditlineitems
      path: /organizations/{orgId}/bills/{billId}/creditlineitems
      operations:
      - name: listcreditlineitems
        method: GET
        description: List Credit 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: postcreditlineitem
        method: POST
        description: Create Credit 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-creditlineitems-id
      path: /organizations/{orgId}/bills/{billId}/creditlineitems/{id}
      operations:
      - name: getcreditlineitem
        method: GET
        description: Retrieve Credit 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 Credit line item to retrieve.
          required: true
      - name: putcreditlineitem
        method: PUT
        description: Update Credit 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 credit line item to update.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecreditlineitem
        method: DELETE
        description: Delete Credit 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 credit line item to delete.
          required: true
    authentication:
      type: bearer
      token: '{{env.M3TER_API_KEY}}'
  exposes:
  - type: rest
    namespace: m3ter-credits-rest
    port: 8080
    description: REST adapter for m3ter API — Credits. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/organizations/{orgid}/bills/{billid}/creditlineitems
      name: organizations-orgid-bills-billid-creditlineitems
      description: REST surface for organizations-orgId-bills-billId-creditlineitems.
      operations:
      - method: GET
        name: listcreditlineitems
        description: List Credit Line Items
        call: m3ter-credits.listcreditlineitems
        with:
          orgId: rest.orgId
          billId: rest.billId
          pageSize: rest.pageSize
          nextToken: rest.nextToken
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postcreditlineitem
        description: Create Credit Line Item
        call: m3ter-credits.postcreditlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/organizations/{orgid}/bills/{billid}/creditlineitems/{id}
      name: organizations-orgid-bills-billid-creditlineitems-id
      description: REST surface for organizations-orgId-bills-billId-creditlineitems-id.
      operations:
      - method: GET
        name: getcreditlineitem
        description: Retrieve Credit Line Item
        call: m3ter-credits.getcreditlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putcreditlineitem
        description: Update Credit Line Item
        call: m3ter-credits.putcreditlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecreditlineitem
        description: Delete Credit Line Item
        call: m3ter-credits.deletecreditlineitem
        with:
          orgId: rest.orgId
          billId: rest.billId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: m3ter-credits-mcp
    port: 9090
    transport: http
    description: MCP adapter for m3ter API — Credits. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-credit-line-items
      description: List Credit Line Items
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: m3ter-credits.listcreditlineitems
      with:
        orgId: tools.orgId
        billId: tools.billId
        pageSize: tools.pageSize
        nextToken: tools.nextToken
      outputParameters:
      - type: object
        mapping: $.
    - name: create-credit-line-item
      description: Create Credit Line Item
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: m3ter-credits.postcreditlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-credit-line-item
      description: Retrieve Credit Line Item
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: m3ter-credits.getcreditlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-credit-line-item
      description: Update Credit Line Item
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: m3ter-credits.putcreditlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-credit-line-item
      description: Delete Credit Line Item
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: m3ter-credits.deletecreditlineitem
      with:
        orgId: tools.orgId
        billId: tools.billId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.