Create contract line
POST
https://api.light.inc/v1/contracts/{contractId}/lines
Creates a new contract line item
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
-
contractIdstring · uuidrequired
Headers
-
X-Idempotency-Keystring
Request body
application/json;charset=UTF-8
-
productIdstring · uuidID of the product
-
billingStartstring · dateDate when billing starts for this line
-
billingEndstring · dateDate when billing ends for this line
-
billingRecurrencestringBilling frequency for this line
ONE_TIME- The product is billed onceMONTHLY- The product is billed every monthQUARTERLY- The product is billed every three monthsHALF_YEARLY- The product is billed every six monthsYEARLY- The product is billed every year
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ONE_TIMEMONTHLYQUARTERLYHALF_YEARLYYEARLY -
accountIdstring · uuidID of the ledger account for this line
-
taxCodeIdstring · uuidID of the tax code to apply to this line
-
avataxCodestringAvalara tax code. Used when the contract tax engine is AVATAX
-
discountobjectDiscount to apply to this line (can be percentage or amount-based)
-
startDatestring · date -
endDatestring · date -
typestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
PERCENTAGEAMOUNT
-
-
quantitynumberQuantity of the product
-
priceOverwriteinteger · int64Custom price override in cents
-
productNameOverwritestringCustom product name override
-
customPropertiesarray of objectList of custom properties to set on the contract or line
-
groupIdstring · uuidID of the custom property group.
-
valueIdsarray of string · uuidIDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.
-
inlineValuesarray of stringInline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.
-
-
amortizationTemplateIdstring · uuidID of the amortization template
-
amortizationStartDatestring · dateStart date for amortization
-
amortizationEndDatestring · dateEnd date for amortization
Response
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
contractIdstring · uuidID of the contract this line belongs to
-
productIdstring · uuidID of the product
-
billingStartstring · dateDate when billing starts for this line
-
billingEndstring · dateDate when billing ends for this line
-
billingRecurrencestringBilling frequency for this line
ONE_TIME- The product is billed onceMONTHLY- The product is billed every monthQUARTERLY- The product is billed every three monthsHALF_YEARLY- The product is billed every six monthsYEARLY- The product is billed every year
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ONE_TIMEMONTHLYQUARTERLYHALF_YEARLYYEARLY -
accountIdstring · uuidID of the account for bookkeeping
-
taxCodeIdstring · uuidID of the tax code
-
avataxCodestringAvalara tax code
-
discountobjectDiscount to apply to this line (can be percentage or amount-based)
-
startDatestring · date -
endDatestring · date -
typestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
PERCENTAGEAMOUNT
-
-
quantitynumberQuantity of the product
-
priceOverwriteinteger · int64Custom price override in cents
-
productNameOverwritestringCustom product name override
-
amortizationTemplateIdstring · uuidID of the amortization template
-
amortizationStartDatestring · dateStart date for amortization
-
amortizationEndDatestring · dateEnd date for amortization
-
aiValueSuggestionsarray of objectAI-generated suggestions for this line
-
fieldstring -
fieldValuesarray of string -
reasoningstring
-
-
customPropertiesarray of objectList of custom properties associated with the line
-
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
-
-
-
createdAtstring · date-timeTimestamp when the line was created
-
updatedAtstring · date-timeTimestamp when the line was last updated