Light APIv1.0.0

API / Reference / General Ledger Summary

Get general ledger summary

GET https://api.light.inc/v1/general-ledger-summary

Returns the opening balance, net movement and closing balance of every account over a date range. Each account carries one figure per entity in scope, the subtotal of those entities' own books, the intercompany elimination the selection is entitled to, and their total. Without a company entity filter the scope is every entity of the company, including inactive ones. An elimination between two entities applies only when both are in scope; one belonging to the group as a whole applies only when the scope covers the whole company.

The cursor description below is wrong for this endpoint. Sending cursor=0 is rejected with {"name": "InvalidCursorException", "errors": [{"type": "INVALID_CURSOR"}]}. Omit cursor on the first request and pass nextCursor back verbatim; there is no offset parameter, no total, and prevCursor is always null. Only accountCode is sortable, and limit cannot exceed 200.

Balances are debit-positive (a credit balance is negative), the opposite polarity to the signed amounts on GET /v1/ledger-transaction-lines. from and to are both required (MISSING_PARAMETER), from must not be after to, the opening balance covers every posting before from, and the movement covers from to to inclusive. Entity filters (companyEntityId, companyEntityCode) accept only eq, ne, in and not_in (UNSUPPORTED_GENERAL_LEDGER_SUMMARY_FILTER_OPERATOR); an entity filter that matches nothing returns rows with empty entities and zero figures. At most two concurrent calls per credential (429 beyond that). Reading amounts sets out the polarity rules.

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Query parameters

  • from string · date

    First day included in the movement figures, inclusive. A UTC calendar date in YYYY-MM-DD format.

  • to string · date

    Last day included in the movement figures, inclusive. A UTC calendar date in YYYY-MM-DD format.

  • sort string

    Sort string in the format field:direction. To provide multiple sort fields, separate them with commas.

    Available directions: asc, desc.

    Available fields: accountCode.

  • filter string

    Filter string in the format field:operator:value. To provide multiple filters, separate them with commas.

    Available operators: eq, ne, in, not_in, gt, gte, lt, lte.

    • For in and not_in operators, provide multiple values separated by the pipe character (|).

    Available fields: accountCode, accountId, accountType, companyEntityCode, companyEntityId.

  • limit integer · int32

    Maximum number of items to return. Default is 50, maximum is 200.

  • cursor string

    The cursor position to start returning results from. Omit it, or provide 0, for the initial request. For subsequent requests, use nextCursor from the previous response to navigate. Cursor values are opaque and should not be constructed manually. This endpoint paginates by cursor only and has no offset parameter.

Response

  • records array of object

    List of records for the current page

    • accountId string · uuid

      The ledger account.

    • accountCode integer · int32

      Its numeric code in the chart of accounts.

    • accountLabel string

      Its name.

    • accountType string

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of BANK CARD CASH_AND_EQUIVALENTS ACCOUNTS_RECEIVABLE INVENTORY CORPORATE_TAX_RECEIVABLE OTHER_CURRENT_ASSET INTANGIBLE_NON_CURRENT_ASSET TANGIBLE_NON_CURRENT_ASSET FINANCIAL_NON_CURRENT_ASSET CORPORATE_TAX_DEFERRED_ASSET OTHER_NON_CURRENT_ASSET ACCOUNTS_PAYABLE OVERDRAFT_FACILITY CORPORATE_TAX_PAYABLE OTHER_CURRENT_LIABILITY LONG_TERM_LOAN CORPORATE_TAX_DEFERRED_LIABILITY OTHER_LONG_TERM_LIABILITY CONTRIBUTED_CAPITAL RETAINED_EARNINGS ACCUMULATED_OTHER_COMPREHENSIVE_INCOME OTHER_EQUITY COST_OF_SALES DISTRIBUTION_COST GENERAL_AND_ADMINISTRATIVE_EXPENSE PERSONNEL_COST OTHER_OPERATING_EXPENSE INCOME_TAX DEPRECIATION_AND_AMORTIZATION NON_OPERATING_EXPENSE INTEREST_EXPENSE EXCHANGE_RATE_LOSS_REALIZED EXCHANGE_RATE_LOSS_UNREALIZED OTHER_FINANCIAL_EXPENSE REVENUE DISCOUNT NON_OPERATING_INCOME INTEREST_INCOME EXCHANGE_RATE_GAIN_REALIZED EXCHANGE_RATE_GAIN_UNREALIZED OTHER_FINANCIAL_INCOME

    • entities array of object

      One result per entity in scope, whether or not it posted to this account

      • companyEntityId string · uuid

        The entity.

      • companyEntityCode string

        Its three-digit code.

      • companyEntityName string

        Its name.

      • localCurrency string

        The entity's local currency, which its localAmount figures are in.

      • amounts object

        Balance carried into the period, the period's own net, and the two added together

        Opening balance, movement and closing balance for this entity alone.

        • openingBalance object

          A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

          Balance carried into the period, from inception.

          • groupAmount integer · int64

            Amount in currency of base company

          • localAmount integer · int64

            Amount in local currency of entity, null on figures that cover more than one entity

        • movement object

          A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

          Net of the period's postings.

          • groupAmount integer · int64

            Amount in currency of base company

          • localAmount integer · int64

            Amount in local currency of entity, null on figures that cover more than one entity

        • closingBalance object

          A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

          Balance at the end of the period: opening balance plus movement.

          • groupAmount integer · int64

            Amount in currency of base company

          • localAmount integer · int64

            Amount in local currency of entity, null on figures that cover more than one entity

    • subtotal object

      Balance carried into the period, the period's own net, and the two added together

      The entities' own books added together, before elimination.

      • openingBalance object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Balance carried into the period, from inception.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

      • movement object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Net of the period's postings.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

      • closingBalance object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Balance at the end of the period: opening balance plus movement.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

    • elimination object

      Balance carried into the period, the period's own net, and the two added together

      Postings on the elimination ledger for this account.

      • openingBalance object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Balance carried into the period, from inception.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

      • movement object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Net of the period's postings.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

      • closingBalance object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Balance at the end of the period: opening balance plus movement.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

    • total object

      Balance carried into the period, the period's own net, and the two added together

      subtotal plus elimination: the consolidated figure.

      • openingBalance object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Balance carried into the period, from inception.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

      • movement object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Net of the period's postings.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

      • closingBalance object

        A signed, debit-positive figure in the group currency, and in the entity's local currency when the figure belongs to one entity

        Balance at the end of the period: opening balance plus movement.

        • groupAmount integer · int64

          Amount in currency of base company

        • localAmount integer · int64

          Amount in local currency of entity, null on figures that cover more than one entity

    • groupCurrency string

      The currency of every groupAmount in the row.

  • hasMore boolean

    Boolean flag indicating if there are more records available

  • nextCursor string

    Cursor for fetching the next page

  • prevCursor string

    Cursor for fetching the previous page