Skip to main content
POST
/
v1
/
invoice-receivables
/
{invoiceReceivableId}
/
lines
Create line
curl --request POST \
  --url https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/lines \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '{
  "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quantity": 123,
  "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "discount": {
    "type": "PERCENTAGE"
  },
  "priceOverwrite": 123,
  "productNameOverwrite": "<string>",
  "avataxCode": "<string>",
  "billingStart": "2023-12-25",
  "billingEnd": "2023-12-25",
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "<string>"
      ]
    }
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceReceivableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quantity": 123,
  "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "discount": {
    "type": "PERCENTAGE"
  },
  "discountAmount": 123,
  "netAmount": 123,
  "taxAmount": 123,
  "avataxCode": "<string>",
  "billingStart": "2023-12-25",
  "billingEnd": "2023-12-25",
  "priceOverwrite": 123,
  "productNameOverwrite": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "accrualTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "accrualStartDate": "2023-12-25",
  "accrualEndDate": "2023-12-25",
  "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"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

invoiceReceivableId
string<uuid>
required

Body

application/json;charset=UTF-8
productId
string<uuid>
quantity
number
taxCodeId
string<uuid>
accountId
string<uuid>
discount
object
priceOverwrite
integer

Price overwrite in cents. If not provided, the product's default price will be used

productNameOverwrite
string

Product name overwrite. If not provided, the product's default name will be used

avataxCode
string
billingStart
string<date>
billingEnd
string<date>
customProperties
object[]

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>

Unique identifier for the object

companyId
string<uuid>

ID of the company

invoiceReceivableId
string<uuid>

ID of the invoice receivable this line belongs to

productId
string<uuid>

ID of the product

quantity
number

Quantity of the product

taxCodeId
string<uuid> | null

ID of the tax code

accountId
string<uuid> | null

ID of the ledger account

discount
object
discountAmount
integer | null

Discount amount in cents

netAmount
integer | null

Net amount in cents after discount but before tax

taxAmount
integer | null

Tax amount in cents

avataxCode
string | null

Avalara tax code. Used when the invoice tax engine is AVATAX

billingStart
string<date> | null

Start of the billing period

billingEnd
string<date> | null

End of the billing period

priceOverwrite
integer | null

Custom product price in cents. This overrides the default product's price

productNameOverwrite
string | null

Custom product name. This overrides the default product's name

createdAt
string<date-time>

Timestamp when the line was created

updatedAt
string<date-time>

Timestamp when the line was last updated

accrualTemplateId
string<uuid> | null

ID of the accrual template

accrualStartDate
string<date> | null

Start date for accrual

accrualEndDate
string<date> | null

End date for accrual

customProperties
object[] | null

List of custom properties associated with the line