> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluidehr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Render income statement XLSX (internal reporting)



## OpenAPI

````yaml /openapi/fluide-utils.json post /api/v1/app/internal/artifacts/financial/income-statement.xlsx
openapi: 3.0.0
info:
  title: Fluide Utils API
  description: >-
    Shared platform utilities: notifications, file storage, document generation
    (PDFs, spreadsheets), and document jobs used across the suite. In the API
    playground, click Authorize and provide Bearer JWT, X-Fluide-Api-Key, and
    X-Fluide-Client-Id (fluide-developer). For partner / ISV integrations acting
    on a merchant, also set optional X-Workspace-Id and X-Acting-Company-Id on
    each request (see Multi-tenancy).
  version: '1.0'
  contact: {}
servers:
  - url: https://test.api.fluidehr.com
    description: API
security:
  - bearer: []
    fluideApiKey: []
    fluideClientId: []
tags:
  - name: App
    description: Service root and build metadata. Use for quick connectivity checks.
    x-group: Operations
  - name: Prometheus
    description: >-
      Prometheus scrape endpoint in text exposition format. Configure your
      metrics collector to poll this path on each service.
    x-group: Operations
  - name: Notifications
    description: In-app and multi-channel notifications for suite products.
  - name: File Management
    description: Upload, download, and manage files scoped to your organization.
  - name: Internal Files
  - name: Documents
    description: >-
      Generate payslips, invoices, financial reports, and other PDF or
      spreadsheet artifacts.
  - name: Public artifacts
  - name: Internal Documents
  - name: Internal Artifacts
  - name: Document jobs
  - name: Document management
  - name: Authorize
    description: >-
      Exchange API key and secret for a machine JWT, read developer metadata,
      rotate secrets, and manage API billing.
