naftiko: 1.0.0-alpha2 info: label: Lago API documentation — Analytics description: 'Lago API documentation — Analytics. 5 operations. Lead operation: Lago List gross revenue. Self-contained Naftiko capability covering one Lago business surface.' tags: - Lago - Analytics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: LAGO_API_KEY: LAGO_API_KEY capability: consumes: - type: http namespace: lago-analytics baseUri: https://api.getlago.com/api/v1 description: Lago API documentation — Analytics business capability. Self-contained, no shared references. resources: - name: analytics-gross_revenue path: /analytics/gross_revenue operations: - name: findallgrossrevenues method: GET description: Lago List gross revenue outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: currency in: query type: string description: Currency of revenue analytics. Format must be ISO 4217. - name: external_customer_id in: query type: string description: The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. - name: analytics-invoice_collection path: /analytics/invoice_collection operations: - name: findallinvoicecollections method: GET description: Lago List of finalized invoices outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: currency in: query type: string description: The currency of revenue analytics. Format must be ISO 4217. - name: analytics-invoiced_usage path: /analytics/invoiced_usage operations: - name: findallinvoicedusages method: GET description: Lago List usage revenue outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: currency in: query type: string description: The currency of invoiced usage analytics. Format must be ISO 4217. - name: analytics-mrr path: /analytics/mrr operations: - name: findallmrrs method: GET description: Lago List MRR outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: currency in: query type: string description: Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of an - name: analytics-overdue_balance path: /analytics/overdue_balance operations: - name: findalloverduebalances method: GET description: Lago List overdue balance outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: currency in: query type: string description: Currency of revenue analytics. Format must be ISO 4217. - name: external_customer_id in: query type: string description: The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. authentication: type: bearer token: '{{env.LAGO_API_KEY}}' exposes: - type: rest namespace: lago-analytics-rest port: 8080 description: REST adapter for Lago API documentation — Analytics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/analytics/gross-revenue name: analytics-gross-revenue description: REST surface for analytics-gross_revenue. operations: - method: GET name: findallgrossrevenues description: Lago List gross revenue call: lago-analytics.findallgrossrevenues with: currency: rest.currency external_customer_id: rest.external_customer_id outputParameters: - type: object mapping: $. - path: /v1/analytics/invoice-collection name: analytics-invoice-collection description: REST surface for analytics-invoice_collection. operations: - method: GET name: findallinvoicecollections description: Lago List of finalized invoices call: lago-analytics.findallinvoicecollections with: currency: rest.currency outputParameters: - type: object mapping: $. - path: /v1/analytics/invoiced-usage name: analytics-invoiced-usage description: REST surface for analytics-invoiced_usage. operations: - method: GET name: findallinvoicedusages description: Lago List usage revenue call: lago-analytics.findallinvoicedusages with: currency: rest.currency outputParameters: - type: object mapping: $. - path: /v1/analytics/mrr name: analytics-mrr description: REST surface for analytics-mrr. operations: - method: GET name: findallmrrs description: Lago List MRR call: lago-analytics.findallmrrs with: currency: rest.currency outputParameters: - type: object mapping: $. - path: /v1/analytics/overdue-balance name: analytics-overdue-balance description: REST surface for analytics-overdue_balance. operations: - method: GET name: findalloverduebalances description: Lago List overdue balance call: lago-analytics.findalloverduebalances with: currency: rest.currency external_customer_id: rest.external_customer_id outputParameters: - type: object mapping: $. - type: mcp namespace: lago-analytics-mcp port: 9090 transport: http description: MCP adapter for Lago API documentation — Analytics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: lago-list-gross-revenue description: Lago List gross revenue hints: readOnly: true destructive: false idempotent: true call: lago-analytics.findallgrossrevenues with: currency: tools.currency external_customer_id: tools.external_customer_id outputParameters: - type: object mapping: $. - name: lago-list-finalized-invoices description: Lago List of finalized invoices hints: readOnly: true destructive: false idempotent: true call: lago-analytics.findallinvoicecollections with: currency: tools.currency outputParameters: - type: object mapping: $. - name: lago-list-usage-revenue description: Lago List usage revenue hints: readOnly: true destructive: false idempotent: true call: lago-analytics.findallinvoicedusages with: currency: tools.currency outputParameters: - type: object mapping: $. - name: lago-list-mrr description: Lago List MRR hints: readOnly: true destructive: false idempotent: true call: lago-analytics.findallmrrs with: currency: tools.currency outputParameters: - type: object mapping: $. - name: lago-list-overdue-balance description: Lago List overdue balance hints: readOnly: true destructive: false idempotent: true call: lago-analytics.findalloverduebalances with: currency: tools.currency external_customer_id: tools.external_customer_id outputParameters: - type: object mapping: $.