Skip to main content
PUT
/
v1
/
invoice-payables
/
{invoicePayableId}
/
line-items
/
{lineItemId}
Update invoice payable line item
curl --request PUT \
  --url https://api.light.inc/v1/invoice-payables/{invoicePayableId}/line-items/{lineItemId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '{
  "amount": 123,
  "netAmount": 123,
  "taxAmount": 123,
  "description": "<string>",
  "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "metadata": {
    "type": "REIMBURSEMENT"
  },
  "shouldAmortize": false,
  "amortizationStartDate": "2023-12-25",
  "amortizationEndDate": "2023-12-25",
  "amortizationTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "<string>"
      ]
    }
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoicePayableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "REIMBURSEMENT",
  "metadata": {
    "type": "REIMBURSEMENT"
  },
  "amount": 123,
  "netAmount": 123,
  "description": "<string>",
  "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "taxAmount": 123,
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "costCenterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "shouldAmortize": true,
  "amortizationStartDate": "2023-12-25",
  "amortizationEndDate": "2023-12-25",
  "amortizationScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amortizationTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customPropertiesOld": {
    "items": {}
  },
  "aiValueSuggestions": [
    {
      "field": "<string>",
      "fieldValues": [
        "<string>"
      ],
      "reasoning": "<string>"
    }
  ],
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "groupInternalName": "<string>",
      "values": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "<string>",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalName": "<string>",
          "label": "<string>",
          "context": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Path Parameters

invoicePayableId
string<uuid>
required
lineItemId
string<uuid>
required

Body

application/json;charset=UTF-8
amount
integer | null

Gross line amount in cents, including tax. Set this when the parent invoice header field lineItemsIncludeTax is true. When lineItemsIncludeTax is false, prefer using netAmount instead and avoid sending both.

netAmount
integer | null

Net line amount in cents, excluding tax. Set this when the parent invoice header field lineItemsIncludeTax is false. When lineItemsIncludeTax is true, prefer using amount instead and avoid sending both.

taxAmount
integer | null

Tax amount for this line in cents. If omitted, tax may be derived from the configured tax code and base amount.

description
string | null

Description for this invoice payable line item.

taxCodeId
string<uuid> | null

ID of the tax code to apply to this invoice payable line item.

accountId
string<uuid> | null

ID of the ledger account to book this invoice payable line item against.

metadata
object
shouldAmortize
boolean
default:false

Whether this line item should be amortized. When true, amortization dates and/or template should be provided.

amortizationStartDate
string<date> | null

Start date for amortization of this invoice payable line item.

amortizationEndDate
string<date> | null

End date for amortization of this invoice payable line item.

amortizationTemplateId
string<uuid> | null

ID of the amortization template to apply to this line item using Light Ledger.

customProperties
object[] | null

Custom properties to set on this invoice payable line item.

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>

ID of the invoice payable line item.

invoicePayableId
string<uuid>

ID of the invoice payable this line item belongs to.

type
enum<string>

Type of the invoice payable line item (vendor invoice or reimbursement).

⚠️ This enum is not exhaustive; new values may be added in the future.

Available options:
REIMBURSEMENT,
VENDOR_INVOICE
metadata
object
amount
integer | null

Amount in cents, including tax. When lineItemsIncludeTax is true, amount represents the full tax-inclusive amount for this line.

netAmount
integer | null

Net line amount in cents, excluding tax. When lineItemsIncludeTax is false, netAmount represents the base amount on which tax is calculated.

description
string | null

Description of this invoice payable line item.

taxCodeId
string<uuid> | null

ID of the tax code applied to this line item.

taxAmount
integer | null

Tax amount in cents for this line item.

accountId
string<uuid> | null

ID of the ledger account used to book this line item.

costCenterId
string<uuid> | null

ID of the cost center associated with this line item, if applicable.

shouldAmortize
boolean

Whether this line item should be amortized. When true, amortization dates and/or template are relevant.

amortizationStartDate
string<date> | null

Start date for amortization of this line item.

amortizationEndDate
string<date> | null

End date for amortization of this line item.

amortizationScheduleId
string<uuid> | null

ID of the amortization schedule synced from an external ERP system, if any.

amortizationTemplateId
string<uuid> | null

ID of the amortization template to use for this line item within Light Ledger.

customPropertiesOld
object | null

Legacy container for custom properties on this line item (deprecated/old format).

aiValueSuggestions
array | null

AI-generated suggestions for line item values (e.g. account, cost center, tax code).

customProperties
object[] | null

Custom properties set on this invoice payable line item.

createdAt
string<date-time>

Timestamp when this invoice payable line item was created.

updatedAt
string<date-time>

Timestamp when this invoice payable line item was last updated.