Skip to content

Opportunity

Opportunities represent potential deals or sales in Lightfield. Each opportunity belongs to an account and can have tasks and notes associated with it.

Get opportunity field definitions
client.Opportunity.Definitions(ctx) (*OpportunityDefinitionsResponse, error)
GET/v1/opportunities/definitions
Get field value history
client.Opportunity.FieldHistory(ctx, fieldKey, params) (*OpportunityFieldHistoryResponse, error)
GET/v1/opportunities/{id}/fields/{fieldKey}/history
Create an opportunity
client.Opportunity.New(ctx, body) (*OpportunityCreateResponse, error)
POST/v1/opportunities
Update an opportunity
client.Opportunity.Update(ctx, id, body) (*OpportunityUpdateResponse, error)
POST/v1/opportunities/{id}
Retrieve an opportunity
client.Opportunity.Get(ctx, id) (*OpportunityRetrieveResponse, error)
GET/v1/opportunities/{id}
List opportunities
client.Opportunity.List(ctx, query) (*OpportunityListResponse, error)
GET/v1/opportunities
Delete an opportunity
client.Opportunity.Delete(ctx, id, body) (*OpportunityDeleteResponse, error)
DELETE/v1/opportunities/{id}
Restore an opportunity
client.Opportunity.Restore(ctx, id, body) (*OpportunityRestoreResponse, error)
POST/v1/opportunities/{id}/restore
ModelsExpand Collapse
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.

One of the following:
string
float64
bool
type OpportunityCreateResponseFieldValueArray []string
type OpportunityCreateResponseFieldValueAddress 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 OpportunityCreateResponseFieldValueFullName 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 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"
const OpportunityCreateResponseFieldValueTypeHTML OpportunityCreateResponseFieldValueType = "HTML"
Relationships map[string, OpportunityCreateResponseRelationship]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record’s role with :asSource or :asDestination, for example ?parent:asSource[contains]=account_id.

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.

Directions OpportunityCreateResponseRelationshipDirectionsOptional

Directional values for a self-referential relationship. List filters use the relationship key with :asSource or :asDestination; writes continue to use the bare key.

AsDestination OpportunityCreateResponseRelationshipDirectionsAsDestination

The current record is the destination (incoming) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityCreateResponseRelationshipDirectionsAsDestinationCardinalityHasOne OpportunityCreateResponseRelationshipDirectionsAsDestinationCardinality = "HAS_ONE"
const OpportunityCreateResponseRelationshipDirectionsAsDestinationCardinalityHasMany OpportunityCreateResponseRelationshipDirectionsAsDestinationCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

AsSource OpportunityCreateResponseRelationshipDirectionsAsSource

The current record is the source (outgoing) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityCreateResponseRelationshipDirectionsAsSourceCardinalityHasOne OpportunityCreateResponseRelationshipDirectionsAsSourceCardinality = "HAS_ONE"
const OpportunityCreateResponseRelationshipDirectionsAsSourceCardinalityHasMany OpportunityCreateResponseRelationshipDirectionsAsSourceCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

UpdatedAt string

ISO 8601 timestamp of when the entity was last updated, or null.

ExternalID stringOptional

External identifier for the entity, or null if unset.

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 stringOptional

ISO 4217 3-letter currency code.

HandleService stringOptional

Social platform associated with this handle field.

One of the following:
const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceTwitter OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "TWITTER"
const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceLinkedin OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "LINKEDIN"
const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceFacebook OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "FACEBOOK"
const OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleServiceInstagram OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationHandleService = "INSTAGRAM"
MultipleValues boolOptional

Whether this field accepts multiple values.

Options []OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOptionOptional

Available options for select fields.

ID string

Unique identifier of the select option.

Label string

Human-readable display name of the option.

Description stringOptional

Description of the option, or null.

ParentID stringOptional

For a dependent select, the ID of the option in the parent field named by typeConfiguration.parentFieldKey that owns this option. Absent for ordinary selects.

ParentFieldKey stringOptional

For a dependent select, the field key whose selected option determines which of this field’s options apply. Absent for ordinary selects.

Unique boolOptional

Whether values for this field must be unique.

ValueType string

Data type of the field.

One of the following:
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"
const OpportunityDefinitionsResponseFieldDefinitionValueTypeHTML OpportunityDefinitionsResponseFieldDefinitionValueType = "HTML"
ID stringOptional

