Skip to main content
POST
/
v1
/
invoice-payables
/
{invoicePayableId}
/
line-items
Create invoice payable line item
curl --request POST \
  --url https://api.light.inc/v1/invoice-payables/{invoicePayableId}/line-items \
  --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",
  "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",
  "amortizationStartDate": "2023-12-25",
  "amortizationEndDate": "2023-12-25",
  "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

Body

application/json;charset=UTF-8
amount
integer<int64> | 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<int64> | 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<int64> | 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.

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)[] | null

Custom properties to set on this invoice payable line item.

List of custom properties to set on the vendor. Replaces the existing set.

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

Metadata for the invoice payable line item (ERP-specific fields and context).

amount
integer<int64> | null

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

netAmount
integer<int64> | 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<int64> | 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.

amortizationStartDate
string<date> | null

Start date for amortization of this line item.

amortizationEndDate
string<date> | null

End date for amortization of this line item.

amortizationTemplateId
string<uuid> | null

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

customPropertiesOld
object

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

aiValueSuggestions
(object | null)[] | null

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

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

customProperties
(object | null)[] | null

Custom properties set on this invoice payable line item.

Custom properties set on the vendor.

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.