Light APIv1.0.0

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

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

  • invoicePayableId string · uuidrequired

Request body

application/json;charset=UTF-8

  • amount integer · int64

    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

    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

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

  • description string

    Description for this invoice payable line item.

  • taxCodeId string · uuid

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

  • accountId string · uuid

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

  • amortizationStartDate string · date

    Start date for amortization of this invoice payable line item.

  • amortizationEndDate string · date

    End date for amortization of this invoice payable line item.

  • amortizationTemplateId string · uuid

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

  • customProperties array of object

    Custom properties to set on this invoice payable line item.

    • groupId string · uuid

      ID of the custom property group.

    • valueIds array of string · uuid

      IDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.

    • inlineValues array of string

      Inline 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.

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 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.

    One of REIMBURSEMENT SELF_BILLED VENDOR_INVOICE

  • metadata object

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

    • type 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.

      One of REIMBURSEMENT SELF_BILLED VENDOR_INVOICE

  • amount integer · int64

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

  • netAmount integer · int64

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

  • description string

    Description of this invoice payable line item.

  • taxCodeId string · uuid

    ID of the tax code applied to this line item.

  • taxAmount integer · int64

    Tax amount in cents for this line item.

  • accountId string · uuid

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

  • costCenterId string · uuid

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

  • amortizationStartDate string · date

    Start date for amortization of this line item.

  • amortizationEndDate string · date

    End date for amortization of this line item.

  • amortizationTemplateId string · uuid

    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).

    • items object

  • aiValueSuggestions array of object

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

    • field string

    • fieldValues array of string

    • reasoning string

  • customProperties array of object

    Custom properties set on this invoice payable line item.

    • groupId string · uuid

      ID of the custom property group

    • groupInternalName string

      Internal name of the custom property group

    • values array of object

      List of values. Note that this will be a single value unless the group input type supports multiple values

      • id string · uuid

        Unique identifier for the object

      • groupId string · uuid

        ID of the custom property group

      • groupInternalName string

        Internal name of the custom property group

      • companyId string · uuid

        ID of the company

      • internalName string

        Internal name of the custom property value

      • label string

        Label of the custom property value

      • context string

        Context/description of the custom property value

      • createdAt string · date-time

        Timestamp when the custom property value was created

      • updatedAt string · date-time

        Timestamp when the custom property value was last updated

  • 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.