API / Reference / Customer Credits
Create customer credit line
POST
https://api.light.inc/v1/customer-credits/{customerCreditId}/lines
Creates a new line for the given customer credit
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
Request body
application/json;charset=UTF-8
-
productIdstring · uuidID of the product
-
quantitynumberQuantity of the product
-
netTransactionAmountobject-
amountinteger · int64 -
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC
-
-
grossTransactionAmountobject-
amountinteger · int64 -
dcSignstring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DC
-
-
taxTransactionAmountobject-
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
-
ledgerAccountIdstring · uuidID of the ledger account
-
avataxCodestringAvalara tax code. Used when the customer credit tax engine is AVATAX
-
customPropertiesarray of objectList of custom properties associated with the line
-
groupIdstring · uuid -
valueIdsarray of string · uuid -
inlineValuesarray of string
-
-
accrualTemplateIdstring · uuidID of the accrual template
-
accrualStartDatestring · dateStart date for accrual
-
accrualEndDatestring · dateEnd date for accrual
Response
-
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