Unique identifier of the field definition.

ReadOnly boolOptional

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. Self-referential relationships include optional directional metadata on the bare definition.

Cardinality string

Whether this is a has_one or has_many relationship.

One of the following:
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 stringOptional

Unique identifier of the relationship definition.

Directions OpportunityDefinitionsResponseRelationshipDefinitionDirectionsOptional

Directional metadata for a self-referential relationship. List filters use the relationship key with :asSource or :asDestination; writes continue to use the bare key.

AsDestination OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsDestination

The current record is the destination (incoming) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsDestinationCardinalityHasOne OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsDestinationCardinality = "HAS_ONE"
const OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsDestinationCardinalityHasMany OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsDestinationCardinality = "HAS_MANY"
Label string

Human-readable display name for this endpoint direction.

AsSource OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsSource

The current record is the source (outgoing) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsSourceCardinalityHasOne OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsSourceCardinality = "HAS_ONE"
const OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsSourceCardinalityHasMany OpportunityDefinitionsResponseRelationshipDefinitionDirectionsAsSourceCardinality = "HAS_MANY"
Label string

Human-readable display name for this endpoint direction.

type OpportunityDeleteResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, OpportunityDeleteResponseField]

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $email); custom attributes use their bare slug.

Value OpportunityDeleteResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type OpportunityDeleteResponseFieldValueArray []string
type OpportunityDeleteResponseFieldValueAddress 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 OpportunityDeleteResponseFieldValueFullName 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 OpportunityDeleteResponseFieldValueTypeAddress OpportunityDeleteResponseFieldValueType = "ADDRESS"
const OpportunityDeleteResponseFieldValueTypeCheckbox OpportunityDeleteResponseFieldValueType = "CHECKBOX"
const OpportunityDeleteResponseFieldValueTypeCurrency OpportunityDeleteResponseFieldValueType = "CURRENCY"
const OpportunityDeleteResponseFieldValueTypeDatetime OpportunityDeleteResponseFieldValueType = "DATETIME"
const OpportunityDeleteResponseFieldValueTypeEmail OpportunityDeleteResponseFieldValueType = "EMAIL"
const OpportunityDeleteResponseFieldValueTypeFullName OpportunityDeleteResponseFieldValueType = "FULL_NAME"
const OpportunityDeleteResponseFieldValueTypeMarkdown OpportunityDeleteResponseFieldValueType = "MARKDOWN"
const OpportunityDeleteResponseFieldValueTypeMultiSelect OpportunityDeleteResponseFieldValueType = "MULTI_SELECT"
const OpportunityDeleteResponseFieldValueTypeNumber OpportunityDeleteResponseFieldValueType = "NUMBER"
const OpportunityDeleteResponseFieldValueTypeSingleSelect OpportunityDeleteResponseFieldValueType = "SINGLE_SELECT"
const OpportunityDeleteResponseFieldValueTypeSocialHandle OpportunityDeleteResponseFieldValueType = "SOCIAL_HANDLE"
const OpportunityDeleteResponseFieldValueTypeTelephone OpportunityDeleteResponseFieldValueType = "TELEPHONE"
const OpportunityDeleteResponseFieldValueTypeText OpportunityDeleteResponseFieldValueType = "TEXT"
const OpportunityDeleteResponseFieldValueTypeURL OpportunityDeleteResponseFieldValueType = "URL"
const OpportunityDeleteResponseFieldValueTypeHTML OpportunityDeleteResponseFieldValueType = "HTML"
Relationships map[string, OpportunityDeleteResponseRelationship]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record’s role with :asSource or :asDestination, for example ?parent:asSource[contains]=account_id.

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.

Directions OpportunityDeleteResponseRelationshipDirectionsOptional

Directional values for a self-referential relationship. List filters use the relationship key with :asSource or :asDestination; writes continue to use the bare key.

AsDestination OpportunityDeleteResponseRelationshipDirectionsAsDestination

The current record is the destination (incoming) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityDeleteResponseRelationshipDirectionsAsDestinationCardinalityHasOne OpportunityDeleteResponseRelationshipDirectionsAsDestinationCardinality = "HAS_ONE"
const OpportunityDeleteResponseRelationshipDirectionsAsDestinationCardinalityHasMany OpportunityDeleteResponseRelationshipDirectionsAsDestinationCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

