Light APIv1.0.0

API / Reference / Ledger Transactions

List ledger transaction lines

GET https://api.light.inc/v1/ledger-transaction-lines

Returns a paginated list of ledger transaction lines

Signed amounts on these lines are credit-positive: signedLocalAmount, signedGroupAmount and signedTransactionAmount are negative for a debit and positive for a credit. That is the opposite polarity to the debit-positive balances GET /v1/general-ledger-summary and GET /v1/bank-accounts/{bankAccountId}/balance return, so reconciling one against the other means flipping the sign on one side. dcSign, debit and credit are returned too and say the same thing.

Reversal lines are included and cannot be told apart: archiving a posted document leaves the original lines and negated reversing lines with the same accountingDocumentId and postingDate, netting to zero. includeCustomProperties defaults to true. includeMaxLineAmount reports the largest transactionAmount across the whole filtered set, not the page. postingDate is the ledger date; valuationDate is the date whose FX rate produced the local and group amounts, equal to postingDate unless the document overrides it. Default order is newest line first. limit above 200 fails with INVALID_LIMIT_SIZE unless Light has raised the cap for your company, and then only with a single postingDate sort. How Light records money explains what these lines are, and Reading amounts the sign and currency 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

  • sort string

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

    Available directions: asc, desc.

    Available fields: accountingDocumentNumber, transactionSequenceId, documentSequenceId, documentType, accountCode, accountLabel, postingDate, accountType, taxTagLabel, createdAt.

  • 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, accDocId, businessPartnerId, businessPartnerName, companyEntityCode, companyEntityId, createdAt, customPropertyValueId, documentSequenceId, documentType, eliminationOffset, groupAmount, groupCurrency, id, ledgerName, lineType, localAmount, localCurrency, postingDate, taxTagLabel, transactionCurrency, transactionId, transactionSequenceId.

    These fields accept only a subset of the operators: customPropertyValueId (eq, in).

  • limit integer · int32

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

  • offset integer · int64deprecated

    Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.

  • cursor string

    The cursor position to start returning results from. To opt-in into cursor-based pagination, provide 0 for the initial request. For subsequent requests, use nextCursor and prevCursor from the previous response to navigate. Cursor values are opaque and should not be constructed manually.

  • includeCustomProperties boolean

  • includeMaxLineAmount booleandeprecated

    If true, includes the maximum line amount in the response. This field is deprecated and will be removed, please fetch all lines and compute this locally if needed

