API / Reference / Credit Notes
List credit notes
GET
https://api.light.inc/v1/credit-notes
Returns a paginated list of credit notes
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:
amount,businessPartnerName,status,documentDate. -
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:
businessPartnerId,status,companyEntityId,documentDate,toBeAdjustedAccDocType,updatedAt. - 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.
Response
-
recordsarray of objectList of records for the current page
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
companyEntityIdstring · uuidID of the entity
-
amountinteger · int64Total credit note amount in cents
-
businessPartnerNamestringName of the vendor
-
businessPartnerIdstring · uuidID of the vendor
-
statusstringStatus of the credit note
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DRAFTAPPROVAL_PENDINGAPPROVEDPOSTEDPARTIALLY_CLEAREDCLEAREDARCHIVED -
descriptionstringDescription of the credit note
-
currencystring -
postingDatestring · dateDate when the credit note should be posted to the ledger
-
documentDatestring · dateDate when the credit note was issued
-
valuationDatestring · dateDate used when applying foreign exchange rate
-
areLinesWithTaxbooleanWhether the credit note line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount
-
linesarray of objectList of credit note line items
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
creditNoteIdstring · uuidID of the credit note this line belongs to
-
grossTransactionAmountobject-
amountinteger · int64 -
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC
-
-
netTransactionAmountobject-
amountinteger · int64 -
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC
-
-
descriptionstringDescription of the credit note line item
-
ledgerTaxIdstring · uuidID of the tax code
-
taxTransactionAmountobject-
amountinteger · int64 -
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC
-
-
ledgerAccountIdstring · uuidID of the ledger account
-
costCenterIdstring · uuidID of the cost center
-
createdAtstring · date-timeTimestamp when the credit note line item was created
-
updatedAtstring · date-timeTimestamp when the credit note line item was last updated
-
accrualTemplateIdstring · uuidID of the accrual template
-
accrualStartDatestring · dateStart date for accrual
-
accrualEndDatestring · dateEnd date for accrual
-
accrualDefaultDurationinteger · int32Default duration for accrual in months
-
-
createdAtstring · date-timeTimestamp when the credit note was created
-
updatedAtstring · date-timeTimestamp when the credit note was last updated
-
updatedBystring · uuidID of the user who last updated the credit note
-
localCurrencyFxRatenumberFX rate applied for the ledger's local currency
-
groupCurrencyFxRatenumberFX rate applied for the ledger's group currency
-
senderEmailstringThe email of the user who sent the document that this credit note was created from
-
documentNamestringThe name of the document that this credit note was created from
-
-
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)