Skip to content

Get field value history for a custom object record

object.field_history(strfield_key, ObjectFieldHistoryParams**kwargs) -> ObjectFieldHistoryResponse
GET/v1/objects/{entitySlug}/values/{id}/fields/{fieldKey}/history

Returns the value-change history for a single field on a record, newest first. Consecutive identical values are collapsed. History is cursor-paginated: pass nextCursor from the previous response as after to page through older values. Only attribute-backed fields (custom attributes and attribute-backed system fields) have history — column-backed system fields return an error.

Required scope: custom_objects:read

Rate limit category: Read

ParametersExpand Collapse
entity_slug: str

The slug of the custom object type.

id: str

Unique identifier of the record.

field_key: str

Field key whose value history to return. System fields use a $ prefix (e.g. $status); custom attributes use their bare slug.

after: Optional[str]

Cursor from a previous response’s nextCursor to fetch the next page.

limit: Optional[int]

Maximum number of history entries to return. Defaults to 20, maximum 100.

minimum1
maximum9007199254740991
ReturnsExpand Collapse
class ObjectFieldHistoryResponse:
data: List[Data]

Recorded values for the field, newest first.

display_value: str

Human-readable rendering of the value (e.g. a select option label), suitable for display.

is_create: bool

True for the record’s original value. Only set when the full history fits in the response (never on a truncated/paginated page).

recorded_at: str

ISO 8601 timestamp of when this value was recorded.

value: Optional[DataValue]

The field value, or null if unset.

One of the following:
str
float
bool
List[str]
class DataValueAddress:
city: Optional[str]

City name.

country: Optional[str]

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

latitude: Optional[float]

Latitude coordinate.

longitude: Optional[float]

Longitude coordinate.

postal_code: Optional[str]

Postal or ZIP code.

state: Optional[str]

State or province.

street: Optional[str]

Street address line 1.

street2: Optional[str]

Street address line 2.

class DataValueFullName:
first_name: Optional[str]

The contact’s first name.

last_name: Optional[str]

The contact’s last name.

value_type: Literal["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"
has_more: bool

Whether more history exists beyond this page.

next_cursor: Optional[str]

Cursor to pass as after to fetch the next page, or null when there are no more entries.

Get field value history for a custom object record

from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_field_history_response = client.object.field_history(
    field_key="fieldKey",
    entity_slug="entitySlug",
    id="id",
)
print(object_field_history_response.data)
{
  "data": [
    {
      "displayValue": "displayValue",
      "isCreate": true,
      "recordedAt": "recordedAt",
      "value": "string",
      "valueType": "ADDRESS"
    }
  ],
  "hasMore": true,
  "nextCursor": "nextCursor"
}
Returns Examples
{
  "data": [
    {
      "displayValue": "displayValue",
      "isCreate": true,
      "recordedAt": "recordedAt",
      "value": "string",
      "valueType": "ADDRESS"
    }
  ],
  "hasMore": true,
  "nextCursor": "nextCursor"
}