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
-
sortstringSort 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. -
filterstringFilter 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
inandnot_inoperators, 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). - For
-
limitinteger · int32Maximum number of items to return. Default is 50, maximum is 200.
-
offsetinteger · int64deprecatedNumber of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.
-
cursorstringThe cursor position to start returning results from. To opt-in into cursor-based pagination, provide
0for the initial request. For subsequent requests, usenextCursorandprevCursorfrom the previous response to navigate. Cursor values are opaque and should not be constructed manually. -
includeCustomPropertiesboolean -
includeMaxLineAmountbooleandeprecatedIf 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
-
maxTransactionAmountinteger · int64deprecatedMaximum 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
-
recordsarray of objectList of records for the current page
-
idstring · uuidId of this ledger line. Lines are never edited or deleted, so it is stable; corrections arrive as new reversing lines.
-
ledgerTransactionIdstring · uuidThe ledger transaction this line belongs to. Lines sharing it were written together and balance to zero in every currency.
-
transactionSequenceIdstringThe transaction's number,
TX/plus nine digits, assigned per company when the transaction was written. -
companyIdstring · uuidYour company id, the same on every line.
-
companyEntityIdstring · uuidThe legal entity whose books this line sits in.
-
companyEntityCodestringThe entity's three-digit code, the middle segment of document numbers such as
AP/001/000000042. -
companyEntityNamestringThe entity's name.
-
ledgerNamestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
PRIMARYELIMINATION -
accountIdstring · uuidThe ledger account the line posts to.
-
accountCodeinteger · int32The account's numeric code in the chart of accounts.
-
accountLabelstringThe account's name.
-
accountTypestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
BANKCARDCASH_AND_EQUIVALENTSACCOUNTS_RECEIVABLEINVENTORYCORPORATE_TAX_RECEIVABLEOTHER_CURRENT_ASSETINTANGIBLE_NON_CURRENT_ASSETTANGIBLE_NON_CURRENT_ASSETFINANCIAL_NON_CURRENT_ASSETCORPORATE_TAX_DEFERRED_ASSETOTHER_NON_CURRENT_ASSETACCOUNTS_PAYABLEOVERDRAFT_FACILITYCORPORATE_TAX_PAYABLEOTHER_CURRENT_LIABILITYLONG_TERM_LOANCORPORATE_TAX_DEFERRED_LIABILITYOTHER_LONG_TERM_LIABILITYCONTRIBUTED_CAPITALRETAINED_EARNINGSACCUMULATED_OTHER_COMPREHENSIVE_INCOMEOTHER_EQUITYCOST_OF_SALESDISTRIBUTION_COSTGENERAL_AND_ADMINISTRATIVE_EXPENSEPERSONNEL_COSTOTHER_OPERATING_EXPENSEINCOME_TAXDEPRECIATION_AND_AMORTIZATIONNON_OPERATING_EXPENSEINTEREST_EXPENSEEXCHANGE_RATE_LOSS_REALIZEDEXCHANGE_RATE_LOSS_UNREALIZEDOTHER_FINANCIAL_EXPENSEREVENUEDISCOUNTNON_OPERATING_INCOMEINTEREST_INCOMEEXCHANGE_RATE_GAIN_REALIZEDEXCHANGE_RATE_GAIN_UNREALIZEDOTHER_FINANCIAL_INCOME -
accountingDocumentLineIdstring · uuidThe document line this ledger line came from.
nullon lines Light derived at posting: tax, rounding and discount lines. -
documentSequenceIdstringThe document's number,
<TYPE>/<entity code>/<9 digits>, for exampleAP/001/000000042. -
accountingDocumentIdstring · uuidId of the posted document. Filter on
accDocIdto get every ledger line of one document. -
accountingDocumentNumberstringThe 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.
nullwhen there is none. -
documentTypestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
APARBPCCCNCTDEFXJEYC -
typestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DISCOUNTMAINOFFSETROUNDINGTAXWITHHOLDING -
postingDatestring · dateThe ledger date, which decides the accounting period the line falls in.
-
valuationDatestring · dateThe date whose exchange rate produced the local and group amounts. Equal to
postingDateunless the document set its own. -
descriptionstringThe line's own description, as entered on the document line.
-
documentDescriptionstringThe description on the document header.
-
amountsobjectThe amount in the document, local and group currencies, unsigned, with one direction in
dcSign. See Reading amounts.-
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
DorC. Redundant with the sign ofsignedLocalAmount(Dis negative there) and withdebit/credit.One of
DC -
transactionAmountinteger · int64Unsigned magnitude. The direction lives in the sign of
signedTransactionAmount, not here. -
transactionAmountInMajorsnumbertransactionAmountas a decimal, unsigned. For display, not arithmetic. -
signedTransactionAmountinteger · int64Credit-positive: a credit is positive, a debit is negative, in minor units. This is the opposite polarity to the balances
GET /v1/general-ledger-summaryreturns, which are debit-positive — reconciling one against the other means flipping the sign on one side. There is noInMajorscounterpart to this field; the unsigned*InMajorsvalue beside it carries the magnitude only. -
transactionCurrencystringThe document's currency.
nullon lines with no transaction amount: rounding, revaluation and translation-adjustment lines. -
localAmountinteger · int64Unsigned magnitude. The direction lives in the sign of
signedLocalAmount, not here. -
localAmountInMajorsnumberlocalAmountas a decimal, unsigned. -
signedLocalAmountinteger · int64Credit-positive: a credit is positive, a debit is negative, in minor units. This is the opposite polarity to the balances
GET /v1/general-ledger-summaryreturns, which are debit-positive — reconciling one against the other means flipping the sign on one side. There is noInMajorscounterpart to this field; the unsigned*InMajorsvalue beside it carries the magnitude only. -
localCurrencystringThe entity's local currency.
-
groupAmountinteger · int64Unsigned magnitude. The direction lives in the sign of
signedGroupAmount, not here. -
groupAmountInMajorsnumbergroupAmountas a decimal, unsigned. -
signedGroupAmountinteger · int64Credit-positive: a credit is positive, a debit is negative, in minor units. This is the opposite polarity to the balances
GET /v1/general-ledger-summaryreturns, which are debit-positive — reconciling one against the other means flipping the sign on one side. There is noInMajorscounterpart to this field; the unsigned*InMajorsvalue beside it carries the magnitude only. -
groupCurrencystringThe company's group currency, the same on every line.
-
debitbooleantrueon a debit line. Redundant withdcSignand with a negativesignedLocalAmount. -
creditbooleantrueon a credit line. Redundant withdcSignand with a positivesignedLocalAmount.
-
-
taxIdstring · uuidId of the tax code on the line;
nullwithout one. -
taxTagLabelstringLabel of the tax code's base tag, the VAT-return box the line reports into;
nullwithout a tax code. -
taxCodestringThe tax code's code as shown in the product;
nullwithout one. -
businessPartnerNamestringThe vendor or customer on the document, when it has one.
-
businessPartnerIdstring · uuidId of that vendor or customer.
-
costCenterIdstring · uuidCost center on the line;
nullwhen none. -
accruedLedgerTransactionLineIdstring · uuidOn a release line (one instalment of a deferral, accrual or depreciation schedule): the id of the original line it releases. Legacy name;
nullon every other line. -
ledgerTransactionTypestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DEFAULTAMORTIZATIONFXCTABANK_CLEARING -
isAmortizedbooleantrueon a line that carries a release schedule, meaning release lines draw it down over time. Legacy name for "is released". -
accountingReleaseStartDatestring · dateFirst date of the release schedule on this line;
nullwithout one. -
accountingReleaseEndDatestring · dateLast date of the release schedule on this line;
nullwithout one. -
createdAtstring · date-timeWhen the line was written to the ledger. Not the posting date.
-
createdBystring · uuidThe principal that posted the document: a user or an API key.
nullwhen the system posted it. -
customPropertiesarray of objectCustom property values from the document line, returned when
includeCustomPropertiesis true (the default on this endpoint).-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-
-
-
hasMorebooleanBoolean flag indicating if there are more records available
-
totalinteger · int64deprecatedTotal 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.
-
nextCursorstringCursor for fetching the next page (only for cursor pagination)
-
prevCursorstringCursor for fetching the previous page (only for cursor pagination)