List contracts
GET
https://api.light.inc/v1/contracts
Returns a paginated list of contracts
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
Query parameters
-
sortstringSort string in the format
field:direction. To provide multiple sort fields, separate them with commas.Available directions:
asc,desc.Available fields:
activatedAt,companyEntityId,companyEntityName,createdAt,customerId,customerName,description,endDate,estimatedAmount,renewalDate,startDate,state,terminatedAt. -
filterstringFilter string in the format
field:operator:value. To provide multiple filters, separate them with commas.Available operators:
eq,ne,in,not_in,gt,gte,lt,lte.- For
inandnot_inoperators, provide multiple values separated by the pipe character (|).
- For
-
limitinteger · int32Maximum number of items to return. Default is 50, maximum is 200.
-
offsetinteger · int64deprecatedNumber of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.
-
cursorstringThe cursor position to start returning results from. To opt-in into cursor-based pagination, provide
0for the initial request. For subsequent requests, usenextCursorandprevCursorfrom the previous response to navigate. Cursor values are opaque and should not be constructed manually.
Response
-
recordsarray of objectList of records for the current page
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
startDatestring · dateContract start date
-
endDatestring · dateContract end date
-
activatedAtstring · date-timeTimestamp when the contract was activated/published
-
terminatedAtstring · date-timeTimestamp when the contract was terminated
-
terminationReasonstringReason for contract termination
-
terminationReasonTypestringCategorized reason for contract termination
FINISHED- Contract ran to its natural endOTHER- Terminated for another reason, described in terminationReasonRENEWED- Contract ended because it was renewed into a new contract
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
FINISHEDOTHERRENEWED -
renewalDatestring · dateDate when the contract should be renewed
-
companyEntityIdstring · uuidID of the entity
-
invoiceTemplateIdstring · uuidID of the invoice template to use for generating invoices
-
currencystring -
estimatedAmountinteger · int64Estimated total amount for the contract in cents
-
paymentTypestringPayment type for invoices generated from this contract
AIRWALLEX- Payment via Airwallex. A payment link will be displayed on the invoiceBANK_TRANSFER- Payment via bank transfer. Bank information will be displayed on the invoiceDIRECT_DEBIT- Payment via direct debit. A notice that the amount will be collected automatically will be displayed on the invoiceSTRIPE- 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.
One of
AIRWALLEXBANK_TRANSFERDIRECT_DEBITSTRIPE -
payeeBankAccountIdstring · uuidID of the bank account where payments should be sent
-
billingStartstring · dateDate when billing should start for this contract
-
netTermsinteger · int32Number of days from invoice date to when payment is due
-
invoiceLeadDaysinteger · int32Number of days before billing period start to date the invoice
-
descriptionstringDescription of the contract
-
customerIdstring · uuidID of the customer
-
statestringCurrent state of the contract
CREATED- Contract has been createdDRAFT- Contract is in draft state and can be editedACTIVE- Contract is active and generating invoicesPENDING_TERMINATION- Contract has a scheduled terminationTERMINATED- Contract has been terminated
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
CREATEDDRAFTACTIVEPENDING_TERMINATIONTERMINATED -
areLinesWithTaxbooleanWhether invoice line amounts include tax or tax is added on top
-
linesarray of objectList of contract line items. Only returned when fetching a single contract by ID
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
contractIdstring · uuidID of the contract this line belongs to
-
productIdstring · uuidID of the product
-
billingStartstring · dateDate when billing starts for this line
-
billingEndstring · dateDate when billing ends for this line
-
billingRecurrencestringBilling frequency for this line
ONE_TIME- The product is billed onceMONTHLY- The product is billed every monthQUARTERLY- The product is billed every three monthsHALF_YEARLY- The product is billed every six monthsYEARLY- The product is billed every year
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ONE_TIMEMONTHLYQUARTERLYHALF_YEARLYYEARLY -
accountIdstring · uuidID of the account for bookkeeping
-
taxCodeIdstring · uuidID of the tax code
-
avataxCodestringAvalara tax code
-
discountobjectDiscount to apply to this line (can be percentage or amount-based)
-
startDatestring · date -
endDatestring · date -
typestring⚠️ This enum is not exhaustive; new values may be added in the future.
One of
PERCENTAGEAMOUNT
-
-
quantitynumberQuantity of the product
-
priceOverwriteinteger · int64Custom price override in cents
-
productNameOverwritestringCustom product name override
-
amortizationTemplateIdstring · uuidID of the amortization template
-
amortizationStartDatestring · dateStart date for amortization
-
amortizationEndDatestring · dateEnd date for amortization
-
aiValueSuggestionsarray of objectAI-generated suggestions for this line
-
fieldstring -
fieldValuesarray of string -
reasoningstring
-
-
customPropertiesarray of objectList of custom properties associated with the line
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-
-
createdAtstring · date-timeTimestamp when the line was created
-
updatedAtstring · date-timeTimestamp when the line was last updated
-
-
taxEngineNamestringName of the tax engine to be used
AVATAX- Avalara AvaTax will be used for tax calculationsLIGHT- Light built-in tax engine will be used for tax calculationsSPHERE- Sphere tax engine will be used for tax calculations
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
AVATAXLIGHTSPHERE -
externalIdstringExternal identifier from an external system
-
externalSourcestringSource system if contract was synced from an external system
HUBSPOT- Contract synced from HubSpotSALESFORCE- Contract synced from Salesforce
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
HUBSPOTSALESFORCE -
customPropertiesarray of objectList of custom properties associated with the contract
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-
-
createdAtstring · date-timeTimestamp when the contract was created
-
updatedAtstring · date-timeTimestamp when the contract was last updated
-
-
hasMorebooleanBoolean flag indicating if there are more records available
-
totalinteger · int64deprecatedTotal number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.
-
nextCursorstringCursor for fetching the next page (only for cursor pagination)
-
prevCursorstringCursor for fetching the previous page (only for cursor pagination)