API / Reference / Invoice Payables
Create invoice payable line item
POST
https://api.light.inc/v1/invoice-payables/{invoicePayableId}/line-items
Creates an invoice payable line item
Only while the bill is IN_DRAFT (INVALID_LINE_ITEM_INVOICE_PAYABLE_STATE). Send amount or netAmount according to the bill's lineItemsIncludeTax, never both (INVALID_LINE_ITEM_AMOUNT_TYPE). accountId may not be a payables or receivables control account (DISALLOWED_LINE_ITEM_ACCOUNT_TYPE). When the bill has an entity, taxAmount is recomputed from the tax code. costCenterId cannot be set through the API.
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
-
invoicePayableIdstring · uuidrequired
Request body
application/json;charset=UTF-8
-
amountinteger · int64Gross line amount in cents, including tax. Set this when the parent invoice header field
lineItemsIncludeTaxis true. WhenlineItemsIncludeTaxis false, prefer usingnetAmountinstead and avoid sending both. -
netAmountinteger · int64Net line amount in cents, excluding tax. Set this when the parent invoice header field
lineItemsIncludeTaxis false. WhenlineItemsIncludeTaxis true, prefer usingamountinstead and avoid sending both. -
taxAmountinteger · int64Tax amount for this line in cents. If omitted, tax may be derived from the configured tax code and base amount.
-
descriptionstringDescription for this invoice payable line item.
-
taxCodeIdstring · uuidID of the tax code to apply to this invoice payable line item.
-
accountIdstring · uuidID of the ledger account to book this invoice payable line item against.
-
amortizationStartDatestring · dateStart date for amortization of this invoice payable line item.
-
amortizationEndDatestring · dateEnd date for amortization of this invoice payable line item.
-
amortizationTemplateIdstring · uuidID of the amortization template to apply to this line item using Light Ledger.
-
customPropertiesarray of objectCustom properties to set on this invoice payable line item.
-
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.
Catalogue value ids for this group. Required; send
[](with an emptyinlineValues) to clear the group.SINGLE_SELECTandMULTI_SELECTgroups accept nothing else. See Custom properties on writes. -
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.
Literal values for
TEXT,NUMERIC,BOOLEANandDATEgroups, as strings (yyyy-MM-ddfor dates). Rejected on select groups withCUSTOM_PROPERTY_VALUE_TYPE_MISMATCH. See Custom properties on writes.
-
Response
-
idstring · uuidID of the invoice payable line item.
-
invoicePayableIdstring · uuidID of the invoice payable this line item belongs to.
-
typestringType of the invoice payable line item (vendor invoice or reimbursement).
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
REIMBURSEMENTSELF_BILLEDVENDOR_INVOICE -
metadataobjectMetadata for the invoice payable line item (ERP-specific fields and context).
-
typestringType of the invoice payable line item (vendor invoice or reimbursement).
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
REIMBURSEMENTSELF_BILLEDVENDOR_INVOICE
-
-
amountinteger · int64Amount in cents, including tax. When
lineItemsIncludeTaxis true,amountrepresents the full tax-inclusive amount for this line. -
netAmountinteger · int64Net line amount in cents, excluding tax. When
lineItemsIncludeTaxis false,netAmountrepresents the base amount on which tax is calculated. -
descriptionstringDescription of this invoice payable line item.
-
taxCodeIdstring · uuidID of the tax code applied to this line item.
-
taxAmountinteger · int64Tax amount in cents for this line item.
-
accountIdstring · uuidID of the ledger account used to book this line item.
-
costCenterIdstring · uuidID of the cost center associated with this line item, if applicable.
-
amortizationStartDatestring · dateStart date for amortization of this line item.
-
amortizationEndDatestring · dateEnd date for amortization of this line item.
-
amortizationTemplateIdstring · uuidID of the amortization template to use for this line item within Light Ledger.
-
customPropertiesOldobjectLegacy container for custom properties on this line item (deprecated/old format).
-
itemsobject
-
-
aiValueSuggestionsarray of objectAI-generated suggestions for line item values (e.g. account, cost center, tax code).
-
fieldstring -
fieldValuesarray of string -
reasoningstring
-
-
customPropertiesarray of objectCustom properties set on this invoice payable line item.
-
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 this invoice payable line item was created.
-
updatedAtstring · date-timeTimestamp when this invoice payable line item was last updated.