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

# Get Income Statement

> Retrieve Income Statement from the database.

An [income statement](https://docs.rootfi.dev/api-reference/income-statements/overview) is a financial report that shows a business's revenue, expenses, and net income or loss over a specific period of time. In an accounting platform, an income statement is typically generated automatically based on the financial transactions that have been recorded in the system.


## OpenAPI

````yaml GET /accounting/income_statement
openapi: 3.0.1
info:
  title: rootfi
  version: v3
servers:
  - url: https://api.rootfi.dev/v3
    description: global
  - url: https://api.sa.rootfi.dev/v3
    description: saudi
security: []
paths:
  /accounting/income_statement:
    get:
      tags:
        - AccountingIncomeStatement
      summary: Get Income Statement
      description: Retrieve Income Statement from the database.
      operationId: accounting_incomeStatement_list
      parameters:
        - name: rootfi_updated_at[gte]
          in: query
          description: Filter by rootfi_updated_at Greater than or Equal To.
          required: false
          schema:
            type: string
            nullable: true
        - name: rootfi_company_id[eq]
          in: query
          description: >-
            Filter by rootfi_company_id. You can filter by any field using this
            syntax field_name[operator]
          required: false
          schema:
            type: integer
            nullable: true
          examples:
            Example1:
              value: 111
        - name: include_deleted_records
          in: query
          description: >-
            Include deleted records. By default, deleted records are not
            included. Supported values are true and false
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: 'false'
        - name: sort[period_end]
          in: query
          description: The period end date of the income statement
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: desc
        - name: period_start[gte]
          in: query
          description: The period start date of the income statement
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: '2023-10-01'
        - name: period_end[lte]
          in: query
          description: The period end date of the income statement
          required: false
          schema:
            type: string
            nullable: true
          examples:
            Example1:
              value: '2024-01-31'
        - name: period
          in: query
          description: >-
            The period of the income statement. This is the monthly grouping of
            the income statement. For example - If period is 3, then the income
            statement will be grouped by quarter.
          required: false
          schema:
            type: integer
            nullable: true
          examples:
            Example1:
              value: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountingGetIncomeStatementResponse'
              examples:
                Example1:
                  value:
                    data:
                      - rootfi_id: 157
                        rootfi_deleted_at: null
                        rootfi_created_at: '2024-01-22T05:07:31.465Z'
                        rootfi_updated_at: '2024-01-22T05:07:31.000Z'
                        rootfi_company_id: 1089
                        platform_id: '123456_1'
                        platform_unique_id: '123456'
                        period_start: '2023-10-01'
                        period_end: '2024-01-31'
                        currency_id: 00000000-0000-0000-0000-000000000000
                        revenue:
                          - name: Revenue
                            value: 123456.12
                            line_items:
                              - name: Otis Falls
                                value: 123456.12
                                account_id: '123456'
                                line_items: []
                        cost_of_goods_sold:
                          - name: Cost of Goods Sold
                            value: 123456.12
                            line_items:
                              - name: Otis Falls
                                value: 123456.12
                                account_id: '123456'
                                line_items: []
                        gross_profit: 123456
                        operating_expenses:
                          - name: Operating Expenses
                            value: 123456.12
                            line_items:
                              - name: Otis Falls
                                value: 123456.12
                                account_id: '123456'
                                line_items: []
                        operating_profit: 123456
                        non_operating_revenue:
                          - name: Non Operating Revenue
                            value: 123456.12
                            line_items:
                              - name: Otis Falls
                                value: 123456.12
                                account_id: '123456'
                                line_items: []
                        non_operating_expenses:
                          - name: Non Operating Expenses
                            value: 123456.12
                            line_items:
                              - name: Otis Falls
                                value: 123456.12
                                account_id: '123456'
                                line_items: []
                        earnings_before_taxes: 123456
                        taxes:
                          - name: Taxes
                            value: 123456.12
                            line_items:
                              - name: Otis Falls
                                value: 123456.12
                                account_id: '123456'
                                line_items: []
                        net_profit: 123456
                    prev: eyJyb290ZmlfaWQiOjQ0MDA2MX0=
                    next: eyJyb291ZmlfaWQiOjQ0MDA2MX0=
                    total_count: 123
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    accountingGetIncomeStatementResponse:
      title: accountingGetIncomeStatementResponse
      type: object
      description: The response object for the income statement endpoint.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/accountingIncomeStatementObject'
      required:
        - data
      allOf:
        - $ref: '#/components/schemas/CommonReadResponse'
    RootFiAPIResponseType:
      title: RootFiAPIResponseType
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RootFiAPIResponseErrorType'
          description: The error message
      required:
        - error
    accountingIncomeStatementObject:
      title: accountingIncomeStatementObject
      type: object
      properties: {}
      allOf:
        - $ref: '#/components/schemas/AccountingRootFiBaseFields'
        - $ref: '#/components/schemas/accountingIncomeStatementFields'
    CommonReadResponse:
      title: CommonReadResponse
      type: object
      properties:
        prev:
          type: string
          nullable: true
          description: The previous page of objects to retrieve
        next:
          type: string
          nullable: true
          description: The next page of objects to retrieve
        total_count:
          type: integer
          nullable: true
          description: The total count of the objects
    RootFiAPIResponseErrorType:
      title: RootFiAPIResponseErrorType
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        field:
          type: string
          description: The status of the error
      required:
        - message
        - code
        - field
    AccountingRootFiBaseFields:
      title: AccountingRootFiBaseFields
      type: object
      properties:
        rootfi_id:
          type: number
          format: double
          description: The unique ID we assign for that data's information
          example: 157
        rootfi_deleted_at:
          type: string
          format: date-time
          nullable: true
          description: The date at which the data was deleted in the accounting platform
        rootfi_created_at:
          type: string
          format: date-time
          description: The date at which RootFi first synced this data
          example: '2024-01-22T05:07:31.465Z'
        rootfi_updated_at:
          type: string
          format: date-time
          description: The latest date at which RootFi updated this data
          example: '2024-01-22T05:07:31.000Z'
        rootfi_company_id:
          type: number
          format: double
          description: The ID of the company in the accounting platform
          example: 1089
        platform_id:
          type: string
          description: An unique custom RootFi ID made from platform's unique_id.
          example: '123456'
        platform_unique_id:
          type: string
          nullable: true
          description: The ID of the data in the accounting platform.
        raw_data:
          type: object
          additionalProperties: true
          nullable: true
          description: >-
            A JSON containing fields that you can directly get from the
            accounting platform.
        data_hash:
          type: string
          nullable: true
          description: The hash of the data
      required:
        - rootfi_id
        - rootfi_created_at
        - rootfi_updated_at
        - rootfi_company_id
        - platform_id
    accountingIncomeStatementFields:
      title: accountingIncomeStatementFields
      type: object
      properties:
        period_start:
          type: string
          nullable: true
          description: The period start date of the income statement
        period_end:
          type: string
          nullable: true
          description: The period end date of the income statement
        currency_id:
          type: string
          nullable: true
          description: The currency id of the income statement
        revenue:
          type: array
          items:
            $ref: '#/components/schemas/FinancialStatementFields'
          nullable: true
          description: The revenue of the income statement
        cost_of_goods_sold:
          type: array
          items:
            $ref: '#/components/schemas/FinancialStatementFields'
          nullable: true
          description: The cost of goods sold of the income statement
        gross_profit:
          type: number
          format: double
          nullable: true
          description: The gross profit of the income statement
        operating_expenses:
          type: array
          items:
            $ref: '#/components/schemas/FinancialStatementFields'
          nullable: true
          description: The operating expenses of the income statement
        operating_profit:
          type: number
          format: double
          nullable: true
          description: The operating profit of the income statement
        non_operating_revenue:
          type: array
          items:
            $ref: '#/components/schemas/FinancialStatementFields'
          nullable: true
          description: The non operating revenue of the income statement
        non_operating_expenses:
          type: array
          items:
            $ref: '#/components/schemas/FinancialStatementFields'
          nullable: true
          description: The non operating expenses of the income statement
        earnings_before_taxes:
          type: number
          format: double
          nullable: true
          description: The earnings before taxes of the income statement
        taxes:
          type: array
          items:
            $ref: '#/components/schemas/FinancialStatementFields'
          nullable: true
          description: The taxes of the income statement
        net_profit:
          type: number
          format: double
          nullable: true
          description: The net profit of the income statement
        updated_at:
          type: string
          nullable: true
          description: The date the income statement was last updated
    FinancialStatementFields:
      title: FinancialStatementFields
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: The name of the line item
        value:
          type: number
          format: double
          nullable: true
          description: The value of the line item
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/FinancialStatementLineItemFields'
          nullable: true
          description: The line items of the line item
    FinancialStatementLineItemFields:
      title: FinancialStatementLineItemFields
      type: object
      properties:
        name:
          type: string
          description: The name of the line item
          example: Otis Falls
        value:
          type: number
          format: double
          description: The value of the line item
          example: 123456.12
        account_id:
          type: string
          nullable: true
          description: The account id of the line item
        line_items:
          type: array
          items:
            type: object
            additionalProperties: true
          nullable: true
          description: The line items of the line item
      required:
        - name
        - value
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````