## Get field value history `opportunity.field_history(strfield_key, OpportunityFieldHistoryParams**kwargs) -> OpportunityFieldHistoryResponse` **get** `/v1/opportunities/{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](/using-the-api/scopes/):** `opportunities:read` **[Rate limit category](/using-the-api/rate-limits/):** Read ### Parameters - `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. ### Returns - `class OpportunityFieldHistoryResponse: …` - `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. - `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. - `"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. ### Example ```python from lightfield import Lightfield client = Lightfield( api_key="My API Key", ) opportunity_field_history_response = client.opportunity.field_history( field_key="fieldKey", id="id", ) print(opportunity_field_history_response.data) ``` #### Response ```json { "data": [ { "displayValue": "displayValue", "isCreate": true, "recordedAt": "recordedAt", "value": "string", "valueType": "ADDRESS" } ], "hasMore": true, "nextCursor": "nextCursor" } ```