paths:
  /api/v1/app/internal/artifacts/financial/income-statement.xlsx:
    post:
      tags:
        - Internal Artifacts
      summary: Render income statement XLSX (internal reporting)
      operationId: InternalArtifactsController_financialIncomeStatementXlsx
      parameters:
        - name: X-Workspace-Id
          in: header
          required: false
          description: >-
            Partner / ISV only: UUID of the workspace that owns the client
            company. Required together with X-Acting-Company-Id when scoping
            product APIs to a merchant. See /getting-started/multi-tenancy.
          schema:
            type: string
            format: uuid
          example: b03fa178-67bd-4378-a5aa-d169c01ccb6f
        - name: X-Acting-Company-Id
          in: header
          required: false
          description: >-
            Partner / ISV only: UUID of the client company to act on. Must
            belong to the workspace in X-Workspace-Id.
          schema:
            type: string
            format: uuid
          example: ab2df10a-c66c-4bef-b7d6-efda26cca494
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalIncomeStatementPdfDto'
      responses:
        '201':
          description: ''
      security:
        - bearer: []
          fluideApiKey: []
          fluideClientId: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -sS -X POST
            "$FLUIDE_BASE_URL/api/v1/app/internal/artifacts/financial/income-statement.xlsx"
            \
              -H "Authorization: Bearer $FLUIDE_ACCESS_TOKEN" \
              -H "X-Fluide-Api-Key: $FLUIDE_API_KEY" \
              -H "X-Fluide-Client-Id: fluide-developer" \
              -H "X-Workspace-Id: $FLUIDE_WORKSPACE_ID" \
              -H "X-Acting-Company-Id: $FLUIDE_COMPANY_ID" \
              -H "Content-Type: application/json" \
              -d '{}'
        - lang: node
          label: Node.js
          source: >-
            const baseUrl = process.env.FLUIDE_BASE_URL;


            const response = await
            fetch(`${baseUrl}/api/v1/app/internal/artifacts/financial/income-statement.xlsx`,
            {
              method: 'POST',
              headers: {
                Authorization: `Bearer ${process.env.FLUIDE_ACCESS_TOKEN}`,
                'X-Fluide-Api-Key': process.env.FLUIDE_API_KEY,
                'X-Fluide-Client-Id': 'fluide-developer',
                'X-Workspace-Id': process.env.FLUIDE_WORKSPACE_ID,
                'X-Acting-Company-Id': process.env.FLUIDE_COMPANY_ID,
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({}),
            });


            if (!response.ok) throw new Error(`HTTP ${response.status}: ${await
            response.text()}`);

            console.log(await response.json());
        - lang: python
          label: Python
          source: |-
            import os
            import requests

            base_url = os.environ["FLUIDE_BASE_URL"]
            headers = {
                    "Authorization": f"Bearer {os.environ['FLUIDE_ACCESS_TOKEN']}",
                    "X-Fluide-Api-Key": os.environ["FLUIDE_API_KEY"],
                    "X-Fluide-Client-Id": "fluide-developer",
                    "X-Workspace-Id": os.environ["FLUIDE_WORKSPACE_ID"],
                    "X-Acting-Company-Id": os.environ["FLUIDE_COMPANY_ID"],
            }

            response = requests.post(
                f"{base_url}/api/v1/app/internal/artifacts/financial/income-statement.xlsx",
                headers=headers,
                json={},
                timeout=30,
            )
            response.raise_for_status()
            print(response.json())
        - lang: java
          label: Java
          source: >-
            import java.net.URI;

            import java.net.http.HttpClient;

            import java.net.http.HttpRequest;

            import java.net.http.HttpResponse;


            String baseUrl = System.getenv("FLUIDE_BASE_URL");

            HttpClient client = HttpClient.newHttpClient();

            HttpRequest.Builder builder = HttpRequest.newBuilder()
                .uri(URI.create(baseUrl + "/api/v1/app/internal/artifacts/financial/income-statement.xlsx"))
                .header("Authorization", "Bearer " + System.getenv("FLUIDE_ACCESS_TOKEN"))
                .header("X-Fluide-Api-Key", System.getenv("FLUIDE_API_KEY"))
                .header("X-Fluide-Client-Id", "fluide-developer")
                .header("X-Workspace-Id", System.getenv("FLUIDE_WORKSPACE_ID"))
                .header("X-Acting-Company-Id", System.getenv("FLUIDE_COMPANY_ID"))
                .header("Content-Type", "application/json")
                .POST(HttpRequest.BodyPublishers.ofString("{}"))
                .build();
            HttpResponse<String> response = client.send(builder.build(),
            HttpResponse.BodyHandlers.ofString());

            if (response.statusCode() >= 400) throw new RuntimeException("HTTP "
            + response.statusCode() + ": " + response.body());

            System.out.println(response.body());
        - lang: php
          label: PHP
          source: >-
            <?php

            $baseUrl = getenv("FLUIDE_BASE_URL");

            $ch = curl_init($baseUrl .
            "/api/v1/app/internal/artifacts/financial/income-statement.xlsx");

            curl_setopt_array($ch, [
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_CUSTOMREQUEST => 'POST',
                CURLOPT_HTTPHEADER => [
                    'Authorization: Bearer ' . getenv('FLUIDE_ACCESS_TOKEN'),
                    'X-Fluide-Api-Key: ' . getenv('FLUIDE_API_KEY'),
                    'X-Fluide-Client-Id: fluide-developer',
                    'X-Workspace-Id: ' . getenv('FLUIDE_WORKSPACE_ID'),
                    'X-Acting-Company-Id: ' . getenv('FLUIDE_COMPANY_ID'),
                    'Content-Type: application/json',
                ],
                CURLOPT_POSTFIELDS => "{}",
            ]);

            $response = curl_exec($ch);

            if ($response === false) throw new
            RuntimeException(curl_error($ch));

            $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);

            if ($status >= 400) throw new RuntimeException("HTTP $status:
            $response");

            echo $response;
components:
  schemas:
    InternalIncomeStatementPdfDto:
      type: object
      properties:
        correlationId:
          type: string
          maxLength: 128
        organizationName:
          type: string
          maxLength: 512
        presentationCurrency:
          type: string
          maxLength: 8
        periodFrom:
          type: string
          maxLength: 32
        periodTo:
          type: string
          maxLength: 32
        basis:
          type: string
          maxLength: 32
        revenue:
          $ref: '#/components/schemas/FinancialPlSectionDto'
        expense:
          $ref: '#/components/schemas/FinancialPlSectionDto'
        netIncome:
          type: number
        reportFramework:
          type: string
          description: IFRS | OHADA | GAAP — drives localized report titles.
          maxLength: 32
        companyLegal:
          $ref: '#/components/schemas/CompanyLegalBlockDto'
        reportMetadata:
          $ref: '#/components/schemas/ReportMetadataDto'
        notes:
          type: array
          items:
            type: string
        organizationId:
          type: string
          format: uuid
      required:
        - correlationId
        - periodFrom
        - periodTo
        - revenue
        - expense
        - netIncome
        - organizationId
    FinancialPlSectionDto:
      type: object
      properties:
        total:
          type: number
        lines:
          type: array
          items:
            $ref: '#/components/schemas/FinancialPlLineDto'
      required:
        - total
        - lines
    CompanyLegalBlockDto:
      type: object
      properties:
        legalName:
          type: string
          maxLength: 512
        registrationNumber:
          type: string
          maxLength: 128
        taxId:
          type: string
          maxLength: 128
        address:
          type: string
          maxLength: 1024
        city:
          type: string
          maxLength: 256
        countryCode:
          type: string
          maxLength: 4
    ReportMetadataDto:
      type: object
      properties:
        generatedAt:
          type: string
          maxLength: 40
        generatedBy:
          type: string
          maxLength: 512
        systemSource:
          type: string
          maxLength: 128
        reportCorrelationId:
          type: string
          maxLength: 128
        appVersion:
          type: string
          maxLength: 64
        fiscalPeriodLabel:
          type: string
          maxLength: 256
        lastModifiedAt:
          type: string
          maxLength: 32
        approvedBy:
          type: string
          maxLength: 128
        approvedAt:
          type: string
          maxLength: 32
    FinancialPlLineDto:
      type: object
      properties:
        accountCode:
          type: string
          maxLength: 64
        accountName:
          type: string
          maxLength: 512
        amount:
          type: number
        rowNote:
          type: string
          maxLength: 512
      required:
        - accountCode
        - accountName
        - amount
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token JWT. Use as Authorization: Bearer <token>. In the API
        playground, paste the JWT only.
    fluideApiKey:
      type: apiKey
      in: header
      name: X-Fluide-Api-Key
      description: >-
        Developer API key (fl_dev_...). Required on every API call with a
        machine access token.
      x-default: fl_dev_your_key
    fluideClientId:
      type: apiKey
      in: header
      name: X-Fluide-Client-Id
      description: >-
        First-party client audience. Must match the fluide_client_id claim on
        the JWT. Use fluide-developer for Connect.
      x-default: fluide-developer

````