Skip to content

Retrieve a list

client.List.Get(ctx, id) (*ListRetrieveResponse, error)
GET/v1/lists/{id}

Retrieves a single list by its ID.

Required scope: lists:read

Rate limit category: Read

ParametersExpand Collapse
id string

Unique identifier of the list to retrieve.

ReturnsExpand Collapse
type ListRetrieveResponse struct{…}
ID string

Unique identifier for the list.

CreatedAt string

ISO 8601 timestamp of when the list was created.

Fields map[string, ListRetrieveResponseField]

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

Value ListRetrieveResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type ListRetrieveResponseFieldValueArray []string
type ListRetrieveResponseFieldValueAddress struct{…}
City stringOptional

City name.

Country stringOptional

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

Latitude float64Optional

Latitude coordinate.

Longitude float64Optional

Longitude coordinate.

PostalCode stringOptional

Postal or ZIP code.

State stringOptional

State or province.

Street stringOptional

Street address line 1.

Street2 stringOptional

Street address line 2.

type ListRetrieveResponseFieldValueFullName struct{…}
FirstName stringOptional

The contact’s first name.

LastName stringOptional

The contact’s last name.

ValueType string

The data type of the field.

One of the following:
const ListRetrieveResponseFieldValueTypeAddress ListRetrieveResponseFieldValueType = "ADDRESS"
const ListRetrieveResponseFieldValueTypeCheckbox ListRetrieveResponseFieldValueType = "CHECKBOX"
const ListRetrieveResponseFieldValueTypeCurrency ListRetrieveResponseFieldValueType = "CURRENCY"
const ListRetrieveResponseFieldValueTypeDatetime ListRetrieveResponseFieldValueType = "DATETIME"
const ListRetrieveResponseFieldValueTypeEmail ListRetrieveResponseFieldValueType = "EMAIL"
const ListRetrieveResponseFieldValueTypeFullName ListRetrieveResponseFieldValueType = "FULL_NAME"
const ListRetrieveResponseFieldValueTypeMarkdown ListRetrieveResponseFieldValueType = "MARKDOWN"
const ListRetrieveResponseFieldValueTypeMultiSelect ListRetrieveResponseFieldValueType = "MULTI_SELECT"
const ListRetrieveResponseFieldValueTypeNumber ListRetrieveResponseFieldValueType = "NUMBER"
const ListRetrieveResponseFieldValueTypeSingleSelect ListRetrieveResponseFieldValueType = "SINGLE_SELECT"
const ListRetrieveResponseFieldValueTypeSocialHandle ListRetrieveResponseFieldValueType = "SOCIAL_HANDLE"
const ListRetrieveResponseFieldValueTypeTelephone ListRetrieveResponseFieldValueType = "TELEPHONE"
const ListRetrieveResponseFieldValueTypeText ListRetrieveResponseFieldValueType = "TEXT"
const ListRetrieveResponseFieldValueTypeURL ListRetrieveResponseFieldValueType = "URL"

Retrieve a list

package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  listRetrieveResponse, err := client.List.Get(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", listRetrieveResponse.ID)
}
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink"
}
Returns Examples
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink"
}