openapi: 3.1.0 info: title: Lean Authentication Account on File Insights API description: 'OAuth 2.0 client-credentials token issuance for Lean APIs. Generates two classes of JWT access token: (1) scope=api for server-to-server backend calls, and (2) scope=customer. for the LinkSDK to act on behalf of an end-user. All tokens must be generated from a secure backend using credentials issued in the Lean Application Dashboard. ' version: '1.0' contact: name: Lean Support url: https://help.leantech.me license: name: Lean Terms of Service url: https://www.leantech.me servers: - url: https://auth.leantech.me description: Production - url: https://auth.sandbox.ae.leantech.me description: Sandbox - UAE - url: https://auth.sandbox.sa.leantech.me description: Sandbox - KSA 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