> ## Documentation Index
> Fetch the complete documentation index at: https://claimsdesk-871aefc7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Triggers report generation, logs the execution record, and persists the resulting DataJson snapshot.



## OpenAPI

````yaml POST /api/v1/Reports/generate
openapi: 3.0.4
info:
  title: ClaimsDesk API v1.0
  description: Core claims engine and workflow endpoints.
  version: '1.0'
servers:
  - url: http://claimsdesk.runasp.net
    description: Production / Demo Server
security:
  - AppId: []
    ApiKey: []
tags:
  - name: Auth
    x-group: Authentication & Session
    description: >-
      User login, customer authentication, session profile, and Multi-Factor
      Authentication (2FA).
  - name: Claims
    x-group: Claims Processing
    description: >-
      Core claims engine: FNOL submission, claim review, adjustments, status
      progression, and cancellation.
  - name: Workflows
    x-group: Workflow Engine
    description: >-
      Workflow definitions, process stages, approval transitions, and rule
      cloning.
  - name: WorkflowInstances
    x-group: Workflow Engine
    description: >-
      Runtime workflow tracking, stage progression, pause/resume controls, and
      execution trace logs.
  - name: Policies
    x-group: Insurance & Underwriting
    description: >-
      Policy management, terms, coverage limits, and claim entitlement
      verification.
  - name: PolicyContributions
    x-group: Insurance & Underwriting
    description: Policy premium contributions, payment logs, and transaction receipts.
  - name: Customers
    x-group: Policyholders & Members
    description: Customer master records and policyholder profiles.
  - name: Members
    x-group: Policyholders & Members
    description: Covered members, dependents, and beneficiary allocations.
  - name: Organizations
    x-group: Tenant & Multi-Branch
    description: Corporate clients and tenant organizations.
  - name: Branches
    x-group: Tenant & Multi-Branch
    description: Branch offices and organizational operational units.
  - name: Users
    x-group: User & Access Management
    description: Staff user administration, approval limits, and branch assignments.
  - name: Roles
    x-group: User & Access Management
    description: Role definitions and system authorization tiers.
  - name: Permissions
    x-group: User & Access Management
    description: Platform feature permissions and operational entitlements.
  - name: RolePermissions
    x-group: User & Access Management
    description: Role-to-permission mapping and capability matrices.
  - name: Subscriptions
    x-group: Subscriptions & Licensing
    description: Tenant subscription plans, billing tiers, and validity windows.
  - name: LicensePools
    x-group: Subscriptions & Licensing
    description: License pool quota allocations and seat provisioning.
  - name: UserLicenses
    x-group: Subscriptions & Licensing
    description: User license seat assignments and activation keys.
  - name: Notifications
    x-group: Communications & Messaging
    description: In-app notifications inbox, unread counts, batch marks, and cleanup.
  - name: Emails
    x-group: Communications & Messaging
    description: Transactional email delivery, recipient dispatch, and SMTP audit history.
  - name: Sms
    x-group: Communications & Messaging
    description: >-
      SMS gateway dispatch (Africa's Talking), delivery receipts, and messaging
      logs.
  - name: Reports
    x-group: Analytics & Reporting
    description: >-
      Analytics engine, live report preview, batch generation, and PDF/CSV
      export.
  - name: Settings
    x-group: Configuration & Preferences
    description: System configurations, preferences, and batch setting updates.
  - name: ApiKeys
    x-group: Developer & Security
    description: Tenant integration keys and machine-to-machine authentication tokens.
  - name: AuditTrails
    x-group: Developer & Security
    description: >-
      Comprehensive audit logs, activity tracing, and regulatory compliance
      records.
  - name: Payments
    x-group: Payments & M-Pesa
    description: >-
      M-Pesa Daraja integration: STK Push (Lipa Na M-Pesa Online), B2C Claim
      Settlement Disbursement, Webhooks, and Transaction Tracking.
paths:
  /api/v1/Reports/generate:
    post:
      tags:
        - Reports
      summary: >-
        Triggers report generation, logs the execution record, and persists the
        resulting DataJson snapshot.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateReportRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/GenerateReportRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/GenerateReportRequestDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ReportDetailDto'
            application/json:
              schema:
                $ref: '#/components/schemas/ReportDetailDto'
            text/json:
              schema:
                $ref: '#/components/schemas/ReportDetailDto'
components:
  schemas:
    GenerateReportRequestDto:
      required:
        - name
        - type
      type: object
      properties:
        name:
          maxLength: 150
          minLength: 1
          type: string
        type:
          $ref: '#/components/schemas/ReportType'
        organizationId:
          type: integer
          format: int32
          nullable: true
        fromDate:
          type: string
          format: date-time
          nullable: true
        toDate:
          type: string
          format: date-time
          nullable: true
        generatedByUserId:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    ReportDetailDto:
      type: object
      properties:
        id:
          type: integer
          format: int32
        organizationId:
          type: integer
          format: int32
        organizationName:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/ReportType'
        typeName:
          type: string
          nullable: true
        fromDate:
          type: string
          format: date-time
          nullable: true
        toDate:
          type: string
          format: date-time
          nullable: true
        generatedByUserId:
          type: integer
          format: int32
        generatedByUserName:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/ReportStatus'
        generatedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        dataJson:
          type: string
          nullable: true
        errorMessage:
          type: string
          nullable: true
      additionalProperties: false
    ReportType:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
      type: integer
      format: int32
    ReportStatus:
      enum:
        - 1
        - 2
        - 3
        - 4
      type: integer
      format: int32
  securitySchemes:
    AppId:
      type: apiKey
      description: App ID authentication. Enter your App ID below.
      name: X-App-Id
      in: header
    ApiKey:
      type: apiKey
      description: API Key authentication. Enter your key below.
      name: X-Api-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.