# Opportunity ## Get opportunity field definitions `client.Opportunity.Definitions(ctx) (*OpportunityDefinitionsResponse, error)` **get** `/v1/opportunities/definitions` Returns the schema for all field and relationship definitions available on opportunities, including both system-defined and custom fields. Useful for understanding the shape of opportunity data before creating or updating records. See [Fields and relationships](/using-the-api/fields-and-relationships/) for more details. **[Required scope](/using-the-api/scopes/):** `opportunities:read` **[Rate limit category](/using-the-api/rate-limits/):** Read ### Returns - `type OpportunityDefinitionsResponse struct{…}` - `FieldDefinitions map[string, OpportunityDefinitionsResponseFieldDefinition]` Map of field keys to their definitions, including both system and custom fields. - `Description string` Description of the field, or null. - `Label string` Human-readable display name of the field. - `TypeConfiguration OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration` Type-specific configuration (e.g. select options, currency code). - `Currency string` ISO 4217 3-letter currency code. - `HandleService string` Social platform associated with this handle field. - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceTwitter OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "TWITTER"` - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceLinkedin OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "LINKEDIN"` - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceFacebook OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "FACEBOOK"` - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceInstagram OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "INSTAGRAM"` - `MultipleValues bool` Whether this field accepts multiple values. - `Options []OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption` Available options for select fields. - `ID string` Unique identifier of the select option. - `Label string` Human-readable display name of the option. - `Description string` Description of the option, or null. - `Unique bool` Whether values for this field must be unique. - `ValueType string` Data type of the field. - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeAddress OpportunityDefinitionsResponseFieldDefinitionValueType = "ADDRESS"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeCheckbox OpportunityDefinitionsResponseFieldDefinitionValueType = "CHECKBOX"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeCurrency OpportunityDefinitionsResponseFieldDefinitionValueType = "CURRENCY"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeDatetime OpportunityDefinitionsResponseFieldDefinitionValueType = "DATETIME"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeEmail OpportunityDefinitionsResponseFieldDefinitionValueType = "EMAIL"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeFullName OpportunityDefinitionsResponseFieldDefinitionValueType = "FULL_NAME"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeMarkdown OpportunityDefinitionsResponseFieldDefinitionValueType = "MARKDOWN"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeMultiSelect OpportunityDefinitionsResponseFieldDefinitionValueType = "MULTI_SELECT"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeNumber OpportunityDefinitionsResponseFieldDefinitionValueType = "NUMBER"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeSingleSelect OpportunityDefinitionsResponseFieldDefinitionValueType = "SINGLE_SELECT"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeSocialHandle OpportunityDefinitionsResponseFieldDefinitionValueType = "SOCIAL_HANDLE"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeTelephone OpportunityDefinitionsResponseFieldDefinitionValueType = "TELEPHONE"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeText OpportunityDefinitionsResponseFieldDefinitionValueType = "TEXT"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeURL OpportunityDefinitionsResponseFieldDefinitionValueType = "URL"` - `ID string` Unique identifier of the field definition. - `ReadOnly bool` `true` for fields that are not writable via the API (e.g. AI-generated summaries). `false` or absent for writable fields. - `ObjectType string` The object type these definitions belong to (e.g. `account`). - `RelationshipDefinitions map[string, OpportunityDefinitionsResponseRelationshipDefinition]` Map of relationship keys to their definitions. - `Cardinality string` Whether this is a `has_one` or `has_many` relationship. - `const OpportunityDefinitionsResponseRelationshipDefinitionCardinalityHasOne OpportunityDefinitionsResponseRelationshipDefinitionCardinality = "HAS_ONE"` - `const OpportunityDefinitionsResponseRelationshipDefinitionCardinalityHasMany OpportunityDefinitionsResponseRelationshipDefinitionCardinality = "HAS_MANY"` - `Description string` Description of the relationship, or null. - `Label string` Human-readable display name of the relationship. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `ID string` Unique identifier of the relationship definition. ### Example ```go 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"), ) opportunityDefinitionsResponse, err := client.Opportunity.Definitions(context.TODO()) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", opportunityDefinitionsResponse.FieldDefinitions) } ``` #### Response ```json { "fieldDefinitions": { "foo": { "description": "description", "label": "label", "typeConfiguration": { "currency": "currency", "handleService": "TWITTER", "multipleValues": true, "options": [ { "id": "id", "label": "label", "description": "description" } ], "unique": true }, "valueType": "ADDRESS", "id": "id", "readOnly": true } }, "objectType": "objectType", "relationshipDefinitions": { "foo": { "cardinality": "HAS_ONE", "description": "description", "label": "label", "objectType": "objectType", "id": "id" } } } ``` ## Create an opportunity `client.Opportunity.New(ctx, body) (*OpportunityCreateResponse, error)` **post** `/v1/opportunities` Creates a new opportunity record. The `$name` and `$stage` fields and the `$account` relationship are required. After creation, Lightfield automatically generates an opportunity summary in the background. The `$opportunityStatus` field is read-only and cannot be set via the API. The `$task` and `$note` relationships are also read-only — manage them via the `$opportunity` relationship on the task, or the `$account`/`$opportunity` note relationships instead. Supports idempotency via the `Idempotency-Key` header. To avoid duplicates, we recommend a find-or-create pattern — use [list filtering](/using-the-api/list-endpoints/#filtering) to check if a record exists before creating. **[Required scope](/using-the-api/scopes/):** `opportunities:create` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `body OpportunityNewParams` - `Fields param.Field[map[string, OpportunityNewParamsFieldUnion]]` Field values for the new opportunity. System fields use a `$` prefix (e.g. `$name`, `$stage`); custom attributes use their bare slug. Required: `$name` (string) and `$stage` (option ID or label). Fields of type `SINGLE_SELECT` or `MULTI_SELECT` accept either an option ID or label from the field's `typeConfiguration.options` — call the [definitions endpoint](/api/resources/opportunity/methods/definitions) to discover available fields and options. See [Fields and relationships](/using-the-api/fields-and-relationships/) for value type details. - `map[string, OpportunityNewParamsFieldUnion]` - `string` - `float64` - `bool` - `type OpportunityNewParamsFieldArray []string` - `type OpportunityNewParamsFieldAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityNewParamsFieldFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `Relationships param.Field[map[string, OpportunityNewParamsRelationshipUnion]]` Relationships to set on the new opportunity. System relationships use a `$` prefix (e.g. `$account`, `$owner`); custom relationships use their bare slug. `$account` is required. Each value is a single entity ID or an array of IDs. Call the [definitions endpoint](/api/resources/opportunity/methods/definitions) to list available relationship keys. - `map[string, OpportunityNewParamsRelationshipUnion]` - `string` - `type OpportunityNewParamsRelationshipArray []string` ### Returns - `type OpportunityCreateResponse struct{…}` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityCreateResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityCreateResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityCreateResponseFieldValueArray []string` - `type OpportunityCreateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityCreateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityCreateResponseFieldValueTypeAddress OpportunityCreateResponseFieldValueType = "ADDRESS"` - `const OpportunityCreateResponseFieldValueTypeCheckbox OpportunityCreateResponseFieldValueType = "CHECKBOX"` - `const OpportunityCreateResponseFieldValueTypeCurrency OpportunityCreateResponseFieldValueType = "CURRENCY"` - `const OpportunityCreateResponseFieldValueTypeDatetime OpportunityCreateResponseFieldValueType = "DATETIME"` - `const OpportunityCreateResponseFieldValueTypeEmail OpportunityCreateResponseFieldValueType = "EMAIL"` - `const OpportunityCreateResponseFieldValueTypeFullName OpportunityCreateResponseFieldValueType = "FULL_NAME"` - `const OpportunityCreateResponseFieldValueTypeMarkdown OpportunityCreateResponseFieldValueType = "MARKDOWN"` - `const OpportunityCreateResponseFieldValueTypeMultiSelect OpportunityCreateResponseFieldValueType = "MULTI_SELECT"` - `const OpportunityCreateResponseFieldValueTypeNumber OpportunityCreateResponseFieldValueType = "NUMBER"` - `const OpportunityCreateResponseFieldValueTypeSingleSelect OpportunityCreateResponseFieldValueType = "SINGLE_SELECT"` - `const OpportunityCreateResponseFieldValueTypeSocialHandle OpportunityCreateResponseFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityCreateResponseFieldValueTypeTelephone OpportunityCreateResponseFieldValueType = "TELEPHONE"` - `const OpportunityCreateResponseFieldValueTypeText OpportunityCreateResponseFieldValueType = "TEXT"` - `const OpportunityCreateResponseFieldValueTypeURL OpportunityCreateResponseFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityCreateResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. ### Example ```go 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"), ) opportunityCreateResponse, err := client.Opportunity.New(context.TODO(), githubcomlightfldlightfieldgo.OpportunityNewParams{ Fields: map[string]githubcomlightfldlightfieldgo.OpportunityNewParamsFieldUnion{ "foo": githubcomlightfldlightfieldgo.OpportunityNewParamsFieldUnion{ OfString: githubcomlightfldlightfieldgo.String("string"), }, }, Relationships: map[string]githubcomlightfldlightfieldgo.OpportunityNewParamsRelationshipUnion{ "foo": githubcomlightfldlightfieldgo.OpportunityNewParamsRelationshipUnion{ OfString: githubcomlightfldlightfieldgo.String("string"), }, }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", opportunityCreateResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ``` ## Update an opportunity `client.Opportunity.Update(ctx, id, body) (*OpportunityUpdateResponse, error)` **post** `/v1/opportunities/{id}` Updates an existing opportunity by ID. Only included fields and relationships are modified. The `$opportunityStatus` field is read-only and cannot be updated. The `$task` and `$note` relationships are also read-only — manage them via the `$opportunity` relationship on the task, or the `$account`/`$opportunity` note relationships instead. Supports idempotency via the `Idempotency-Key` header. **[Required scope](/using-the-api/scopes/):** `opportunities:update` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `id string` Unique identifier of the opportunity to update. - `body OpportunityUpdateParams` - `Fields param.Field[map[string, OpportunityUpdateParamsFieldUnion]]` Field values to update — only provided fields are modified; omitted fields are left unchanged. System fields use a `$` prefix (e.g. `$name`, `$stage`); custom attributes use their bare slug. `SINGLE_SELECT` and `MULTI_SELECT` fields accept an option ID or label — call the [definitions endpoint](/api/resources/opportunity/methods/definitions) for available options. See [Fields and relationships](/using-the-api/fields-and-relationships/) for value type details. - `map[string, OpportunityUpdateParamsFieldUnion]` - `string` - `float64` - `bool` - `type OpportunityUpdateParamsFieldArray []string` - `type OpportunityUpdateParamsFieldAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityUpdateParamsFieldFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `Relationships param.Field[map[string, OpportunityUpdateParamsRelationship]]` Relationship operations to apply. System relationships use a `$` prefix (e.g. `$owner`, `$champion`). Each value is an operation object with `add`, `remove`, or `replace`. - `map[string, OpportunityUpdateParamsRelationship]` - `Add OpportunityUpdateParamsRelationshipAddUnion` Entity ID(s) to add to the relationship. - `string` - `type OpportunityUpdateParamsRelationshipAddArray []string` - `Remove OpportunityUpdateParamsRelationshipRemoveUnion` Entity ID(s) to remove from the relationship. - `string` - `type OpportunityUpdateParamsRelationshipRemoveArray []string` - `Replace OpportunityUpdateParamsRelationshipReplaceUnion` Entity ID(s) to set as the entire relationship, replacing all existing associations. - `string` - `type OpportunityUpdateParamsRelationshipReplaceArray []string` ### Returns - `type OpportunityUpdateResponse struct{…}` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityUpdateResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityUpdateResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityUpdateResponseFieldValueArray []string` - `type OpportunityUpdateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityUpdateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityUpdateResponseFieldValueTypeAddress OpportunityUpdateResponseFieldValueType = "ADDRESS"` - `const OpportunityUpdateResponseFieldValueTypeCheckbox OpportunityUpdateResponseFieldValueType = "CHECKBOX"` - `const OpportunityUpdateResponseFieldValueTypeCurrency OpportunityUpdateResponseFieldValueType = "CURRENCY"` - `const OpportunityUpdateResponseFieldValueTypeDatetime OpportunityUpdateResponseFieldValueType = "DATETIME"` - `const OpportunityUpdateResponseFieldValueTypeEmail OpportunityUpdateResponseFieldValueType = "EMAIL"` - `const OpportunityUpdateResponseFieldValueTypeFullName OpportunityUpdateResponseFieldValueType = "FULL_NAME"` - `const OpportunityUpdateResponseFieldValueTypeMarkdown OpportunityUpdateResponseFieldValueType = "MARKDOWN"` - `const OpportunityUpdateResponseFieldValueTypeMultiSelect OpportunityUpdateResponseFieldValueType = "MULTI_SELECT"` - `const OpportunityUpdateResponseFieldValueTypeNumber OpportunityUpdateResponseFieldValueType = "NUMBER"` - `const OpportunityUpdateResponseFieldValueTypeSingleSelect OpportunityUpdateResponseFieldValueType = "SINGLE_SELECT"` - `const OpportunityUpdateResponseFieldValueTypeSocialHandle OpportunityUpdateResponseFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityUpdateResponseFieldValueTypeTelephone OpportunityUpdateResponseFieldValueType = "TELEPHONE"` - `const OpportunityUpdateResponseFieldValueTypeText OpportunityUpdateResponseFieldValueType = "TEXT"` - `const OpportunityUpdateResponseFieldValueTypeURL OpportunityUpdateResponseFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityUpdateResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. ### Example ```go 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"), ) opportunityUpdateResponse, err := client.Opportunity.Update( context.TODO(), "id", githubcomlightfldlightfieldgo.OpportunityUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", opportunityUpdateResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ``` ## Retrieve an opportunity `client.Opportunity.Get(ctx, id) (*OpportunityRetrieveResponse, error)` **get** `/v1/opportunities/{id}` Retrieves a single opportunity by its ID. **[Required scope](/using-the-api/scopes/):** `opportunities:read` **[Rate limit category](/using-the-api/rate-limits/):** Read ### Parameters - `id string` Unique identifier of the opportunity to retrieve. ### Returns - `type OpportunityRetrieveResponse struct{…}` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityRetrieveResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityRetrieveResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityRetrieveResponseFieldValueArray []string` - `type OpportunityRetrieveResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityRetrieveResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityRetrieveResponseFieldValueTypeAddress OpportunityRetrieveResponseFieldValueType = "ADDRESS"` - `const OpportunityRetrieveResponseFieldValueTypeCheckbox OpportunityRetrieveResponseFieldValueType = "CHECKBOX"` - `const OpportunityRetrieveResponseFieldValueTypeCurrency OpportunityRetrieveResponseFieldValueType = "CURRENCY"` - `const OpportunityRetrieveResponseFieldValueTypeDatetime OpportunityRetrieveResponseFieldValueType = "DATETIME"` - `const OpportunityRetrieveResponseFieldValueTypeEmail OpportunityRetrieveResponseFieldValueType = "EMAIL"` - `const OpportunityRetrieveResponseFieldValueTypeFullName OpportunityRetrieveResponseFieldValueType = "FULL_NAME"` - `const OpportunityRetrieveResponseFieldValueTypeMarkdown OpportunityRetrieveResponseFieldValueType = "MARKDOWN"` - `const OpportunityRetrieveResponseFieldValueTypeMultiSelect OpportunityRetrieveResponseFieldValueType = "MULTI_SELECT"` - `const OpportunityRetrieveResponseFieldValueTypeNumber OpportunityRetrieveResponseFieldValueType = "NUMBER"` - `const OpportunityRetrieveResponseFieldValueTypeSingleSelect OpportunityRetrieveResponseFieldValueType = "SINGLE_SELECT"` - `const OpportunityRetrieveResponseFieldValueTypeSocialHandle OpportunityRetrieveResponseFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityRetrieveResponseFieldValueTypeTelephone OpportunityRetrieveResponseFieldValueType = "TELEPHONE"` - `const OpportunityRetrieveResponseFieldValueTypeText OpportunityRetrieveResponseFieldValueType = "TEXT"` - `const OpportunityRetrieveResponseFieldValueTypeURL OpportunityRetrieveResponseFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityRetrieveResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. ### Example ```go 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"), ) opportunityRetrieveResponse, err := client.Opportunity.Get(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", opportunityRetrieveResponse.ID) } ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ``` ## List opportunities `client.Opportunity.List(ctx, query) (*OpportunityListResponse, error)` **get** `/v1/opportunities` Returns a paginated list of opportunities. Use `offset` and `limit` to paginate through results, and `$field` query parameters to filter. See [List endpoints](/using-the-api/list-endpoints/) for more information about [pagination](/using-the-api/list-endpoints/#pagination) and [filtering](/using-the-api/list-endpoints/#filtering). **[Required scope](/using-the-api/scopes/):** `opportunities:read` **[Rate limit category](/using-the-api/rate-limits/):** Search ### Parameters - `query OpportunityListParams` - `Limit param.Field[int64]` Maximum number of records to return. Defaults to 25, maximum 25. - `Offset param.Field[int64]` Number of records to skip for pagination. Defaults to 0. ### Returns - `type OpportunityListResponse struct{…}` - `Data []OpportunityListResponseData` Array of entity objects for the current page. - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityListResponseDataField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityListResponseDataFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityListResponseDataFieldValueArray []string` - `type OpportunityListResponseDataFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityListResponseDataFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityListResponseDataFieldValueTypeAddress OpportunityListResponseDataFieldValueType = "ADDRESS"` - `const OpportunityListResponseDataFieldValueTypeCheckbox OpportunityListResponseDataFieldValueType = "CHECKBOX"` - `const OpportunityListResponseDataFieldValueTypeCurrency OpportunityListResponseDataFieldValueType = "CURRENCY"` - `const OpportunityListResponseDataFieldValueTypeDatetime OpportunityListResponseDataFieldValueType = "DATETIME"` - `const OpportunityListResponseDataFieldValueTypeEmail OpportunityListResponseDataFieldValueType = "EMAIL"` - `const OpportunityListResponseDataFieldValueTypeFullName OpportunityListResponseDataFieldValueType = "FULL_NAME"` - `const OpportunityListResponseDataFieldValueTypeMarkdown OpportunityListResponseDataFieldValueType = "MARKDOWN"` - `const OpportunityListResponseDataFieldValueTypeMultiSelect OpportunityListResponseDataFieldValueType = "MULTI_SELECT"` - `const OpportunityListResponseDataFieldValueTypeNumber OpportunityListResponseDataFieldValueType = "NUMBER"` - `const OpportunityListResponseDataFieldValueTypeSingleSelect OpportunityListResponseDataFieldValueType = "SINGLE_SELECT"` - `const OpportunityListResponseDataFieldValueTypeSocialHandle OpportunityListResponseDataFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityListResponseDataFieldValueTypeTelephone OpportunityListResponseDataFieldValueType = "TELEPHONE"` - `const OpportunityListResponseDataFieldValueTypeText OpportunityListResponseDataFieldValueType = "TEXT"` - `const OpportunityListResponseDataFieldValueTypeURL OpportunityListResponseDataFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityListResponseDataRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Object string` The object type, always `"list"`. - `TotalCount int64` Total number of entities matching the query. ### Example ```go 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"), ) opportunityListResponse, err := client.Opportunity.List(context.TODO(), githubcomlightfldlightfieldgo.OpportunityListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", opportunityListResponse.Data) } ``` #### Response ```json { "data": [ { "id": "id", "createdAt": "createdAt", "fields": { "foo": { "value": "string", "valueType": "ADDRESS" } }, "httpLink": "httpLink", "relationships": { "foo": { "cardinality": "cardinality", "objectType": "objectType", "values": [ "string" ] } }, "updatedAt": "updatedAt", "externalId": "externalId" } ], "object": "object", "totalCount": 0 } ``` ## Domain Types ### Opportunity Create Response - `type OpportunityCreateResponse struct{…}` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityCreateResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityCreateResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityCreateResponseFieldValueArray []string` - `type OpportunityCreateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityCreateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityCreateResponseFieldValueTypeAddress OpportunityCreateResponseFieldValueType = "ADDRESS"` - `const OpportunityCreateResponseFieldValueTypeCheckbox OpportunityCreateResponseFieldValueType = "CHECKBOX"` - `const OpportunityCreateResponseFieldValueTypeCurrency OpportunityCreateResponseFieldValueType = "CURRENCY"` - `const OpportunityCreateResponseFieldValueTypeDatetime OpportunityCreateResponseFieldValueType = "DATETIME"` - `const OpportunityCreateResponseFieldValueTypeEmail OpportunityCreateResponseFieldValueType = "EMAIL"` - `const OpportunityCreateResponseFieldValueTypeFullName OpportunityCreateResponseFieldValueType = "FULL_NAME"` - `const OpportunityCreateResponseFieldValueTypeMarkdown OpportunityCreateResponseFieldValueType = "MARKDOWN"` - `const OpportunityCreateResponseFieldValueTypeMultiSelect OpportunityCreateResponseFieldValueType = "MULTI_SELECT"` - `const OpportunityCreateResponseFieldValueTypeNumber OpportunityCreateResponseFieldValueType = "NUMBER"` - `const OpportunityCreateResponseFieldValueTypeSingleSelect OpportunityCreateResponseFieldValueType = "SINGLE_SELECT"` - `const OpportunityCreateResponseFieldValueTypeSocialHandle OpportunityCreateResponseFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityCreateResponseFieldValueTypeTelephone OpportunityCreateResponseFieldValueType = "TELEPHONE"` - `const OpportunityCreateResponseFieldValueTypeText OpportunityCreateResponseFieldValueType = "TEXT"` - `const OpportunityCreateResponseFieldValueTypeURL OpportunityCreateResponseFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityCreateResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. ### Opportunity Definitions Response - `type OpportunityDefinitionsResponse struct{…}` - `FieldDefinitions map[string, OpportunityDefinitionsResponseFieldDefinition]` Map of field keys to their definitions, including both system and custom fields. - `Description string` Description of the field, or null. - `Label string` Human-readable display name of the field. - `TypeConfiguration OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration` Type-specific configuration (e.g. select options, currency code). - `Currency string` ISO 4217 3-letter currency code. - `HandleService string` Social platform associated with this handle field. - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceTwitter OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "TWITTER"` - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceLinkedin OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "LINKEDIN"` - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceFacebook OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "FACEBOOK"` - `const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceInstagram OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "INSTAGRAM"` - `MultipleValues bool` Whether this field accepts multiple values. - `Options []OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption` Available options for select fields. - `ID string` Unique identifier of the select option. - `Label string` Human-readable display name of the option. - `Description string` Description of the option, or null. - `Unique bool` Whether values for this field must be unique. - `ValueType string` Data type of the field. - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeAddress OpportunityDefinitionsResponseFieldDefinitionValueType = "ADDRESS"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeCheckbox OpportunityDefinitionsResponseFieldDefinitionValueType = "CHECKBOX"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeCurrency OpportunityDefinitionsResponseFieldDefinitionValueType = "CURRENCY"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeDatetime OpportunityDefinitionsResponseFieldDefinitionValueType = "DATETIME"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeEmail OpportunityDefinitionsResponseFieldDefinitionValueType = "EMAIL"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeFullName OpportunityDefinitionsResponseFieldDefinitionValueType = "FULL_NAME"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeMarkdown OpportunityDefinitionsResponseFieldDefinitionValueType = "MARKDOWN"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeMultiSelect OpportunityDefinitionsResponseFieldDefinitionValueType = "MULTI_SELECT"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeNumber OpportunityDefinitionsResponseFieldDefinitionValueType = "NUMBER"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeSingleSelect OpportunityDefinitionsResponseFieldDefinitionValueType = "SINGLE_SELECT"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeSocialHandle OpportunityDefinitionsResponseFieldDefinitionValueType = "SOCIAL_HANDLE"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeTelephone OpportunityDefinitionsResponseFieldDefinitionValueType = "TELEPHONE"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeText OpportunityDefinitionsResponseFieldDefinitionValueType = "TEXT"` - `const OpportunityDefinitionsResponseFieldDefinitionValueTypeURL OpportunityDefinitionsResponseFieldDefinitionValueType = "URL"` - `ID string` Unique identifier of the field definition. - `ReadOnly bool` `true` for fields that are not writable via the API (e.g. AI-generated summaries). `false` or absent for writable fields. - `ObjectType string` The object type these definitions belong to (e.g. `account`). - `RelationshipDefinitions map[string, OpportunityDefinitionsResponseRelationshipDefinition]` Map of relationship keys to their definitions. - `Cardinality string` Whether this is a `has_one` or `has_many` relationship. - `const OpportunityDefinitionsResponseRelationshipDefinitionCardinalityHasOne OpportunityDefinitionsResponseRelationshipDefinitionCardinality = "HAS_ONE"` - `const OpportunityDefinitionsResponseRelationshipDefinitionCardinalityHasMany OpportunityDefinitionsResponseRelationshipDefinitionCardinality = "HAS_MANY"` - `Description string` Description of the relationship, or null. - `Label string` Human-readable display name of the relationship. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `ID string` Unique identifier of the relationship definition. ### Opportunity List Response - `type OpportunityListResponse struct{…}` - `Data []OpportunityListResponseData` Array of entity objects for the current page. - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityListResponseDataField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityListResponseDataFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityListResponseDataFieldValueArray []string` - `type OpportunityListResponseDataFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityListResponseDataFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityListResponseDataFieldValueTypeAddress OpportunityListResponseDataFieldValueType = "ADDRESS"` - `const OpportunityListResponseDataFieldValueTypeCheckbox OpportunityListResponseDataFieldValueType = "CHECKBOX"` - `const OpportunityListResponseDataFieldValueTypeCurrency OpportunityListResponseDataFieldValueType = "CURRENCY"` - `const OpportunityListResponseDataFieldValueTypeDatetime OpportunityListResponseDataFieldValueType = "DATETIME"` - `const OpportunityListResponseDataFieldValueTypeEmail OpportunityListResponseDataFieldValueType = "EMAIL"` - `const OpportunityListResponseDataFieldValueTypeFullName OpportunityListResponseDataFieldValueType = "FULL_NAME"` - `const OpportunityListResponseDataFieldValueTypeMarkdown OpportunityListResponseDataFieldValueType = "MARKDOWN"` - `const OpportunityListResponseDataFieldValueTypeMultiSelect OpportunityListResponseDataFieldValueType = "MULTI_SELECT"` - `const OpportunityListResponseDataFieldValueTypeNumber OpportunityListResponseDataFieldValueType = "NUMBER"` - `const OpportunityListResponseDataFieldValueTypeSingleSelect OpportunityListResponseDataFieldValueType = "SINGLE_SELECT"` - `const OpportunityListResponseDataFieldValueTypeSocialHandle OpportunityListResponseDataFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityListResponseDataFieldValueTypeTelephone OpportunityListResponseDataFieldValueType = "TELEPHONE"` - `const OpportunityListResponseDataFieldValueTypeText OpportunityListResponseDataFieldValueType = "TEXT"` - `const OpportunityListResponseDataFieldValueTypeURL OpportunityListResponseDataFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityListResponseDataRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Object string` The object type, always `"list"`. - `TotalCount int64` Total number of entities matching the query. ### Opportunity Retrieve Response - `type OpportunityRetrieveResponse struct{…}` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityRetrieveResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityRetrieveResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityRetrieveResponseFieldValueArray []string` - `type OpportunityRetrieveResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityRetrieveResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityRetrieveResponseFieldValueTypeAddress OpportunityRetrieveResponseFieldValueType = "ADDRESS"` - `const OpportunityRetrieveResponseFieldValueTypeCheckbox OpportunityRetrieveResponseFieldValueType = "CHECKBOX"` - `const OpportunityRetrieveResponseFieldValueTypeCurrency OpportunityRetrieveResponseFieldValueType = "CURRENCY"` - `const OpportunityRetrieveResponseFieldValueTypeDatetime OpportunityRetrieveResponseFieldValueType = "DATETIME"` - `const OpportunityRetrieveResponseFieldValueTypeEmail OpportunityRetrieveResponseFieldValueType = "EMAIL"` - `const OpportunityRetrieveResponseFieldValueTypeFullName OpportunityRetrieveResponseFieldValueType = "FULL_NAME"` - `const OpportunityRetrieveResponseFieldValueTypeMarkdown OpportunityRetrieveResponseFieldValueType = "MARKDOWN"` - `const OpportunityRetrieveResponseFieldValueTypeMultiSelect OpportunityRetrieveResponseFieldValueType = "MULTI_SELECT"` - `const OpportunityRetrieveResponseFieldValueTypeNumber OpportunityRetrieveResponseFieldValueType = "NUMBER"` - `const OpportunityRetrieveResponseFieldValueTypeSingleSelect OpportunityRetrieveResponseFieldValueType = "SINGLE_SELECT"` - `const OpportunityRetrieveResponseFieldValueTypeSocialHandle OpportunityRetrieveResponseFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityRetrieveResponseFieldValueTypeTelephone OpportunityRetrieveResponseFieldValueType = "TELEPHONE"` - `const OpportunityRetrieveResponseFieldValueTypeText OpportunityRetrieveResponseFieldValueType = "TEXT"` - `const OpportunityRetrieveResponseFieldValueTypeURL OpportunityRetrieveResponseFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityRetrieveResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. ### Opportunity Update Response - `type OpportunityUpdateResponse struct{…}` - `ID string` Unique identifier for the entity. - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, OpportunityUpdateResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value OpportunityUpdateResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type OpportunityUpdateResponseFieldValueArray []string` - `type OpportunityUpdateResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type OpportunityUpdateResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const OpportunityUpdateResponseFieldValueTypeAddress OpportunityUpdateResponseFieldValueType = "ADDRESS"` - `const OpportunityUpdateResponseFieldValueTypeCheckbox OpportunityUpdateResponseFieldValueType = "CHECKBOX"` - `const OpportunityUpdateResponseFieldValueTypeCurrency OpportunityUpdateResponseFieldValueType = "CURRENCY"` - `const OpportunityUpdateResponseFieldValueTypeDatetime OpportunityUpdateResponseFieldValueType = "DATETIME"` - `const OpportunityUpdateResponseFieldValueTypeEmail OpportunityUpdateResponseFieldValueType = "EMAIL"` - `const OpportunityUpdateResponseFieldValueTypeFullName OpportunityUpdateResponseFieldValueType = "FULL_NAME"` - `const OpportunityUpdateResponseFieldValueTypeMarkdown OpportunityUpdateResponseFieldValueType = "MARKDOWN"` - `const OpportunityUpdateResponseFieldValueTypeMultiSelect OpportunityUpdateResponseFieldValueType = "MULTI_SELECT"` - `const OpportunityUpdateResponseFieldValueTypeNumber OpportunityUpdateResponseFieldValueType = "NUMBER"` - `const OpportunityUpdateResponseFieldValueTypeSingleSelect OpportunityUpdateResponseFieldValueType = "SINGLE_SELECT"` - `const OpportunityUpdateResponseFieldValueTypeSocialHandle OpportunityUpdateResponseFieldValueType = "SOCIAL_HANDLE"` - `const OpportunityUpdateResponseFieldValueTypeTelephone OpportunityUpdateResponseFieldValueType = "TELEPHONE"` - `const OpportunityUpdateResponseFieldValueTypeText OpportunityUpdateResponseFieldValueType = "TEXT"` - `const OpportunityUpdateResponseFieldValueTypeURL OpportunityUpdateResponseFieldValueType = "URL"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `Relationships map[string, OpportunityUpdateResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset.