naftiko: 1.0.0-alpha2 info: label: Ampersand public API — Billing Account description: 'Ampersand public API — Billing Account. 2 operations. Lead operation: Ampersand Create a Portal Session for a Billing Account. Self-contained Naftiko capability covering one Ampersand business surface.' tags: - Ampersand - Billing Account created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: AMPERSAND_API_KEY: AMPERSAND_API_KEY capability: consumes: - type: http namespace: ampersand-billing-account baseUri: https://api.withampersand.com/v1 description: Ampersand public API — Billing Account business capability. Self-contained, no shared references. resources: - name: billingAccounts-billingAccountId-portalSession path: /billingAccounts/{billingAccountId}/portalSession operations: - name: createbillingaccountsession method: POST description: Ampersand Create a Portal Session for a Billing Account outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: billingAccountId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: orgs-orgId-billingAccount path: /orgs/{orgId}/billingAccount operations: - name: getorgbillingaccount method: GET description: Ampersand Get the Billing Account for an Organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: ID of the organization. required: true authentication: type: bearer token: '{{env.AMPERSAND_API_KEY}}' exposes: - type: rest namespace: ampersand-billing-account-rest port: 8080 description: REST adapter for Ampersand public API — Billing Account. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/billingaccounts/{billingaccountid}/portalsession name: billingaccounts-billingaccountid-portalsession description: REST surface for billingAccounts-billingAccountId-portalSession. operations: - method: POST name: createbillingaccountsession description: Ampersand Create a Portal Session for a Billing Account call: ampersand-billing-account.createbillingaccountsession with: billingAccountId: rest.billingAccountId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orgs/{orgid}/billingaccount name: orgs-orgid-billingaccount description: REST surface for orgs-orgId-billingAccount. operations: - method: GET name: getorgbillingaccount description: Ampersand Get the Billing Account for an Organization call: ampersand-billing-account.getorgbillingaccount with: orgId: rest.orgId outputParameters: - type: object mapping: $. - type: mcp namespace: ampersand-billing-account-mcp port: 9090 transport: http description: MCP adapter for Ampersand public API — Billing Account. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: ampersand-create-portal-session-billing description: Ampersand Create a Portal Session for a Billing Account hints: readOnly: false destructive: false idempotent: false call: ampersand-billing-account.createbillingaccountsession with: billingAccountId: tools.billingAccountId body: tools.body outputParameters: - type: object mapping: $. - name: ampersand-get-billing-account-organization description: Ampersand Get the Billing Account for an Organization hints: readOnly: true destructive: false idempotent: true call: ampersand-billing-account.getorgbillingaccount with: orgId: tools.orgId outputParameters: - type: object mapping: $.