Skip to main content
PATCH
/
v1
/
contracts
/
{contractId}
/
lines
/
{lineId}
Update contract line
curl --request PATCH \
  --url https://api.light.inc/v1/contracts/{contractId}/lines/{lineId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "billingStart": "2023-12-25",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "<string>"
      ]
    }
  ],
  "billingRecurrence": "ONE_TIME",
  "billingEnd": "2023-12-25",
  "discount": {
    "startDate": "2023-12-25",
    "endDate": "2023-12-25",
    "type": "PERCENTAGE"
  },
  "priceOverwrite": 123,
  "productNameOverwrite": "<string>",
  "quantity": 123,
  "amortizationTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amortizationStartDate": "2023-12-25",
  "amortizationEndDate": "2023-12-25"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "billingStart": "2023-12-25",
  "billingEnd": "2023-12-25",
  "billingRecurrence": "ONE_TIME",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "avataxCode": "<string>",
  "discount": {
    "startDate": "2023-12-25",
    "endDate": "2023-12-25",
    "type": "PERCENTAGE"
  },
  "quantity": 123,
  "priceOverwrite": 123,
  "productNameOverwrite": "<string>",
  "amortizationTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amortizationStartDate": "2023-12-25",
  "amortizationEndDate": "2023-12-25",
  "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

contractId
string<uuid>
required
lineId
string<uuid>
required

Body

application/json;charset=UTF-8
productId
string<uuid> | null

ID of the product

billingStart
string<date> | null

Date when billing starts for this line

accountId
string<uuid> | null

ID of the ledger account for this line

taxCodeId
string<uuid> | null

ID of the tax code to apply to this line

customProperties
(object | null)[] | null

List of custom properties to set on the contract or line

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

billingRecurrence
enum<string> | null

Billing frequency for this line

  • ONE_TIME - The product is billed once
  • MONTHLY - The product is billed every month
  • QUARTERLY - The product is billed every three months
  • HALF_YEARLY - The product is billed every six months
  • YEARLY - The product is billed every year

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

Available options:
ONE_TIME,
MONTHLY,
QUARTERLY,
HALF_YEARLY,
YEARLY
billingEnd
string<date> | null

Date when billing ends for this line

discount
object

Discount to apply to this line (can be percentage or amount-based)

priceOverwrite
integer<int64> | null

Custom price override in cents

productNameOverwrite
string | null

Custom product name override

quantity
number | null

Quantity of the product

amortizationTemplateId
string<uuid> | null

ID of the amortization template

amortizationStartDate
string<date> | null

Start date for amortization

amortizationEndDate
string<date> | null

End date for amortization

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>

Unique identifier for the object

companyId
string<uuid>

ID of the company

contractId
string<uuid>

ID of the contract this line belongs to

productId
string<uuid>

ID of the product

billingStart
string<date> | null

Date when billing starts for this line

billingEnd
string<date> | null

Date when billing ends for this line

billingRecurrence
enum<string>

Billing frequency for this line

  • ONE_TIME - The product is billed once
  • MONTHLY - The product is billed every month
  • QUARTERLY - The product is billed every three months
  • HALF_YEARLY - The product is billed every six months
  • YEARLY - The product is billed every year

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

Available options:
ONE_TIME,
MONTHLY,
QUARTERLY,
HALF_YEARLY,
YEARLY
accountId
string<uuid> | null

ID of the account for bookkeeping

taxCodeId
string<uuid> | null

ID of the tax code

avataxCode
string | null

Avalara tax code

discount
object

Discount to apply to this line (can be percentage or amount-based)

quantity
number | null

Quantity of the product

priceOverwrite
integer<int64> | null

Custom price override in cents

productNameOverwrite
string | null

Custom product name override

amortizationTemplateId
string<uuid> | null

ID of the amortization template

amortizationStartDate
string<date> | null

Start date for amortization

amortizationEndDate
string<date> | null

End date for amortization

aiValueSuggestions
(object | null)[] | null

AI-generated suggestions for this line

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

customProperties
(object | null)[] | null

List of custom properties associated with the line

Custom properties set on the vendor.

createdAt
string<date-time>

Timestamp when the line was created

updatedAt
string<date-time>

Timestamp when the line was last updated