naftiko: 1.0.0-alpha2 info: label: m3ter API — CreditReason description: 'm3ter API — CreditReason. 5 operations. Lead operation: List Credit Reasons. Self-contained Naftiko capability covering one M3ter business surface.' tags: - M3ter - CreditReason created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: M3TER_API_KEY: M3TER_API_KEY capability: consumes: - type: http namespace: m3ter-creditreason baseUri: https://api.m3ter.com description: m3ter API — CreditReason business capability. Self-contained, no shared references. resources: - name: organizations-orgId-picklists-creditreasons path: /organizations/{orgId}/picklists/creditreasons operations: - name: listcreditreasons method: GET description: List Credit Reasons 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: pageSize in: query type: integer description: Number of credit reasons to retrieve per page. - name: nextToken in: query type: string description: '`nextToken` for multi page retrievals.' - name: ids in: query type: array description: List of Credit Reason IDs to retrieve. - name: codes in: query type: array description: List of Credit Reason short codes to retrieve. - name: archived in: query type: boolean description: TRUE / FALSE archived flag to filter the list. CreditReasons can be archived once they are obsolete. - name: createcreditreason method: POST description: Create Credit Reason 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: body in: body type: object description: Request body (JSON). required: true - name: organizations-orgId-picklists-creditreasons-id path: /organizations/{orgId}/picklists/creditreasons/{id} operations: - name: getcreditreason method: GET description: Retrieve Credit Reason 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: id in: path type: string description: The UUID of the Credit Reason to retrieve. required: true - name: updatecreditreason method: PUT description: Update Credit Reason 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: id in: path type: string description: The UUID of the Credit Reason to update. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: deletecreditreason method: DELETE description: Delete Credit Reason 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: id in: path type: string description: The UUID of the Credit Reason to delete. required: true authentication: type: bearer token: '{{env.M3TER_API_KEY}}' exposes: - type: rest namespace: m3ter-creditreason-rest port: 8080 description: REST adapter for m3ter API — CreditReason. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/organizations/{orgid}/picklists/creditreasons name: organizations-orgid-picklists-creditreasons description: REST surface for organizations-orgId-picklists-creditreasons. operations: - method: GET name: listcreditreasons description: List Credit Reasons call: m3ter-creditreason.listcreditreasons with: orgId: rest.orgId pageSize: rest.pageSize nextToken: rest.nextToken ids: rest.ids codes: rest.codes archived: rest.archived outputParameters: - type: object mapping: $. - method: POST name: createcreditreason description: Create Credit Reason call: m3ter-creditreason.createcreditreason with: orgId: rest.orgId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/organizations/{orgid}/picklists/creditreasons/{id} name: organizations-orgid-picklists-creditreasons-id description: REST surface for organizations-orgId-picklists-creditreasons-id. operations: - method: GET name: getcreditreason description: Retrieve Credit Reason call: m3ter-creditreason.getcreditreason with: orgId: rest.orgId id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: updatecreditreason description: Update Credit Reason call: m3ter-creditreason.updatecreditreason with: orgId: rest.orgId id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletecreditreason description: Delete Credit Reason call: m3ter-creditreason.deletecreditreason with: orgId: rest.orgId id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: m3ter-creditreason-mcp port: 9090 transport: http description: MCP adapter for m3ter API — CreditReason. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-credit-reasons description: List Credit Reasons hints: readOnly: true destructive: false idempotent: true call: m3ter-creditreason.listcreditreasons with: orgId: tools.orgId pageSize: tools.pageSize nextToken: tools.nextToken ids: tools.ids codes: tools.codes archived: tools.archived outputParameters: - type: object mapping: $. - name: create-credit-reason description: Create Credit Reason hints: readOnly: false destructive: false idempotent: false call: m3ter-creditreason.createcreditreason with: orgId: tools.orgId body: tools.body outputParameters: - type: object mapping: $. - name: retrieve-credit-reason description: Retrieve Credit Reason hints: readOnly: true destructive: false idempotent: true call: m3ter-creditreason.getcreditreason with: orgId: tools.orgId id: tools.id outputParameters: - type: object mapping: $. - name: update-credit-reason description: Update Credit Reason hints: readOnly: false destructive: false idempotent: true call: m3ter-creditreason.updatecreditreason with: orgId: tools.orgId id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: delete-credit-reason description: Delete Credit Reason hints: readOnly: false destructive: true idempotent: true call: m3ter-creditreason.deletecreditreason with: orgId: tools.orgId id: tools.id outputParameters: - type: object mapping: $.