Response

  • maxTransactionAmount integer · int64deprecated

    Maximum line amount in transaction currency across all records. This field is deprecated and will be removed, please fetch all lines and compute this locally if needed

  • records array of object

    List of records for the current page

    • id string · uuid

      Id of this ledger line. Lines are never edited or deleted, so it is stable; corrections arrive as new reversing lines.

    • ledgerTransactionId string · uuid

      The ledger transaction this line belongs to. Lines sharing it were written together and balance to zero in every currency.

    • transactionSequenceId string

      The transaction's number, TX/ plus nine digits, assigned per company when the transaction was written.

    • companyId string · uuid

      Your company id, the same on every line.

    • companyEntityId string · uuid

      The legal entity whose books this line sits in.

    • companyEntityCode string

      The entity's three-digit code, the middle segment of document numbers such as AP/001/000000042.

    • companyEntityName string

      The entity's name.

    • ledgerName string

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

      One of PRIMARY ELIMINATION

    • accountId string · uuid

      The ledger account the line posts to.

    • accountCode integer · int32

      The account's numeric code in the chart of accounts.

    • accountLabel string

      The account's 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

    • accountingDocumentLineId string · uuid

      The document line this ledger line came from. null on lines Light derived at posting: tax, rounding and discount lines.

    • documentSequenceId string

      The document's number, <TYPE>/<entity code>/<9 digits>, for example AP/001/000000042.

    • accountingDocumentId string · uuid

      Id of the posted document. Filter on accDocId to get every ledger line of one document.

    • accountingDocumentNumber string

      The document's external number: the vendor's invoice number on a bill, the invoice number on a sales invoice, the free-text reference on a journal entry. null when there is none.

    • documentType string

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

      One of AP AR BP CC CN CT DE FX JE YC

    • type string

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

      One of DISCOUNT MAIN OFFSET ROUNDING TAX WITHHOLDING

    • postingDate string · date

      The ledger date, which decides the accounting period the line falls in.

    • valuationDate string · date

      The date whose exchange rate produced the local and group amounts. Equal to postingDate unless the document set its own.

    • description string

      The line's own description, as entered on the document line.

    • documentDescription string

      The description on the document header.

    • amounts object

      The amount in the document, local and group currencies, unsigned, with one direction in dcSign. See Reading amounts.

      • dcSign string

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

        D or C. Redundant with the sign of signedLocalAmount (D is negative there) and with debit/credit.

        One of D C

      • transactionAmount integer · int64

        Unsigned magnitude. The direction lives in the sign of signedTransactionAmount, not here.

      • transactionAmountInMajors number

        transactionAmount as a decimal, unsigned. For display, not arithmetic.

      • signedTransactionAmount integer · int64

        Credit-positive: a credit is positive, a debit is negative, in minor units. This is the opposite polarity to the balances GET /v1/general-ledger-summary returns, which are debit-positive — reconciling one against the other means flipping the sign on one side. There is no InMajors counterpart to this field; the unsigned *InMajors value beside it carries the magnitude only.

      • transactionCurrency string

        The document's currency. null on lines with no transaction amount: rounding, revaluation and translation-adjustment lines.

      • localAmount integer · int64

        Unsigned magnitude. The direction lives in the sign of signedLocalAmount, not here.

      • localAmountInMajors number

        localAmount as a decimal, unsigned.

      • signedLocalAmount integer · int64

        Credit-positive: a credit is positive, a debit is negative, in minor units. This is the opposite polarity to the balances GET /v1/general-ledger-summary returns, which are debit-positive — reconciling one against the other means flipping the sign on one side. There is no InMajors counterpart to this field; the unsigned *InMajors value beside it carries the magnitude only.

      • localCurrency string

        The entity's local currency.

      • groupAmount integer · int64

        Unsigned magnitude. The direction lives in the sign of signedGroupAmount, not here.

      • groupAmountInMajors number

        groupAmount as a decimal, unsigned.

      • signedGroupAmount integer · int64

        Credit-positive: a credit is positive, a debit is negative, in minor units. This is the opposite polarity to the balances GET /v1/general-ledger-summary returns, which are debit-positive — reconciling one against the other means flipping the sign on one side. There is no InMajors counterpart to this field; the unsigned *InMajors value beside it carries the magnitude only.

      • groupCurrency string

        The company's group currency, the same on every line.

      • debit boolean

        true on a debit line. Redundant with dcSign and with a negative signedLocalAmount.

      • credit boolean

        true on a credit line. Redundant with dcSign and with a positive signedLocalAmount.

    • taxId string · uuid

      Id of the tax code on the line; null without one.

    • taxTagLabel string

      Label of the tax code's base tag, the VAT-return box the line reports into; null without a tax code.

    • taxCode string

      The tax code's code as shown in the product; null without one.

    • businessPartnerName string

      The vendor or customer on the document, when it has one.

    • businessPartnerId string · uuid

      Id of that vendor or customer.

    • costCenterId string · uuid

      Cost center on the line; null when none.

    • accruedLedgerTransactionLineId string · uuid

      On a release line (one instalment of a deferral, accrual or depreciation schedule): the id of the original line it releases. Legacy name; null on every other line.

    • ledgerTransactionType string

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

      One of DEFAULT AMORTIZATION FX CTA BANK_CLEARING

    • isAmortized boolean

      true on a line that carries a release schedule, meaning release lines draw it down over time. Legacy name for "is released".

    • accountingReleaseStartDate string · date

      First date of the release schedule on this line; null without one.

    • accountingReleaseEndDate string · date

      Last date of the release schedule on this line; null without one.

    • createdAt string · date-time

      When the line was written to the ledger. Not the posting date.

    • createdBy string · uuid

      The principal that posted the document: a user or an API key. null when the system posted it.

    • customProperties array of object

      Custom property values from the document line, returned when includeCustomProperties is true (the default on this endpoint).

      • groupId string · uuid

        ID of the custom property group

      • groupInternalName string

        Internal name of the custom property group

      • values array of object

        List of values. Note that this will be a single value unless the group input type supports multiple values

        • id string · uuid

          Unique identifier for the object

        • groupId string · uuid

          ID of the custom property group

        • groupInternalName string

          Internal name of the custom property group

        • companyId string · uuid

          ID of the company

        • internalName string

          Internal name of the custom property value

        • label string

          Label of the custom property value

        • context string

          Context/description of the custom property value

        • createdAt string · date-time

          Timestamp when the custom property value was created

        • updatedAt string · date-time

          Timestamp when the custom property value was last updated

  • hasMore boolean

    Boolean flag indicating if there are more records available

  • total integer · int64deprecated

    Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.

  • nextCursor string

    Cursor for fetching the next page (only for cursor pagination)

  • prevCursor string

    Cursor for fetching the previous page (only for cursor pagination)