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

# Get general ledger report



## OpenAPI

````yaml api-reference/openapi.json get /api/reports/general-ledger
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/reports/general-ledger:
    get:
      tags:
        - Reports
      summary: Get general ledger report
      operationId: GeneralLedgerController_getGeneralLedger
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
        - name: basis
          required: false
          in: query
          description: Accounting basis for the report (e.g., cash, accrual)
          schema:
            example: accrual
            type: string
        - description: Number of decimal places to display
          required: false
          name: precision
          in: query
          schema:
            example: 2
            type: number
        - description: Whether to divide the number by 1000
          required: false
          name: divideOn1000
          in: query
          schema:
            example: false
            type: boolean
        - description: Whether to show zero values
          required: false
          name: showZero
          in: query
          schema:
            type: boolean
            example: true
        - description: How to format money values
          required: false
          name: formatMoney
          in: query
          schema:
            example: total
            enum:
              - total
              - always
              - none
            type: string
        - description: How to format negative numbers
          required: false
          name: negativeFormat
          in: query
          schema:
            example: parentheses
            enum:
              - parentheses
              - mines
            type: string
        - name: noneTransactions
          required: false
          in: query
          description: Whether to exclude transactions from the report
          schema:
            default: false
            example: false
            type: boolean
        - name: accountsIds
          required: false
          in: query
          description: Array of account IDs to filter the report
          schema:
            example:
              - 1
              - 2
              - 3
            type: array
            items:
              type: number
        - name: accept
          required: true
          in: header
          schema:
            type: string
      responses:
        '200':
          description: General ledger report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralLedgerResponseDto'
              example:
                query:
                  from_date: '2025-06-01'
                  to_date: '2025-06-16'
                  basis: cash
                  number_format:
                    no_cents: false
                    divide_on1000: false
                  none_zero: false
                  accounts_ids: []
                data:
                  - id: 1008
                    name: Accounts Payable (A/P)
                    code: '20001'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions:
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: Bill
                        reference_id: 4
                        transaction_number: null
                        transaction_type_formatted: Bill
                        contact_name: business
                        contact_type: customer
                        transaction_type: Bill
                        index: 1
                        note: null
                        credit: 1000
                        debit: 0
                        amount: 1000
                        running_balance: 1000
                        formatted_amount: 1,000.00
                        formatted_credit: 1,000.00
                        formatted_debit: '0.00'
                        formatted_running_balance: 1,000.00
                        currency_code: USD
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: Bill
                        reference_id: 5
                        transaction_number: null
                        transaction_type_formatted: Bill
                        contact_name: business
                        contact_type: customer
                        transaction_type: Bill
                        index: 1
                        note: null
                        credit: 1000
                        debit: 0
                        amount: 1000
                        running_balance: 2000
                        formatted_amount: 1,000.00
                        formatted_credit: 1,000.00
                        formatted_debit: '0.00'
                        formatted_running_balance: 2,000.00
                        currency_code: USD
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: BillPayment
                        reference_id: 3
                        transaction_number: ''
                        transaction_type_formatted: transaction_type.payment_made
                        contact_name: business
                        contact_type: customer
                        transaction_type: BillPayment
                        index: 1
                        note: null
                        credit: 0
                        debit: 500
                        amount: -500
                        running_balance: 1500
                        formatted_amount: '-500.00'
                        formatted_credit: '0.00'
                        formatted_debit: '500.00'
                        formatted_running_balance: 1,500.00
                        currency_code: USD
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: VendorCredit
                        reference_id: 3
                        transaction_number: VC-00001
                        transaction_type_formatted: Vendor Credit
                        contact_name: business
                        contact_type: customer
                        transaction_type: VendorCredit
                        index: 1
                        note: null
                        credit: 0
                        debit: 100
                        amount: -100
                        running_balance: 1400
                        formatted_amount: '-100.00'
                        formatted_credit: '0.00'
                        formatted_debit: '100.00'
                        formatted_running_balance: 1,400.00
                        currency_code: USD
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: VendorCredit
                        reference_id: 4
                        transaction_number: VC-00001
                        transaction_type_formatted: Vendor Credit
                        contact_name: business
                        contact_type: customer
                        transaction_type: VendorCredit
                        index: 1
                        note: null
                        credit: 0
                        debit: 100
                        amount: -100
                        running_balance: 1300
                        formatted_amount: '-100.00'
                        formatted_credit: '0.00'
                        formatted_debit: '100.00'
                        formatted_running_balance: 1,300.00
                        currency_code: USD
                    closing_balance:
                      amount: 1300
                      formatted_amount: $1,300.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 1300
                      formatted_amount: $1,300.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1006
                    name: Accounts Receivable (A/R)
                    code: '10007'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1000
                    name: Bank Account
                    code: '10001'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions:
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: BillPayment
                        reference_id: 3
                        transaction_number: ''
                        transaction_type_formatted: transaction_type.payment_made
                        transaction_type: BillPayment
                        index: 2
                        note: null
                        credit: 500
                        debit: 0
                        amount: -500
                        running_balance: -500
                        formatted_amount: '-500.00'
                        formatted_credit: '500.00'
                        formatted_debit: '0.00'
                        formatted_running_balance: '-500.00'
                        currency_code: USD
                    closing_balance:
                      amount: -500
                      formatted_amount: '-$500.00'
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: -500
                      formatted_amount: '-$500.00'
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1023
                    name: Bank Fees and Charges
                    code: '40006'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1034
                    name: Chase - Plaid Checking
                    code: ''
                    index: null
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1004
                    name: Computer Equipment
                    code: '10005'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1019
                    name: Cost of Goods Sold
                    code: '40002'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions:
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: Bill
                        reference_id: 4
                        transaction_number: null
                        transaction_type_formatted: Bill
                        transaction_type: Bill
                        index: 1
                        note: null
                        credit: 0
                        debit: 1000
                        amount: 1000
                        running_balance: 1000
                        formatted_amount: 1,000.00
                        formatted_credit: '0.00'
                        formatted_debit: 1,000.00
                        formatted_running_balance: 1,000.00
                        currency_code: USD
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: VendorCredit
                        reference_id: 3
                        transaction_number: VC-00001
                        transaction_type_formatted: Vendor Credit
                        transaction_type: VendorCredit
                        index: 2
                        note: null
                        credit: 100
                        debit: 0
                        amount: -100
                        running_balance: 900
                        formatted_amount: '-100.00'
                        formatted_credit: '100.00'
                        formatted_debit: '0.00'
                        formatted_running_balance: '900.00'
                        currency_code: USD
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: VendorCredit
                        reference_id: 4
                        transaction_number: VC-00001
                        transaction_type_formatted: Vendor Credit
                        transaction_type: VendorCredit
                        index: 2
                        note: null
                        credit: 100
                        debit: 0
                        amount: -100
                        running_balance: 800
                        formatted_amount: '-100.00'
                        formatted_credit: '100.00'
                        formatted_debit: '0.00'
                        formatted_running_balance: '800.00'
                        currency_code: USD
                    closing_balance:
                      amount: 800
                      formatted_amount: $800.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 800
                      formatted_amount: $800.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1024
                    name: Depreciation Expense
                    code: '40007'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions:
                      - date: '2025-06-15T22:00:00.000Z'
                        date_formatted: 2025 Jun 16
                        reference_type: Journal
                        reference_id: 1017
                        transaction_number: REF
                        transaction_type_formatted: Manual journal
                        transaction_type: Journal
                        index: 2
                        note: ''
                        credit: 10000
                        debit: 0
                        amount: -10000
                        running_balance: -10000
                        formatted_amount: '-10,000.00'
                        formatted_credit: 10,000.00
                        formatted_debit: '0.00'
                        formatted_running_balance: '-10,000.00'
                        currency_code: USD
                    closing_balance:
                      amount: -10000
                      formatted_amount: '-$10,000.00'
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: -10000
                      formatted_amount: '-$10,000.00'
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1031
                    name: Discount
                    code: '40008'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1017
                    name: Drawings
                    code: '30003'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1022
                    name: Exchange Gain or Loss
                    code: '40005'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 123123
                      formatted_amount: $123,123.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 123123
                      formatted_amount: $123,123.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 123123
                      formatted_amount: $123,123.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1007
                    name: Inventory Asset
                    code: '10008'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions:
                      - date: '2025-06-09T22:00:00.000Z'
                        date_formatted: 2025 Jun 10
                        reference_type: Bill
                        reference_id: 5
                        transaction_number: null
                        transaction_type_formatted: Bill
                        transaction_type: Bill
                        index: 1
                        note: null
                        credit: 0
                        debit: 1000
                        amount: 1000
                        running_balance: 1000
                        formatted_amount: 1,000.00
                        formatted_credit: '0.00'
                        formatted_debit: 1,000.00
                        formatted_running_balance: 1,000.00
                        currency_code: USD
                    closing_balance:
                      amount: 1000
                      formatted_amount: $1,000.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 1000
                      formatted_amount: $1,000.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1010
                    name: Loan
                    code: '20003'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions:
                      - date: '2025-06-15T22:00:00.000Z'
                        date_formatted: 2025 Jun 16
                        reference_type: Journal
                        reference_id: 1017
                        transaction_number: REF
                        transaction_type_formatted: Manual journal
                        transaction_type: Journal
                        index: 1
                        note: ''
                        credit: 0
                        debit: 10000
                        amount: -10000
                        running_balance: -10000
                        formatted_amount: '-10,000.00'
                        formatted_credit: '0.00'
                        formatted_debit: 10,000.00
                        formatted_running_balance: '-10,000.00'
                        currency_code: USD
                    closing_balance:
                      amount: -10000
                      formatted_amount: '-$10,000.00'
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: -10000
                      formatted_amount: '-$10,000.00'
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1005
                    name: Office Equipment
                    code: '10006'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1020
                    name: Office expenses
                    code: '40003'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1015
                    name: Opening Balance Equity
                    code: '30002'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1011
                    name: Opening Balance Liabilities
                    code: '20004'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1033
                    name: Other Charges
                    code: '40010'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1018
                    name: Other Expenses
                    code: '40011'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1009
                    name: Owner A Drawings
                    code: '20002'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1016
                    name: Owner's Equity
                    code: '30003'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1003
                    name: Petty Cash
                    code: '10004'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1030
                    name: Prepaid Expenses
                    code: '100010'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: -123123
                      formatted_amount: '-$123,123.00'
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: -123123
                      formatted_amount: '-$123,123.00'
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: -123123
                      formatted_amount: '-$123,123.00'
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1032
                    name: Purchase Discount
                    code: '40009'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1021
                    name: Rent
                    code: '40004'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1014
                    name: Retained Earnings
                    code: '30001'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1012
                    name: Revenue Received in Advance
                    code: '20005'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1025
                    name: Sales of Product Income
                    code: '50001'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1026
                    name: Sales of Service Income
                    code: '50002'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1001
                    name: Saving Bank Account
                    code: '10002'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1013
                    name: Tax Payable
                    code: '20006'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1027
                    name: Uncategorized Income
                    code: '50003'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1002
                    name: Undeposited Funds
                    code: '10003'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                  - id: 1029
                    name: Unearned Revenue
                    code: '50005'
                    index: 1
                    parent_account_id: null
                    opening_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-01'
                    transactions: []
                    closing_balance:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                    closing_balance_subaccounts:
                      amount: 0
                      formatted_amount: $0.00
                      currency_code: USD
                      date: '2025-06-16'
                meta:
                  organization_name: BIGCAPITAL, INC
                  base_currency: USD
                  date_format: DD MMM yyyy
                  is_cost_compute_running: false
                  sheet_name: Balance Sheet
                  formatted_from_date: 2025/06/01
                  formatted_to_date: 2025/06/16
                  formatted_date_range: From 2025/06/01 | To 2025/06/16
            application/json+table:
              schema:
                $ref: '#/components/schemas/GeneralLedgerTableResponseDto'
