Skip to content

List lists

client.list.list(ListListParams { limit, offset } query?, RequestOptionsoptions?): ListListResponse { data, object, totalCount }
GET/v1/lists

Returns a paginated list of lists. Results are sorted by when the record was created in Lightfield (createdAt), newest first. Use offset and limit to paginate through results. See List endpoints for more information about pagination.

Required scope: lists:read

Rate limit category: Search

ParametersExpand Collapse
query: ListListParams { limit, offset }
limit?: number

Maximum number of records to return. Defaults to 25, maximum 25.

minimum1
maximum25
offset?: number

Number of records to skip for pagination. Defaults to 0.

minimum0
maximum9007199254740991
ReturnsExpand Collapse
ListListResponse { data, object, totalCount }
data: Array<Data>

Array of list objects for the current page.

id: string

Unique identifier for the list.

createdAt: string

ISO 8601 timestamp of when the list was created.

fields: Record<string, Fields>

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $objectType).

value: string | number | boolean | 3 more | null

The field value, or null if unset.

One of the following:
string
number
boolean
Array<string>
Address { city, country, latitude, 5 more }
city?: string | null

City name.

country?: string | null

2-letter ISO 3166-1 alpha-2 country code.

latitude?: number | null

Latitude coordinate.

longitude?: number | null

Longitude coordinate.

postalCode?: string | null

Postal or ZIP code.

state?: string | null

State or province.

street?: string | null

Street address line 1.

street2?: string | null

Street address line 2.

FullName { firstName, lastName }
firstName?: string | null

The contact’s first name.

lastName?: string | null

The contact’s last name.

valueType: "ADDRESS" | "CHECKBOX" | "CURRENCY" | 12 more

The data type of the field.

One of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
"HTML"
object: string

The object type, always "list".

totalCount: number

Total number of lists matching the query.

minimum0
maximum9007199254740991

List lists

import Lightfield from 'lightfield';

const client = new Lightfield({
  apiKey: 'My API Key',
});

const listListResponse = await client.list.list();

console.log(listListResponse.data);
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "foo": {
          "value": "string",
          "valueType": "ADDRESS"
        }
      },
      "httpLink": "httpLink"
    }
  ],
  "object": "object",
  "totalCount": 0
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "foo": {
          "value": "string",
          "valueType": "ADDRESS"
        }
      },
      "httpLink": "httpLink"
    }
  ],
  "object": "object",
  "totalCount": 0
}