Update invoice payable line item
https://api.light.inc/v1/invoice-payables/{invoicePayableId}/line-items/{lineItemId}
Updates an invoice payable line item
Permission: bills:update (AP_CLERK, AP_PREPARATION, 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
-
invoicePayableIdstring · uuidrequired -
lineItemIdstring · 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.
-
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
-
-
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.
Note
Catalog 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.
Note
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. -
attachmentIdsarray of string · uuidIDs of attachments to assign to an ATTACHMENT property on an existing vendor. Send valueIds as an empty list. Only one active attachment belonging to the vendor can be assigned per group. Clear the current file before assigning another. Create the vendor first, request POST /v1/attachments/upload-url with its resourceId, upload the file to the returned URL, then POST /v1/attachments with documentKey set to the returned key. Use the created attachment's id here in PUT or PATCH /v1/vendors/{vendorId}. A PATCH that sends only customProperties and changes only their files works in every vendor status. customProperties replaces the whole set, so send the vendor's other properties as they are, by valueIds. A PUT, or a PATCH that changes anything else, returns 400 while the vendor is IN_REVIEW, ONBOARDING or INACTIVE. An empty list clears the assignment without archiving the file.
-
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
-
attachmentobjectFile assigned to an ATTACHMENT property. Null for other property types.
-
idstring · uuidAttachment ID. Use GET /v1/attachments/{attachmentId}/document to download the file.
-
fileNamestring -
contentTypestring
-
-
-
-
createdAtstring · date-timeTimestamp when this invoice payable line item was created.
-
updatedAtstring · date-timeTimestamp when this invoice payable line item was last updated.