Skip to content

List opportunities

opportunity.list(OpportunityListParams**kwargs) -> OpportunityListResponse
GET/v1/opportunities

Returns a paginated list of opportunities. Use offset and limit to paginate through results. See List endpoints for more information about pagination.

Required scope: opportunities:read

Rate limit category: Search

ParametersExpand Collapse
limit: Optional[int]

Maximum number of records to return. Defaults to 25, maximum 25.

minimum1
maximum25
offset: Optional[int]

Number of records to skip for pagination. Defaults to 0.

minimum0
maximum9007199254740991
ReturnsExpand Collapse
class OpportunityListResponse:
data: List[Data]

Array of entity objects for the current page.

id: str

Unique identifier for the entity.

created_at: str

ISO 8601 timestamp of when the entity was created.

fields: Dict[str, DataFields]

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

value: Union[str, float, bool, 3 more]

The field value, or null if unset.

Accepts one of the following:
str
float
bool
List[Union[str, float, bool, 3 more]]
Accepts one of the following:
str
float
bool
List[Optional[object]]
Dict[str, object]
Dict[str, Union[str, float, bool, 3 more]]
Accepts one of the following:
str
float
bool
List[Optional[object]]
Dict[str, object]
value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 11 more]

The data type of the field.

Accepts one of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
relationships: Dict[str, DataRelationships]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact).

cardinality: str

Whether the relationship is has_one or has_many.

object_type: str

The type of the related object (e.g. account, contact).

values: List[str]

IDs of the related entities.

object: str

The object type, always "list".

total_count: int

Total number of entities matching the query.

minimum0
maximum9007199254740991

List opportunities

from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
opportunity_list_response = client.opportunity.list()
print(opportunity_list_response.data)
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "foo": {
          "value": "string",
          "valueType": "ADDRESS"
        }
      },
      "httpLink": "httpLink",
      "relationships": {
        "foo": {
          "cardinality": "cardinality",
          "objectType": "objectType",
          "values": [
            "string"
          ]
        }
      }
    }
  ],
  "object": "object",
  "totalCount": 0
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "foo": {
          "value": "string",
          "valueType": "ADDRESS"
        }
      },
      "httpLink": "httpLink",
      "relationships": {
        "foo": {
          "cardinality": "cardinality",
          "objectType": "objectType",
          "values": [
            "string"
          ]
        }
      }
    }
  ],
  "object": "object",
  "totalCount": 0
}