AsSource OpportunityDeleteResponseRelationshipDirectionsAsSource

The current record is the source (outgoing) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityDeleteResponseRelationshipDirectionsAsSourceCardinalityHasOne OpportunityDeleteResponseRelationshipDirectionsAsSourceCardinality = "HAS_ONE"
const OpportunityDeleteResponseRelationshipDirectionsAsSourceCardinalityHasMany OpportunityDeleteResponseRelationshipDirectionsAsSourceCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

UpdatedAt string

ISO 8601 timestamp of when the entity was last updated, or null.

ExternalID stringOptional

External identifier for the entity, or null if unset.

type OpportunityFieldHistoryResponse struct{…}
Data []OpportunityFieldHistoryResponseData

Recorded values for the field, newest first.

DisplayValue string

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

IsCreate bool

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

RecordedAt string

ISO 8601 timestamp of when this value was recorded.

Value OpportunityFieldHistoryResponseDataValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type OpportunityFieldHistoryResponseDataValueArray []string
type OpportunityFieldHistoryResponseDataValueAddress 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 OpportunityFieldHistoryResponseDataValueFullName 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 OpportunityFieldHistoryResponseDataValueTypeAddress OpportunityFieldHistoryResponseDataValueType = "ADDRESS"
const OpportunityFieldHistoryResponseDataValueTypeCheckbox OpportunityFieldHistoryResponseDataValueType = "CHECKBOX"
const OpportunityFieldHistoryResponseDataValueTypeCurrency OpportunityFieldHistoryResponseDataValueType = "CURRENCY"
const OpportunityFieldHistoryResponseDataValueTypeDatetime OpportunityFieldHistoryResponseDataValueType = "DATETIME"
const OpportunityFieldHistoryResponseDataValueTypeEmail OpportunityFieldHistoryResponseDataValueType = "EMAIL"
const OpportunityFieldHistoryResponseDataValueTypeFullName OpportunityFieldHistoryResponseDataValueType = "FULL_NAME"
const OpportunityFieldHistoryResponseDataValueTypeMarkdown OpportunityFieldHistoryResponseDataValueType = "MARKDOWN"
const OpportunityFieldHistoryResponseDataValueTypeMultiSelect OpportunityFieldHistoryResponseDataValueType = "MULTI_SELECT"
const OpportunityFieldHistoryResponseDataValueTypeNumber OpportunityFieldHistoryResponseDataValueType = "NUMBER"
const OpportunityFieldHistoryResponseDataValueTypeSingleSelect OpportunityFieldHistoryResponseDataValueType = "SINGLE_SELECT"
const OpportunityFieldHistoryResponseDataValueTypeSocialHandle OpportunityFieldHistoryResponseDataValueType = "SOCIAL_HANDLE"
const OpportunityFieldHistoryResponseDataValueTypeTelephone OpportunityFieldHistoryResponseDataValueType = "TELEPHONE"
const OpportunityFieldHistoryResponseDataValueTypeText OpportunityFieldHistoryResponseDataValueType = "TEXT"
const OpportunityFieldHistoryResponseDataValueTypeURL OpportunityFieldHistoryResponseDataValueType = "URL"
const OpportunityFieldHistoryResponseDataValueTypeHTML OpportunityFieldHistoryResponseDataValueType = "HTML"
HasMore bool

Whether more history exists beyond this page.

NextCursor string

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

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.

One of the following:
string
float64
bool
type OpportunityListResponseDataFieldValueArray []string
type OpportunityListResponseDataFieldValueAddress 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 OpportunityListResponseDataFieldValueFullName 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 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"
const OpportunityListResponseDataFieldValueTypeHTML OpportunityListResponseDataFieldValueType = "HTML"
Relationships map[string, OpportunityListResponseDataRelationship]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record’s role with :asSource or :asDestination, for example ?parent:asSource[contains]=account_id.

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.

Directions OpportunityListResponseDataRelationshipDirectionsOptional

Directional values for a self-referential relationship. List filters use the relationship key with :asSource or :asDestination; writes continue to use the bare key.

AsDestination OpportunityListResponseDataRelationshipDirectionsAsDestination

The current record is the destination (incoming) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityListResponseDataRelationshipDirectionsAsDestinationCardinalityHasOne OpportunityListResponseDataRelationshipDirectionsAsDestinationCardinality = "HAS_ONE"
const OpportunityListResponseDataRelationshipDirectionsAsDestinationCardinalityHasMany OpportunityListResponseDataRelationshipDirectionsAsDestinationCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

