Skip to main content
GET
/
v1
/
contracts
List contracts
curl --request GET \
  --url https://api.light.inc/v1/contracts \
  --header 'Authorization: <api-key>'
{
  "total": 123,
  "records": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "startDate": "2023-12-25",
      "endDate": "2023-12-25",
      "activatedAt": "2023-11-07T05:31:56Z",
      "terminatedAt": "2023-11-07T05:31:56Z",
      "terminationReason": "<string>",
      "renewalDate": "2023-12-25",
      "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "invoiceTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "currency": "USD",
      "estimatedAmount": 123,
      "paymentType": "BANK_TRANSFER",
      "payeeBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "billingStart": "2023-12-25",
      "netTerms": 123,
      "description": "<string>",
      "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "state": "CREATED",
      "areLinesWithTax": true,
      "lines": [
        {
          "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"
        }
      ],
      "taxEngineName": "AVATAX",
      "externalId": "<string>",
      "externalSource": "HUBSPOT",
      "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.

Query Parameters

sort
string

Sort string in the format field:direction. To provide multiple sort fields, separate them with commas.

Available directions: asc, desc.

Available fields: description, createdAt, startDate, endDate, activatedAt, state, terminatedAt.

Example:

"amount:desc,createdAt:asc"

filter
string

Filter 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 in and not_in operators, provide multiple values separated by the pipe character (|).

Available fields: id, customerId, state, updatedAt.

Example:

"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"

limit
integer<int32>

Maximum number of items to return. Default is 50, maximum is 200.

Required range: x <= 200
offset
integer<int64>

Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.

cursor
string

The cursor position to start returning results from. To opt-in into cursor-based pagination, provide 0 for the initial request. For subsequent requests, use nextCursor and prevCursor from the previous response to navigate.

Response

default - application/json;charset=UTF-8

default response

total
integer<int64>
records
object[]