New KPMG Agentic ERP, now available with KPMG in 140+ countries Read the announcement

List ledger transaction lines

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

Returns a paginated list of ledger transaction lines

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

      Note

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

    • ledgerTransactionId string · uuid

      Note

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

    • reversedLedgerTransactionId string · uuid

      Only reversal lines carry the original ledger transaction ID; original lines have null.

    • reversedLedgerTransactionLineId string · uuid

      Only reversal lines carry the original ledger transaction line ID; original lines have null.

    • transactionSequenceId string

      Note

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

    • companyId string · uuid

      Note

      Your company id, the same on every line.

    • companyEntityId string · uuid

      Note

      The legal entity whose books this line sits in.

    • companyEntityCode string

      Note

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

    • companyEntityName string

      Note

      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

      Note

      The ledger account the line posts to.

    • accountCode integer · int32

      Note

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

    • accountLabel string

      Note

      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

      Note

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

    • documentSequenceId string

      Note

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

    • accountingDocumentId string · uuid

      Note

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

    • accountingDocumentNumber string

      Note

      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

      Note

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

    • valuationDate string · date

      Note

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

    • description string

      Note

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

    • documentDescription string

      Note

      The description on the document header.

    • amounts object

      Note

      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.

        Note

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

        One of D C

      • transactionAmount integer · int64

        Note

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

      • transactionAmountInMajors number

        Note

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

      • signedTransactionAmount integer · int64

        Note

        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

        Note

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

      • localAmount integer · int64

        Note

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

      • localAmountInMajors number

        Note

        localAmount as a decimal, unsigned.

      • signedLocalAmount integer · int64

        Note

        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

        Note

        The entity's local currency.

      • groupAmount integer · int64

        Note

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

      • groupAmountInMajors number

        Note

        groupAmount as a decimal, unsigned.

      • signedGroupAmount integer · int64

        Note

        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

        Note

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

      • debit boolean

        Note

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

      • credit boolean

        Note

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

    • taxId string · uuid

      Note

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

    • taxTagLabel string

      Note

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

    • taxCode string

      Note

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

    • businessPartnerName string

      Note

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

    • businessPartnerId string · uuid

      Note

      Id of that vendor or customer.

    • costCenterId string · uuid

      Note

      Cost center on the line; null when none.

    • accruedLedgerTransactionLineId string · uuid

      Note

      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

      Note

      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

      Note

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

    • accountingReleaseEndDate string · date

      Note

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

    • createdAt string · date-time

      Note

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

    • createdBy string · uuid

      Note

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

    • customProperties array of object

      Note

      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)