AsSource OpportunityListResponseDataRelationshipDirectionsAsSource

The current record is the source (outgoing) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityListResponseDataRelationshipDirectionsAsSourceCardinalityHasOne OpportunityListResponseDataRelationshipDirectionsAsSourceCardinality = "HAS_ONE"
const OpportunityListResponseDataRelationshipDirectionsAsSourceCardinalityHasMany OpportunityListResponseDataRelationshipDirectionsAsSourceCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

UpdatedAt string

ISO 8601 timestamp of when the entity was last updated, or null.

ExternalID stringOptional

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.

minimum0
maximum9007199254740991
type OpportunityRestoreResponse struct{…}
ID string

Unique identifier for the entity.

CreatedAt string

ISO 8601 timestamp of when the entity was created.

Fields map[string, OpportunityRestoreResponseField]

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $email); custom attributes use their bare slug.

Value OpportunityRestoreResponseFieldValueUnion

The field value, or null if unset.

One of the following:
string
float64
bool
type OpportunityRestoreResponseFieldValueArray []string
type OpportunityRestoreResponseFieldValueAddress 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 OpportunityRestoreResponseFieldValueFullName 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 OpportunityRestoreResponseFieldValueTypeAddress OpportunityRestoreResponseFieldValueType = "ADDRESS"
const OpportunityRestoreResponseFieldValueTypeCheckbox OpportunityRestoreResponseFieldValueType = "CHECKBOX"
const OpportunityRestoreResponseFieldValueTypeCurrency OpportunityRestoreResponseFieldValueType = "CURRENCY"
const OpportunityRestoreResponseFieldValueTypeDatetime OpportunityRestoreResponseFieldValueType = "DATETIME"
const OpportunityRestoreResponseFieldValueTypeEmail OpportunityRestoreResponseFieldValueType = "EMAIL"
const OpportunityRestoreResponseFieldValueTypeFullName OpportunityRestoreResponseFieldValueType = "FULL_NAME"
const OpportunityRestoreResponseFieldValueTypeMarkdown OpportunityRestoreResponseFieldValueType = "MARKDOWN"
const OpportunityRestoreResponseFieldValueTypeMultiSelect OpportunityRestoreResponseFieldValueType = "MULTI_SELECT"
const OpportunityRestoreResponseFieldValueTypeNumber OpportunityRestoreResponseFieldValueType = "NUMBER"
const OpportunityRestoreResponseFieldValueTypeSingleSelect OpportunityRestoreResponseFieldValueType = "SINGLE_SELECT"
const OpportunityRestoreResponseFieldValueTypeSocialHandle OpportunityRestoreResponseFieldValueType = "SOCIAL_HANDLE"
const OpportunityRestoreResponseFieldValueTypeTelephone OpportunityRestoreResponseFieldValueType = "TELEPHONE"
const OpportunityRestoreResponseFieldValueTypeText OpportunityRestoreResponseFieldValueType = "TEXT"
const OpportunityRestoreResponseFieldValueTypeURL OpportunityRestoreResponseFieldValueType = "URL"
const OpportunityRestoreResponseFieldValueTypeHTML OpportunityRestoreResponseFieldValueType = "HTML"
Relationships map[string, OpportunityRestoreResponseRelationship]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record’s role with :asSource or :asDestination, for example ?parent:asSource[contains]=account_id.

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.

Directions OpportunityRestoreResponseRelationshipDirectionsOptional

Directional values for a self-referential relationship. List filters use the relationship key with :asSource or :asDestination; writes continue to use the bare key.

AsDestination OpportunityRestoreResponseRelationshipDirectionsAsDestination

The current record is the destination (incoming) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityRestoreResponseRelationshipDirectionsAsDestinationCardinalityHasOne OpportunityRestoreResponseRelationshipDirectionsAsDestinationCardinality = "HAS_ONE"
const OpportunityRestoreResponseRelationshipDirectionsAsDestinationCardinalityHasMany OpportunityRestoreResponseRelationshipDirectionsAsDestinationCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

AsSource OpportunityRestoreResponseRelationshipDirectionsAsSource

