Get customer credit
https://api.light.inc/v1/customer-credits/{customerCreditId}
Returns a customer credit by ID
Permission: customer-credits:read (AR_CLERK, AUDITOR, COMPANY_ADMIN, CONTROLLER)
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
Path parameters
-
customerCreditIdstring · uuidrequired
Response
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
companyEntityIdstring · uuidID of the entity
-
amountinteger · int64Total customer credit amount in cents
Note
The header amount available to allocate, independent of the line totals; the link validations compare against it.
-
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
-
currencystringCurrency of the customer credit
-
documentDatestring · dateCustomer-facing issue date override. Null means customer-facing documents use the posting date
-
postingDatestring · dateDate when the customer credit is posted to the ledger
-
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 · int64Note
Unsigned integer in minor units. The direction is in
dcSign; a negative value is rejected. -
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC
-
-
netTransactionAmountobject-
amountinteger · int64Note
Unsigned integer in minor units. The direction is in
dcSign; a negative value is rejected. -
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
-
taxRatenumberCurrent nominal VAT rate of the assigned Light tax code as a fraction: 0.25 is 25%. Tax-code edits change this value, including on issued documents, without changing stored line amounts. This is not tax divided by net: posting rules, rounding and overrides can change that ratio. Excludes withholding. Null for an exempt tax code or when no Light tax code is assigned
-
taxCodestringCurrent short code of the assigned Light tax code. Null when no Light tax code is assigned
-
taxNamestringCurrent display name of the assigned Light tax code. Null when the name or tax code is absent
-
withholdingsarray of objectWithholdings recorded on this line. Later tax-code configuration edits do not change these snapshots. Empty when the line has none. These do not reduce the VAT or gross amounts
-
ratenumberRecorded withholding rate as a fraction: 0.20 is 20%
-
taxableBasePctnumberPercentage of the line net amount subject to withholding: 100 means the full net amount
-
amountobject-
amountinteger · int64Note
Unsigned integer in minor units. The direction is in
dcSign; a negative value is rejected. -
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC
-
-
-
taxTransactionAmountobject-
amountinteger · int64Note
Unsigned integer in minor units. The direction is in
dcSign; a negative value is rejected. -
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
-
paymentReferencestringPayment reference generated when the customer credit is posted
-
linkedInvoiceReceivableobjectInvoice payable details
Note
The linked invoice receivable (the description says payable). Omitted when there are no links or more than one; on the list endpoint also omitted unless
include=INVOICE_RECEIVABLE.-
idstring · uuidUnique identifier for the object
-
documentNumberstringDocument number
-
documentDatestring · dateDate the accounting document was issued
-
postingDatestring · dateDate the accounting document is posted to the ledger
-
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
-
currencystringCurrency of the accounting document
-