components:
  schemas:
    GeneralLedgerResponseDto:
      type: object
      properties:
        query:
          description: Query parameters used to generate the report
          allOf:
            - $ref: '#/components/schemas/GeneralLedgerQueryResponseDto'
        data:
          description: General ledger data
          type: array
          items:
            $ref: '#/components/schemas/GeneralLedgerAccountDto'
        meta:
          description: Report metadata
          allOf:
            - $ref: '#/components/schemas/GeneralLedgerMetaDto'
      required:
        - query
        - data
        - meta
    GeneralLedgerTableResponseDto:
      type: object
      properties:
        table:
          description: Table data structure
          allOf:
            - $ref: '#/components/schemas/FinancialTableDataDto'
        query:
          description: Query parameters used to generate the report
          allOf:
            - $ref: '#/components/schemas/GeneralLedgerQueryResponseDto'
        meta:
          description: Report metadata
          allOf:
            - $ref: '#/components/schemas/GeneralLedgerMetaDto'
      required:
        - table
        - query
        - meta
    GeneralLedgerQueryResponseDto:
      type: object
      properties:
        fromDate:
          type: string
          description: Start date
        toDate:
          type: string
          description: End date
        basis:
          type: string
          description: Accounting basis
          enum:
            - cash
            - accrual
        numberFormat:
          description: Number format settings
          allOf:
            - $ref: '#/components/schemas/NumberFormatQueryDto'
        noneZero:
          type: boolean
          description: Exclude zero balance accounts
        accountsIds:
          description: Account IDs to include
          type: array
          items:
            type: number
      required:
        - fromDate
        - toDate
        - basis
        - numberFormat
        - noneZero
        - accountsIds
    GeneralLedgerAccountDto:
      type: object
      properties:
        id:
          type: number
          description: Account ID
        name:
          type: string
          description: Account name
        code:
          type: string
          description: Account code
        index:
          type: number
          description: Account index
        parentAccountId:
          type: number
          description: Parent account ID
        openingBalance:
          description: Opening balance
          allOf:
            - $ref: '#/components/schemas/FinancialReportTotalDto'
        transactions:
          description: Account transactions
          type: array
          items:
            $ref: '#/components/schemas/GeneralLedgerTransactionDto'
        closingBalance:
          description: Closing balance
          allOf:
            - $ref: '#/components/schemas/FinancialReportTotalDto'
      required:
        - id
        - name
        - code
        - index
        - openingBalance
        - transactions
        - closingBalance
    GeneralLedgerMetaDto:
      type: object
      properties:
        organizationName:
          type: string
          description: Organization name
        baseCurrency:
          type: string
          description: Base currency code
        dateFormat:
          type: string
          description: Date format string
        isCostComputeRunning:
          type: boolean
          description: Whether cost computation is running
        sheetName:
          type: string
          description: Sheet name
        formattedFromDate:
          type: string
          description: Formatted from date
        formattedToDate:
          type: string
          description: Formatted to date
        formattedDateRange:
          type: string
          description: Formatted date range
      required:
        - organizationName
        - baseCurrency
        - dateFormat
        - isCostComputeRunning
        - sheetName
        - formattedFromDate
        - formattedToDate
        - formattedDateRange
    FinancialTableDataDto:
      type: object
      properties:
        columns:
          description: Table column definitions
          type: array
          items:
            $ref: '#/components/schemas/FinancialTableColumnDto'
        rows:
          description: Table row data
          type: array
          items:
            $ref: '#/components/schemas/FinancialTableRowDto'
      required:
        - columns
        - rows
    NumberFormatQueryDto:
      type: object
      properties:
        precision:
          type: number
          description: Number of decimal places to display
          example: 2
        divideOn1000:
          type: boolean
          description: Whether to divide the number by 1000
          example: false
        showZero:
          type: boolean
          description: Whether to show zero values
          example: true
        formatMoney:
          type: string
          description: How to format money values
          example: total
          enum:
            - total
            - always
            - none
        negativeFormat:
          type: string
          description: How to format negative numbers
          example: parentheses
          enum:
            - parentheses
            - mines
    FinancialReportTotalDto:
      type: object
      properties:
        amount:
          type: number
          description: Numeric amount
        formattedAmount:
          type: string
          description: Formatted amount string
        currencyCode:
          type: string
          description: Currency code
        date:
          type: object
          description: Date associated with the total
      required:
        - amount
        - formattedAmount
        - currencyCode
    GeneralLedgerTransactionDto:
      type: object
      properties:
        date:
          type: string
          description: Transaction date
        dateFormatted:
          type: string
          description: Formatted date
        referenceType:
          type: string
          description: Reference type
        referenceId:
          type: number
          description: Reference ID
        transactionNumber:
          type: string
          description: Transaction number
        transactionTypeFormatted:
          type: string
          description: Formatted transaction type
        contactName:
          type: string
          description: Contact name
        contactType:
          type: string
          description: Contact type
        transactionType:
          type: string
          description: Transaction type
        index:
          type: number
          description: Transaction index
        note:
          type: string
          description: Transaction note
        credit:
          type: number
          description: Credit amount
        debit:
          type: number
          description: Debit amount
        amount:
          type: number
          description: Transaction amount
        runningBalance:
          type: number
          description: Running balance
        formattedAmount:
          type: string
          description: Formatted amount
        formattedCredit:
          type: string
          description: Formatted credit
        formattedDebit:
          type: string
          description: Formatted debit
        formattedRunningBalance:
          type: string
          description: Formatted running balance
        currencyCode:
          type: string
          description: Currency code
      required:
        - date
        - dateFormatted
        - referenceType
        - referenceId
        - transactionTypeFormatted
        - contactName
        - contactType
        - transactionType
        - index
        - credit
        - debit
        - amount
        - runningBalance
        - formattedAmount
        - formattedCredit
        - formattedDebit
        - formattedRunningBalance
        - currencyCode
    FinancialTableColumnDto:
      type: object
      properties:
        key:
          type: string
          description: Column key
        label:
          type: string
          description: Column header label
        cellIndex:
          type: number
          description: Cell position index
        children:
          description: Nested column definitions
          type: array
          items:
            $ref: '#/components/schemas/FinancialTableColumnDto'
      required:
        - key
        - label
    FinancialTableRowDto:
      type: object
      properties:
        cells:
          description: Cell data for this row
          type: array
          items:
            $ref: '#/components/schemas/FinancialTableCellDto'
        rowTypes:
          description: Row type classifications
          type: array
          items:
            type: string
        id:
          type: object
          description: Row identifier
        children:
          description: Child rows
          type: array
          items:
            $ref: '#/components/schemas/FinancialTableRowDto'
      required:
        - cells
        - rowTypes
        - id
    FinancialTableCellDto:
      type: object
      properties:
        key:
          type: string
          description: Cell key
        value:
          type: string
          description: Cell value
      required:
        - key
        - value

````