The current record is the source (outgoing) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityRestoreResponseRelationshipDirectionsAsSourceCardinalityHasOne OpportunityRestoreResponseRelationshipDirectionsAsSourceCardinality = "HAS_ONE"
const OpportunityRestoreResponseRelationshipDirectionsAsSourceCardinalityHasMany OpportunityRestoreResponseRelationshipDirectionsAsSourceCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

UpdatedAt string

ISO 8601 timestamp of when the entity was last updated, or null.

ExternalID stringOptional

External identifier for the entity, or null if unset.

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.

One of the following:
string
float64
bool
type OpportunityRetrieveResponseFieldValueArray []string
type OpportunityRetrieveResponseFieldValueAddress 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 OpportunityRetrieveResponseFieldValueFullName 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 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"
const OpportunityRetrieveResponseFieldValueTypeHTML OpportunityRetrieveResponseFieldValueType = "HTML"
Relationships map[string, OpportunityRetrieveResponseRelationship]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record’s role with :asSource or :asDestination, for example ?parent:asSource[contains]=account_id.

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.

Directions OpportunityRetrieveResponseRelationshipDirectionsOptional

Directional values for a self-referential relationship. List filters use the relationship key with :asSource or :asDestination; writes continue to use the bare key.

AsDestination OpportunityRetrieveResponseRelationshipDirectionsAsDestination

The current record is the destination (incoming) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityRetrieveResponseRelationshipDirectionsAsDestinationCardinalityHasOne OpportunityRetrieveResponseRelationshipDirectionsAsDestinationCardinality = "HAS_ONE"
const OpportunityRetrieveResponseRelationshipDirectionsAsDestinationCardinalityHasMany OpportunityRetrieveResponseRelationshipDirectionsAsDestinationCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

AsSource OpportunityRetrieveResponseRelationshipDirectionsAsSource

The current record is the source (outgoing) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityRetrieveResponseRelationshipDirectionsAsSourceCardinalityHasOne OpportunityRetrieveResponseRelationshipDirectionsAsSourceCardinality = "HAS_ONE"
const OpportunityRetrieveResponseRelationshipDirectionsAsSourceCardinalityHasMany OpportunityRetrieveResponseRelationshipDirectionsAsSourceCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

UpdatedAt string

ISO 8601 timestamp of when the entity was last updated, or null.

ExternalID stringOptional

External identifier for the entity, or null if unset.

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.

One of the following:
string
float64
bool
type OpportunityUpdateResponseFieldValueArray []string
type OpportunityUpdateResponseFieldValueAddress 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 OpportunityUpdateResponseFieldValueFullName 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 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"
const OpportunityUpdateResponseFieldValueTypeHTML OpportunityUpdateResponseFieldValueType = "HTML"
Relationships map[string, OpportunityUpdateResponseRelationship]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact). A self-referential relationship keeps its merged values and includes optional directional values. List filters select the current record’s role with :asSource or :asDestination, for example ?parent:asSource[contains]=account_id.

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.

Directions OpportunityUpdateResponseRelationshipDirectionsOptional

Directional values for a self-referential relationship. List filters use the relationship key with :asSource or :asDestination; writes continue to use the bare key.

AsDestination OpportunityUpdateResponseRelationshipDirectionsAsDestination

The current record is the destination (incoming) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityUpdateResponseRelationshipDirectionsAsDestinationCardinalityHasOne OpportunityUpdateResponseRelationshipDirectionsAsDestinationCardinality = "HAS_ONE"
const OpportunityUpdateResponseRelationshipDirectionsAsDestinationCardinalityHasMany OpportunityUpdateResponseRelationshipDirectionsAsDestinationCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

AsSource OpportunityUpdateResponseRelationshipDirectionsAsSource

The current record is the source (outgoing) endpoint.

Cardinality string

Whether this endpoint direction is HAS_ONE or HAS_MANY.

One of the following:
const OpportunityUpdateResponseRelationshipDirectionsAsSourceCardinalityHasOne OpportunityUpdateResponseRelationshipDirectionsAsSourceCardinality = "HAS_ONE"
const OpportunityUpdateResponseRelationshipDirectionsAsSourceCardinalityHasMany OpportunityUpdateResponseRelationshipDirectionsAsSourceCardinality = "HAS_MANY"
Values []string

IDs of the related entities in this direction.

UpdatedAt string

ISO 8601 timestamp of when the entity was last updated, or null.

ExternalID stringOptional

External identifier for the entity, or null if unset.