v1 - Contracts

Update contract

Updates a contract

patch/v1/contracts/{contractId}

Request

  • Base URL
    https://light.inc (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header Authorization
    • or HTTP bearer

Path parameters

contractIdstring uuid required

Headers

X-Idempotency-Keystring

Request body

areLinesWithTaxboolean nullable

Whether invoice line amounts include tax or tax is added on top. Defaults to true

startDatestring date nullable

Contract start date

endDatestring date nullable

Contract end date

companyEntityIdstring uuid nullable

ID of the company entity

invoiceTemplateIdstring uuid nullable

ID of the invoice template to use for generating invoices

currencystring nullable
estimatedAmountinteger nullable

Estimated total amount for the contract in cents

paymentType'AIRWALLEX' | 'BANK_TRANSFER' | 'DIRECT_DEBIT' | 'STRIPE' nullable

Payment type for invoices generated from this contract

  • AIRWALLEX - Payment via Airwallex. A payment link will be displayed on the invoice
  • BANK_TRANSFER - Payment via bank transfer. Bank information will be displayed on the invoice
  • DIRECT_DEBIT - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice
  • STRIPE - Payment via Stripe. A payment link will be sent to the customer

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

payeeBankAccountIdstring uuid nullable

ID of the bank account where payments should be sent

netTermsinteger nullable

Number of days from invoice date to when payment is due. Defaults to 30

invoiceLeadDaysinteger nullable

Number of days before the billing period start to date the invoice. Defaults to 0

billingStartstring date nullable

Date when billing should start for this contract

descriptionstring nullable

Description of the contract

customerIdstring uuid nullable

ID of the customer

renewalDatestring date nullable

Date when the contract should be renewed

Example request

{
  "currency": "USD"
}

Response

default response

idstring uuid

Unique identifier for the object

companyIdstring uuid

ID of the company

startDatestring date nullable

Contract start date

endDatestring date nullable

Contract end date

activatedAtstring date-time nullable

Timestamp when the contract was activated/published

terminatedAtstring date-time nullable

Timestamp when the contract was terminated

terminationReasonstring nullable

Reason for contract termination

terminationReasonType'FINISHED' | 'OTHER' | 'RENEWED' nullable

Categorized reason for contract termination

  • FINISHED - Contract ran to its natural end
  • OTHER - Terminated for another reason, described in terminationReason
  • RENEWED - Contract ended because it was renewed into a new contract

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

renewalDatestring date nullable

Date when the contract should be renewed

companyEntityIdstring uuid nullable

ID of the entity

invoiceTemplateIdstring uuid nullable

ID of the invoice template to use for generating invoices

currencystring
estimatedAmountinteger nullable

Estimated total amount for the contract in cents

paymentType'AIRWALLEX' | 'BANK_TRANSFER' | 'DIRECT_DEBIT' | 'STRIPE' nullable

Payment type for invoices generated from this contract

  • AIRWALLEX - Payment via Airwallex. A payment link will be displayed on the invoice
  • BANK_TRANSFER - Payment via bank transfer. Bank information will be displayed on the invoice
  • DIRECT_DEBIT - Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoice
  • STRIPE - Payment via Stripe. A payment link will be sent to the customer

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

payeeBankAccountIdstring uuid nullable

ID of the bank account where payments should be sent

billingStartstring date nullable

Date when billing should start for this contract

netTermsinteger nullable

Number of days from invoice date to when payment is due

invoiceLeadDaysinteger nullable

Number of days before billing period start to date the invoice

descriptionstring nullable

Description of the contract

customerIdstring uuid nullable

ID of the customer

state'CREATED' | 'DRAFT' | 'ACTIVE' | 'PENDING_TERMINATION' | 'TERMINATED'

Current state of the contract

  • CREATED - Contract has been created
  • DRAFT - Contract is in draft state and can be edited
  • ACTIVE - Contract is active and generating invoices
  • PENDING_TERMINATION - Contract has a scheduled termination
  • TERMINATED - Contract has been terminated

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

areLinesWithTaxboolean

Whether invoice line amounts include tax or tax is added on top

taxEngineName'AVATAX' | 'LIGHT' | 'SPHERE'

Name of the tax engine to be used

  • AVATAX - Avalara AvaTax will be used for tax calculations
  • LIGHT - Light built-in tax engine will be used for tax calculations
  • SPHERE - Sphere tax engine will be used for tax calculations

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

externalIdstring nullable

External identifier from an external system

externalSource'HUBSPOT' | 'SALESFORCE' nullable

Source system if contract was synced from an external system

  • HUBSPOT - Contract synced from HubSpot
  • SALESFORCE - Contract synced from Salesforce

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

createdAtstring date-time

Timestamp when the contract was created

updatedAtstring date-time

Timestamp when the contract was last updated

Example response

{
  "currency": "USD"
}

Changes

No recorded changes to this operation across all 1 revision of this API.