Get field value history
client.Opportunity.FieldHistory(ctx, fieldKey, params) (*OpportunityFieldHistoryResponse, error)
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: opportunities:read
Rate limit category: Read
Get field value history
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"),
)
opportunityFieldHistoryResponse, err := client.Opportunity.FieldHistory(
context.TODO(),
"fieldKey",
githubcomlightfldlightfieldgo.OpportunityFieldHistoryParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", opportunityFieldHistoryResponse.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"
}