openapi: 3.1.0 info: title: Lean Insights API description: > Derived analytics over an entity's transaction history. Income detection, expense categorisation, and cashflow summaries used for underwriting, affordability, and personal financial management use cases. version: '2.0' contact: name: Lean Support url: https://help.leantech.me servers: - url: https://api2.leantech.me description: Production security: - BearerAuth: [] tags: - name: Insights paths: /insights/v2/income: post: summary: Lean Compute Income operationId: computeIncome tags: [Insights] parameters: - $ref: '#/components/parameters/EntityIdHeader' requestBody: required: false content: application/json: schema: type: object properties: start_date: type: string format: date end_date: type: string format: date responses: '200': description: Income analysis /insights/v2/expenses: get: summary: Lean Get Expenses operationId: getExpenses tags: [Insights] parameters: - $ref: '#/components/parameters/EntityIdHeader' responses: '200': description: Expenses analysis /insights/v2/assets/cashflows: get: summary: Lean Get Cashflows operationId: getCashflows tags: [Insights] parameters: - $ref: '#/components/parameters/EntityIdHeader' responses: '200': description: Cashflows analysis components: parameters: EntityIdHeader: name: entity_id in: header required: true schema: type: string format: uuid securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT