API / Reference / Customer Credits
List customer credits
GET
https://api.light.inc/v1/customer-credits
Returns a paginated list of customer credits
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,documentDate,postingDate,status. -
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,companyEntityId,currency,documentDate,einvoiceStatus,id,postingDate,status,updatedAt. - For
-
limitinteger · int32Maximum number of items to return. Default is 50, maximum is 200.
-
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. -
includearrayRelated objects to include on every customer credit. Supported value can be
INVOICE_RECEIVABLE
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 customer credit amount in cents
-
customerNamestringName of the customer
-
customerIdstring · uuidID of the customer
-
statusstringStatus of the customer credit
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DRAFTAPPROVAL_PENDINGAPPROVEDPOSTEDPARTIALLY_CLEAREDCLEAREDARCHIVED -
descriptionstringDescription of the customer credit
-
currencystring -
documentDatestring · dateDate when the customer credit was issued
-
valuationDatestring · dateDate used when applying foreign exchange rate
-
areLinesWithTaxbooleanWhether the customer credit 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 customer credit line items
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
customerCreditIdstring · uuidID of the customer credit 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 customer credit 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
-
avataxCodestringAvalara tax code. Used when the customer credit tax engine is AVATAX
-
productIdstring · uuidID of the product
-
quantitynumberQuantity of the product
-
createdAtstring · date-timeTimestamp when the customer credit was created
-
updatedAtstring · date-timeTimestamp when the customer credit 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 customer credit was created
-
updatedAtstring · date-timeTimestamp when the customer credit was last updated
-
updatedBystring · uuidID of the user who last updated the customer credit
-
linkedInvoiceReceivableobjectInvoice payable details
-
idstring · uuidUnique identifier for the object
-
documentNumberstringDocument number
-
documentDatestring · dateDate the accounting document was issued
-
statusstringStatus of the accounting document
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DRAFTAPPROVAL_PENDINGAPPROVEDPOSTEDPARTIALLY_CLEAREDCLEAREDARCHIVED -
amountinteger · int64The amount of the accounting document in cents
-
currencystring
-
-
-
hasMorebooleanBoolean flag indicating if there are more records available
-
nextCursorstringCursor for fetching the next page
-
prevCursorstringCursor for fetching the previous page