# Object

## Create a custom object record

`object.create(strentity_slug, ObjectCreateParams**kwargs)  -> ObjectCreateResponse`

**post** `/v1/objects/{entitySlug}/values`

Creates a new record for the specified custom object type.

Read definitions for the object type’s configured `$pipeline` and `$stage` fields and options. See <u>[Pipelines and stages](/using-the-api/fields-and-relationships/#pipelines-and-stages)</u> for write rules.

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `fields: Dict[str, Optional[Fields]]`

  Field names to values for the new record.

  - `str`

  - `float`

  - `bool`

  - `Sequence[str]`

  - `class FieldsAddress: …`

    - `city: Optional[str]`

      City name.

    - `country: Optional[str]`

      2-letter ISO 3166-1 alpha-2 country code.

    - `latitude: Optional[float]`

      Latitude coordinate.

    - `longitude: Optional[float]`

      Longitude coordinate.

    - `postal_code: Optional[str]`

      Postal or ZIP code.

    - `state: Optional[str]`

      State or province.

    - `street: Optional[str]`

      Street address line 1.

    - `street2: Optional[str]`

      Street address line 2.

  - `class FieldsFullName: …`

    - `first_name: Optional[str]`

      The contact's first name.

    - `last_name: Optional[str]`

      The contact's last name.

- `relationships: Optional[Dict[str, Union[str, Sequence[str]]]]`

  Relationship names to entity ID(s) to associate.

  - `str`

  - `Sequence[str]`

### Returns

- `class ObjectCreateResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_create_response = client.object.create(
    entity_slug="entitySlug",
    fields={
        "foo": "string"
    },
)
print(object_create_response.id)
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Get a custom object record

`object.retrieve(strid, ObjectRetrieveParams**kwargs)  -> ObjectRetrieveResponse`

**get** `/v1/objects/{entitySlug}/values/{id}`

Retrieves a single record by ID for the specified custom object type. A record you may see by name only is returned as `{ id, restricted: { name, reason } }`, with no `fields` or `relationships`; check for `restricted` before reading them.

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `id: str`

  The ID of the record to retrieve.

### Returns

- `ObjectRetrieveResponse`

  - `class Entity: …`

    - `id: str`

      Unique identifier for the entity.

    - `created_at: str`

      ISO 8601 timestamp of when the entity was created.

    - `fields: Dict[str, EntityFields]`

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

      - `value: Optional[EntityFieldsValue]`

        The field value, or null if unset.

        - `str`

        - `float`

        - `bool`

        - `List[str]`

        - `class EntityFieldsValueAddress: …`

          - `city: Optional[str]`

            City name.

          - `country: Optional[str]`

            2-letter ISO 3166-1 alpha-2 country code.

          - `latitude: Optional[float]`

            Latitude coordinate.

          - `longitude: Optional[float]`

            Longitude coordinate.

          - `postal_code: Optional[str]`

            Postal or ZIP code.

          - `state: Optional[str]`

            State or province.

          - `street: Optional[str]`

            Street address line 1.

          - `street2: Optional[str]`

            Street address line 2.

        - `class EntityFieldsValueFullName: …`

          - `first_name: Optional[str]`

            The contact's first name.

          - `last_name: Optional[str]`

            The contact's last name.

      - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

        The data type of the field.

        - `"ADDRESS"`

        - `"CHECKBOX"`

        - `"CURRENCY"`

        - `"DATE"`

        - `"DATETIME"`

        - `"EMAIL"`

        - `"FULL_NAME"`

        - `"MARKDOWN"`

        - `"MULTI_SELECT"`

        - `"NUMBER"`

        - `"SINGLE_SELECT"`

        - `"SOCIAL_HANDLE"`

        - `"TELEPHONE"`

        - `"TEXT"`

        - `"URL"`

        - `"HTML"`

    - `http_link: Optional[str]`

      URL to view the entity in the Lightfield web app, or null.

    - `relationships: Dict[str, EntityRelationships]`

      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: 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.

      - `directions: Optional[EntityRelationshipsDirections]`

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

        - `as_destination: EntityRelationshipsDirectionsAsDestination`

          The current record is the destination (incoming) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

        - `as_source: EntityRelationshipsDirectionsAsSource`

          The current record is the source (outgoing) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

    - `updated_at: Optional[str]`

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

    - `external_id: Optional[str]`

      External identifier for the entity, or null if unset.

  - `class Restricted: …`

    - `id: str`

      Unique identifier for the record, the same ID a full response carries.

    - `restricted: RestrictedRestricted`

      Present only on a record the caller may know exists but not read. Check for it before reading `fields` or `relationships`, which a restricted record does not carry.

      - `name: str`

        A label for the record's type, such as "Restricted opportunity". Never the record's name.

      - `reason: Literal["NO_ACCESS", "INHERITED"]`

        Why the record is restricted.

        - `"NO_ACCESS"`

        - `"INHERITED"`

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_retrieve_response = client.object.retrieve(
    id="id",
    entity_slug="entitySlug",
)
print(object_retrieve_response)
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Update a custom object record

`object.update(strid, ObjectUpdateParams**kwargs)  -> ObjectUpdateResponse`

**post** `/v1/objects/{entitySlug}/values/{id}`

Updates an existing record by ID for the specified custom object type. Only included fields and relationships are modified.

Read definitions for the object type’s configured `$pipeline` and `$stage` fields and options. See <u>[Pipelines and stages](/using-the-api/fields-and-relationships/#pipelines-and-stages)</u> for write rules.

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `id: str`

  The ID of the record to update.

- `fields: Optional[Dict[str, Optional[Fields]]]`

  Field names to values. Only provided fields are modified.

  - `str`

  - `float`

  - `bool`

  - `Sequence[str]`

  - `class FieldsAddress: …`

    - `city: Optional[str]`

      City name.

    - `country: Optional[str]`

      2-letter ISO 3166-1 alpha-2 country code.

    - `latitude: Optional[float]`

      Latitude coordinate.

    - `longitude: Optional[float]`

      Longitude coordinate.

    - `postal_code: Optional[str]`

      Postal or ZIP code.

    - `state: Optional[str]`

      State or province.

    - `street: Optional[str]`

      Street address line 1.

    - `street2: Optional[str]`

      Street address line 2.

  - `class FieldsFullName: …`

    - `first_name: Optional[str]`

      The contact's first name.

    - `last_name: Optional[str]`

      The contact's last name.

- `relationships: Optional[Dict[str, Relationships]]`

  Relationship names to operations (`add`, `remove`, or `replace`).

  - `add: Optional[Union[str, Sequence[str]]]`

    Entity ID(s) to add to the relationship.

    - `str`

    - `Sequence[str]`

  - `remove: Optional[Union[str, Sequence[str]]]`

    Entity ID(s) to remove from the relationship.

    - `str`

    - `Sequence[str]`

  - `replace: Optional[str]`

    The entity ID to set as the relationship replacement, or null to clear supported relationships.

### Returns

- `class ObjectUpdateResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_update_response = client.object.update(
    id="id",
    entity_slug="entitySlug",
)
print(object_update_response.id)
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Delete a custom object record

`object.delete(strid, ObjectDeleteParams**kwargs)  -> ObjectDeleteResponse`

**delete** `/v1/objects/{entitySlug}/values/{id}`

Moves a custom object record to the trash. The record is soft-deleted and may be restored with `POST /v1/objects/{entitySlug}/values/{id}/restore`.

Calling delete on an already-trashed record is a no-op and returns the existing record.

**[Required scope](/using-the-api/scopes/):** `custom_objects:delete`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `id: str`

  The ID of the record to delete.

- `body: Optional[Body]`

### Returns

- `class ObjectDeleteResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_delete_response = client.object.delete(
    id="id",
    entity_slug="entitySlug",
)
print(object_delete_response.id)
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## Restore a custom object record

`object.restore(strid, ObjectRestoreParams**kwargs)  -> ObjectRestoreResponse`

**post** `/v1/objects/{entitySlug}/values/{id}/restore`

Restores a trashed custom object record, bringing it back to active.

Calling restore on a record that is not trashed is a no-op and returns the existing record. A record of a different custom object type than `entitySlug` is reported as not found.

**[Required scope](/using-the-api/scopes/):** `custom_objects:restore`

**[Rate limit category](/using-the-api/rate-limits/):** Write

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `id: str`

  The ID of the record to restore.

- `body: Optional[Body]`

### Returns

- `class ObjectRestoreResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_restore_response = client.object.restore(
    id="id",
    entity_slug="entitySlug",
)
print(object_restore_response.id)
```

#### Response

```json
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ],
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "values": [
            "string"
          ]
        }
      }
    }
  },
  "updatedAt": "updatedAt",
  "externalId": "externalId"
}
```

## List custom object records

`object.list(strentity_slug, ObjectListParams**kwargs)  -> ObjectListResponse`

**get** `/v1/objects/{entitySlug}`

Returns a paginated list of records for the specified custom object type. Results are sorted by when the record was created in Lightfield (`createdAt`), newest first. Each page holds only the records you can currently read, so a page can contain fewer records than `limit`, or none, while more remain, and `totalCount` can include records you can no longer read. To read every record, keep advancing `offset` by `limit` until it reaches `totalCount`; do not stop at a short or empty page. Use `offset` and `limit` to paginate through results, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `limit: Optional[int]`

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

- `offset: Optional[int]`

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

### Returns

- `class ObjectListResponse: …`

  - `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: Optional[DataFieldsValue]`

        The field value, or null if unset.

        - `str`

        - `float`

        - `bool`

        - `List[str]`

        - `class DataFieldsValueAddress: …`

          - `city: Optional[str]`

            City name.

          - `country: Optional[str]`

            2-letter ISO 3166-1 alpha-2 country code.

          - `latitude: Optional[float]`

            Latitude coordinate.

          - `longitude: Optional[float]`

            Longitude coordinate.

          - `postal_code: Optional[str]`

            Postal or ZIP code.

          - `state: Optional[str]`

            State or province.

          - `street: Optional[str]`

            Street address line 1.

          - `street2: Optional[str]`

            Street address line 2.

        - `class DataFieldsValueFullName: …`

          - `first_name: Optional[str]`

            The contact's first name.

          - `last_name: Optional[str]`

            The contact's last name.

      - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

        The data type of the field.

        - `"ADDRESS"`

        - `"CHECKBOX"`

        - `"CURRENCY"`

        - `"DATE"`

        - `"DATETIME"`

        - `"EMAIL"`

        - `"FULL_NAME"`

        - `"MARKDOWN"`

        - `"MULTI_SELECT"`

        - `"NUMBER"`

        - `"SINGLE_SELECT"`

        - `"SOCIAL_HANDLE"`

        - `"TELEPHONE"`

        - `"TEXT"`

        - `"URL"`

        - `"HTML"`

    - `http_link: Optional[str]`

      URL to view the entity in the Lightfield web app, or null.

    - `relationships: Dict[str, DataRelationships]`

      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: 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.

      - `directions: Optional[DataRelationshipsDirections]`

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

        - `as_destination: DataRelationshipsDirectionsAsDestination`

          The current record is the destination (incoming) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

        - `as_source: DataRelationshipsDirectionsAsSource`

          The current record is the source (outgoing) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

    - `updated_at: Optional[str]`

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

    - `external_id: Optional[str]`

      External identifier for the entity, or null if unset.

  - `object: str`

    The object type, always `"list"`.

  - `total_count: int`

    Total number of entities matching the query.

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_list_response = client.object.list(
    entity_slug="entitySlug",
)
print(object_list_response.data)
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "foo": {
          "value": "string",
          "valueType": "ADDRESS"
        }
      },
      "httpLink": "httpLink",
      "relationships": {
        "foo": {
          "cardinality": "cardinality",
          "objectType": "objectType",
          "values": [
            "string"
          ],
          "directions": {
            "asDestination": {
              "cardinality": "HAS_ONE",
              "values": [
                "string"
              ]
            },
            "asSource": {
              "cardinality": "HAS_ONE",
              "values": [
                "string"
              ]
            }
          }
        }
      },
      "updatedAt": "updatedAt",
      "externalId": "externalId"
    }
  ],
  "object": "object",
  "totalCount": 0
}
```

## Get definitions for a custom object type

`object.definitions(strentity_slug, ObjectDefinitionsParams**kwargs)  -> ObjectDefinitionsResponse`

**get** `/v1/objects/{entitySlug}/definitions`

Returns field and relationship definitions for the specified custom object type.

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `include_archived: Optional[bool]`

  Include archived field and relationship definitions. Defaults to false.

### Returns

- `class ObjectDefinitionsResponse: …`

  - `field_definitions: Dict[str, FieldDefinitions]`

    Map of field keys to their definitions, including both system and custom fields.

    - `archived: bool`

      Whether the field definition is archived.

    - `archived_at: Optional[datetime]`

      When the field definition was archived, or null if active.

    - `description: Optional[str]`

      Description of the field, or null.

    - `label: str`

      Human-readable display name of the field.

    - `type_configuration: FieldDefinitionsTypeConfiguration`

      Type-specific configuration (e.g. select options, currency code). A key the field type does not support is absent; a supported key with nothing set is null.

      - `currency: Optional[str]`

        ISO 4217 3-letter currency code. Present on `CURRENCY` fields, absent on every other type.

      - `decimal_places: Optional[int]`

        Number of decimal places values carry, or null when none is set. Present on `NUMBER` and `CURRENCY` fields, absent on every other type.

      - `handle_service: Optional[Literal["TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM"]]`

        Social platform associated with this handle field, or null when none is set. Present on `SOCIAL_HANDLE` fields, absent on every other type.

        - `"TWITTER"`

        - `"LINKEDIN"`

        - `"FACEBOOK"`

        - `"INSTAGRAM"`

      - `multiple_values: Optional[bool]`

        Whether this field accepts multiple values. Present on `EMAIL`, `TELEPHONE` and `URL` fields, absent on every other type.

      - `options: Optional[List[FieldDefinitionsTypeConfigurationOption]]`

        Available options. Always present on `SINGLE_SELECT` and `MULTI_SELECT` fields, as an empty list when there are none. Absent on every other type.

        - `id: str`

          Unique identifier of the select option.

        - `label: str`

          Human-readable display name of the option.

        - `category: Optional[Literal["ACTIVE", "COMPLETED"]]`

          Lifecycle group of the option, in-progress (`ACTIVE`) or done (`COMPLETED`), or null when none is set. Absent on selects whose options are not grouped.

          - `"ACTIVE"`

          - `"COMPLETED"`

        - `color: Optional[Literal["RED", "ORANGE", "YELLOW", 7 more]]`

          Color the option is displayed in, `GRAY` when none was chosen. Absent on selects whose options take no color.

          - `"RED"`

          - `"ORANGE"`

          - `"YELLOW"`

          - `"LIME"`

          - `"GREEN"`

          - `"BLUE"`

          - `"INDIGO"`

          - `"PURPLE"`

          - `"COPPER"`

          - `"GRAY"`

        - `description: Optional[str]`

          Description of the option, or null.

        - `forecast_percentage: Optional[float]`

          Forecast weighting of the option from 0 to 100, or null when none is set. Absent on selects whose options take no forecast.

        - `icon: Optional[Literal["BACKLOG", "QUALIFICATION", "DISCOVERY", 4 more]]`

          Icon the option is displayed with, or null when none is set. Present only on $stage.

          - `"BACKLOG"`

          - `"QUALIFICATION"`

          - `"DISCOVERY"`

          - `"ACTIVE"`

          - `"NEGOTIATION"`

          - `"CLOSED_WON"`

          - `"CLOSED_LOST"`

        - `parent_id: Optional[str]`

          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.

      - `parent_field_key: Optional[str]`

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

      - `unique: Optional[bool]`

        Whether values for this field must be unique, or null when not set. Present on `EMAIL`, `TELEPHONE`, `URL` and `SOCIAL_HANDLE` fields, absent on every other type.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      Data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

    - `id: Optional[str]`

      Unique identifier of the field definition.

    - `ai_fillable: Optional[Literal["ON", "OFF", "SUGGEST"]]`

      Whether AI fills this field automatically (`ON`), only suggests values (`SUGGEST`), or leaves it alone (`OFF`). Absent on built-in fields that have no `id`.

      - `"ON"`

      - `"OFF"`

      - `"SUGGEST"`

    - `ai_fillable_prompt: Optional[str]`

      Instructions AI follows when filling this field, or null when none are set. Absent on built-in fields that have no `id`.

    - `formula: Optional[str]`

      Formula a calculated field evaluates, with fields and relationships referenced by key. Null for fields that are not calculated. Absent on built-in fields that have no `id`.

    - `read_only: Optional[bool]`

      `true` for fields that are not writable via the API (e.g. AI-generated summaries, calculated fields). `false` or absent for writable fields.

    - `value_source: Optional[Literal["MANUAL", "COMPUTED"]]`

      Whether values are entered (`MANUAL`) or calculated from a formula (`COMPUTED`). Absent on built-in fields that have no `id`.

      - `"MANUAL"`

      - `"COMPUTED"`

  - `object_type: str`

    The object type these definitions belong to (e.g. `account`).

  - `relationship_definitions: Dict[str, RelationshipDefinitions]`

    Map of relationship keys to their definitions. Self-referential relationships include optional directional metadata on the bare definition.

    - `archived: bool`

      Whether the relationship definition is archived.

    - `archived_at: Optional[datetime]`

      When the relationship definition was archived, or null if active.

    - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

      Whether this is a `has_one` or `has_many` relationship.

      - `"HAS_ONE"`

      - `"HAS_MANY"`

    - `description: Optional[str]`

      Description of the relationship, or null.

    - `label: str`

      Human-readable display name of the relationship, as it reads from this object type.

    - `object_type: str`

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

    - `id: Optional[str]`

      Unique identifier of the relationship definition.

    - `directions: Optional[RelationshipDefinitionsDirections]`

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

      - `as_destination: RelationshipDefinitionsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: str`

          Human-readable display name for this endpoint direction.

      - `as_source: RelationshipDefinitionsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: str`

          Human-readable display name for this endpoint direction.

    - `group_key: Optional[str]`

      Key of the relationship group this relationship belongs to, as listed under `relationshipGroupDefinitions`. Absent when the relationship is not in a group.

    - `inverse: Optional[RelationshipDefinitionsInverse]`

      How the same relationship reads from the related object type.

      - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

        Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

        - `"HAS_ONE"`

        - `"HAS_MANY"`

      - `label: str`

        Human-readable display name for this endpoint direction.

  - `relationship_group_definitions: Dict[str, RelationshipGroupDefinitions]`

    Map of relationship group keys to their definitions. A group collects relationships between the same two object types, such as the roles a contact can hold on an opportunity. Relationships name their group with `groupKey`.

    - `id: str`

      Unique identifier of the relationship group.

    - `archived: bool`

      Whether the relationship group is archived.

    - `archived_at: Optional[datetime]`

      When the relationship group was archived, or null if active.

    - `inverse: RelationshipGroupDefinitionsInverse`

      How the same group reads from the related object type.

      - `label: str`

        Human-readable display name of the group, as it reads from the related object type.

    - `label: str`

      Human-readable display name of the group, as it reads from this object type.

    - `object_type: str`

      The type of the related object every relationship in the group points to.

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_definitions_response = client.object.definitions(
    entity_slug="entitySlug",
)
print(object_definitions_response.field_definitions)
```

#### Response

```json
{
  "fieldDefinitions": {
    "foo": {
      "archived": true,
      "archivedAt": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "label": "label",
      "typeConfiguration": {
        "currency": "currency",
        "decimalPlaces": -9007199254740991,
        "handleService": "TWITTER",
        "multipleValues": true,
        "options": [
          {
            "id": "id",
            "label": "label",
            "category": "ACTIVE",
            "color": "RED",
            "description": "description",
            "forecastPercentage": 0,
            "icon": "BACKLOG",
            "parentId": "parentId"
          }
        ],
        "parentFieldKey": "parentFieldKey",
        "unique": true
      },
      "valueType": "ADDRESS",
      "id": "id",
      "aiFillable": "ON",
      "aiFillablePrompt": "aiFillablePrompt",
      "formula": "formula",
      "readOnly": true,
      "valueSource": "MANUAL"
    }
  },
  "objectType": "objectType",
  "relationshipDefinitions": {
    "foo": {
      "archived": true,
      "archivedAt": "2019-12-27T18:11:19.117Z",
      "cardinality": "HAS_ONE",
      "description": "description",
      "label": "label",
      "objectType": "objectType",
      "id": "id",
      "directions": {
        "asDestination": {
          "cardinality": "HAS_ONE",
          "label": "label"
        },
        "asSource": {
          "cardinality": "HAS_ONE",
          "label": "label"
        }
      },
      "groupKey": "groupKey",
      "inverse": {
        "cardinality": "HAS_ONE",
        "label": "label"
      }
    }
  },
  "relationshipGroupDefinitions": {
    "foo": {
      "id": "id",
      "archived": true,
      "archivedAt": "2019-12-27T18:11:19.117Z",
      "inverse": {
        "label": "label"
      },
      "label": "label",
      "objectType": "objectType"
    }
  }
}
```

## List custom object types

`object.list_definitions()  -> ObjectListDefinitionsResponse`

**get** `/v1/objects`

Returns all custom object types available to the caller, sorted alphabetically by `objectType`.

### Returns

- `class ObjectListDefinitionsResponse: …`

  - `data: List[Data]`

    All object types available to the caller.

    - `label: str`

      Human-readable display name.

    - `object_type: str`

      The slug used to reference this object type in the API.

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_list_definitions_response = client.object.list_definitions()
print(object_list_definitions_response.data)
```

#### Response

```json
{
  "data": [
    {
      "label": "label",
      "objectType": "objectType"
    }
  ]
}
```

## Get field value history for a custom object record

`object.field_history(strfield_key, ObjectFieldHistoryParams**kwargs)  -> ObjectFieldHistoryResponse`

**get** `/v1/objects/{entitySlug}/values/{id}/fields/{fieldKey}/history`

Returns the value-change history for a single field on a record, newest first. Consecutive identical values are collapsed. History is cursor-paginated: pass `nextCursor` from the previous response as `after` to page through older values. Only attribute-backed fields (custom attributes and attribute-backed system fields) have history — column-backed system fields return an error. A record you may see by name only has no visible history and returns 404, like a record that does not exist.

**[Required scope](/using-the-api/scopes/):** `custom_objects:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Parameters

- `entity_slug: str`

  The slug of the custom object type.

- `id: str`

  Unique identifier of the record.

- `field_key: str`

  Field key whose value history to return. System fields use a `$` prefix (e.g. `$status`); custom attributes use their bare slug.

- `after: Optional[str]`

  Cursor from a previous response’s `nextCursor` to fetch the next page.

- `limit: Optional[int]`

  Maximum number of history entries to return. Defaults to 20, maximum 100.

### Returns

- `class ObjectFieldHistoryResponse: …`

  - `data: List[Data]`

    Recorded values for the field, newest first.

    - `display_value: str`

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

    - `is_create: bool`

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

    - `recorded_at: str`

      ISO 8601 timestamp of when this value was recorded.

    - `value: Optional[DataValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class DataValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class DataValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `has_more: bool`

    Whether more history exists beyond this page.

  - `next_cursor: Optional[str]`

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

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
object_field_history_response = client.object.field_history(
    field_key="fieldKey",
    entity_slug="entitySlug",
    id="id",
)
print(object_field_history_response.data)
```

#### Response

```json
{
  "data": [
    {
      "displayValue": "displayValue",
      "isCreate": true,
      "recordedAt": "recordedAt",
      "value": "string",
      "valueType": "ADDRESS"
    }
  ],
  "hasMore": true,
  "nextCursor": "nextCursor"
}
```

## Domain Types

### Object Create Response

- `class ObjectCreateResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.

### Object Definitions Response

- `class ObjectDefinitionsResponse: …`

  - `field_definitions: Dict[str, FieldDefinitions]`

    Map of field keys to their definitions, including both system and custom fields.

    - `archived: bool`

      Whether the field definition is archived.

    - `archived_at: Optional[datetime]`

      When the field definition was archived, or null if active.

    - `description: Optional[str]`

      Description of the field, or null.

    - `label: str`

      Human-readable display name of the field.

    - `type_configuration: FieldDefinitionsTypeConfiguration`

      Type-specific configuration (e.g. select options, currency code). A key the field type does not support is absent; a supported key with nothing set is null.

      - `currency: Optional[str]`

        ISO 4217 3-letter currency code. Present on `CURRENCY` fields, absent on every other type.

      - `decimal_places: Optional[int]`

        Number of decimal places values carry, or null when none is set. Present on `NUMBER` and `CURRENCY` fields, absent on every other type.

      - `handle_service: Optional[Literal["TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM"]]`

        Social platform associated with this handle field, or null when none is set. Present on `SOCIAL_HANDLE` fields, absent on every other type.

        - `"TWITTER"`

        - `"LINKEDIN"`

        - `"FACEBOOK"`

        - `"INSTAGRAM"`

      - `multiple_values: Optional[bool]`

        Whether this field accepts multiple values. Present on `EMAIL`, `TELEPHONE` and `URL` fields, absent on every other type.

      - `options: Optional[List[FieldDefinitionsTypeConfigurationOption]]`

        Available options. Always present on `SINGLE_SELECT` and `MULTI_SELECT` fields, as an empty list when there are none. Absent on every other type.

        - `id: str`

          Unique identifier of the select option.

        - `label: str`

          Human-readable display name of the option.

        - `category: Optional[Literal["ACTIVE", "COMPLETED"]]`

          Lifecycle group of the option, in-progress (`ACTIVE`) or done (`COMPLETED`), or null when none is set. Absent on selects whose options are not grouped.

          - `"ACTIVE"`

          - `"COMPLETED"`

        - `color: Optional[Literal["RED", "ORANGE", "YELLOW", 7 more]]`

          Color the option is displayed in, `GRAY` when none was chosen. Absent on selects whose options take no color.

          - `"RED"`

          - `"ORANGE"`

          - `"YELLOW"`

          - `"LIME"`

          - `"GREEN"`

          - `"BLUE"`

          - `"INDIGO"`

          - `"PURPLE"`

          - `"COPPER"`

          - `"GRAY"`

        - `description: Optional[str]`

          Description of the option, or null.

        - `forecast_percentage: Optional[float]`

          Forecast weighting of the option from 0 to 100, or null when none is set. Absent on selects whose options take no forecast.

        - `icon: Optional[Literal["BACKLOG", "QUALIFICATION", "DISCOVERY", 4 more]]`

          Icon the option is displayed with, or null when none is set. Present only on $stage.

          - `"BACKLOG"`

          - `"QUALIFICATION"`

          - `"DISCOVERY"`

          - `"ACTIVE"`

          - `"NEGOTIATION"`

          - `"CLOSED_WON"`

          - `"CLOSED_LOST"`

        - `parent_id: Optional[str]`

          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.

      - `parent_field_key: Optional[str]`

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

      - `unique: Optional[bool]`

        Whether values for this field must be unique, or null when not set. Present on `EMAIL`, `TELEPHONE`, `URL` and `SOCIAL_HANDLE` fields, absent on every other type.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      Data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

    - `id: Optional[str]`

      Unique identifier of the field definition.

    - `ai_fillable: Optional[Literal["ON", "OFF", "SUGGEST"]]`

      Whether AI fills this field automatically (`ON`), only suggests values (`SUGGEST`), or leaves it alone (`OFF`). Absent on built-in fields that have no `id`.

      - `"ON"`

      - `"OFF"`

      - `"SUGGEST"`

    - `ai_fillable_prompt: Optional[str]`

      Instructions AI follows when filling this field, or null when none are set. Absent on built-in fields that have no `id`.

    - `formula: Optional[str]`

      Formula a calculated field evaluates, with fields and relationships referenced by key. Null for fields that are not calculated. Absent on built-in fields that have no `id`.

    - `read_only: Optional[bool]`

      `true` for fields that are not writable via the API (e.g. AI-generated summaries, calculated fields). `false` or absent for writable fields.

    - `value_source: Optional[Literal["MANUAL", "COMPUTED"]]`

      Whether values are entered (`MANUAL`) or calculated from a formula (`COMPUTED`). Absent on built-in fields that have no `id`.

      - `"MANUAL"`

      - `"COMPUTED"`

  - `object_type: str`

    The object type these definitions belong to (e.g. `account`).

  - `relationship_definitions: Dict[str, RelationshipDefinitions]`

    Map of relationship keys to their definitions. Self-referential relationships include optional directional metadata on the bare definition.

    - `archived: bool`

      Whether the relationship definition is archived.

    - `archived_at: Optional[datetime]`

      When the relationship definition was archived, or null if active.

    - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

      Whether this is a `has_one` or `has_many` relationship.

      - `"HAS_ONE"`

      - `"HAS_MANY"`

    - `description: Optional[str]`

      Description of the relationship, or null.

    - `label: str`

      Human-readable display name of the relationship, as it reads from this object type.

    - `object_type: str`

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

    - `id: Optional[str]`

      Unique identifier of the relationship definition.

    - `directions: Optional[RelationshipDefinitionsDirections]`

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

      - `as_destination: RelationshipDefinitionsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: str`

          Human-readable display name for this endpoint direction.

      - `as_source: RelationshipDefinitionsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `label: str`

          Human-readable display name for this endpoint direction.

    - `group_key: Optional[str]`

      Key of the relationship group this relationship belongs to, as listed under `relationshipGroupDefinitions`. Absent when the relationship is not in a group.

    - `inverse: Optional[RelationshipDefinitionsInverse]`

      How the same relationship reads from the related object type.

      - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

        Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

        - `"HAS_ONE"`

        - `"HAS_MANY"`

      - `label: str`

        Human-readable display name for this endpoint direction.

  - `relationship_group_definitions: Dict[str, RelationshipGroupDefinitions]`

    Map of relationship group keys to their definitions. A group collects relationships between the same two object types, such as the roles a contact can hold on an opportunity. Relationships name their group with `groupKey`.

    - `id: str`

      Unique identifier of the relationship group.

    - `archived: bool`

      Whether the relationship group is archived.

    - `archived_at: Optional[datetime]`

      When the relationship group was archived, or null if active.

    - `inverse: RelationshipGroupDefinitionsInverse`

      How the same group reads from the related object type.

      - `label: str`

        Human-readable display name of the group, as it reads from the related object type.

    - `label: str`

      Human-readable display name of the group, as it reads from this object type.

    - `object_type: str`

      The type of the related object every relationship in the group points to.

### Object Delete Response

- `class ObjectDeleteResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.

### Object Field History Response

- `class ObjectFieldHistoryResponse: …`

  - `data: List[Data]`

    Recorded values for the field, newest first.

    - `display_value: str`

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

    - `is_create: bool`

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

    - `recorded_at: str`

      ISO 8601 timestamp of when this value was recorded.

    - `value: Optional[DataValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class DataValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class DataValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `has_more: bool`

    Whether more history exists beyond this page.

  - `next_cursor: Optional[str]`

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

### Object List Definitions Response

- `class ObjectListDefinitionsResponse: …`

  - `data: List[Data]`

    All object types available to the caller.

    - `label: str`

      Human-readable display name.

    - `object_type: str`

      The slug used to reference this object type in the API.

### Object List Response

- `class ObjectListResponse: …`

  - `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: Optional[DataFieldsValue]`

        The field value, or null if unset.

        - `str`

        - `float`

        - `bool`

        - `List[str]`

        - `class DataFieldsValueAddress: …`

          - `city: Optional[str]`

            City name.

          - `country: Optional[str]`

            2-letter ISO 3166-1 alpha-2 country code.

          - `latitude: Optional[float]`

            Latitude coordinate.

          - `longitude: Optional[float]`

            Longitude coordinate.

          - `postal_code: Optional[str]`

            Postal or ZIP code.

          - `state: Optional[str]`

            State or province.

          - `street: Optional[str]`

            Street address line 1.

          - `street2: Optional[str]`

            Street address line 2.

        - `class DataFieldsValueFullName: …`

          - `first_name: Optional[str]`

            The contact's first name.

          - `last_name: Optional[str]`

            The contact's last name.

      - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

        The data type of the field.

        - `"ADDRESS"`

        - `"CHECKBOX"`

        - `"CURRENCY"`

        - `"DATE"`

        - `"DATETIME"`

        - `"EMAIL"`

        - `"FULL_NAME"`

        - `"MARKDOWN"`

        - `"MULTI_SELECT"`

        - `"NUMBER"`

        - `"SINGLE_SELECT"`

        - `"SOCIAL_HANDLE"`

        - `"TELEPHONE"`

        - `"TEXT"`

        - `"URL"`

        - `"HTML"`

    - `http_link: Optional[str]`

      URL to view the entity in the Lightfield web app, or null.

    - `relationships: Dict[str, DataRelationships]`

      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: 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.

      - `directions: Optional[DataRelationshipsDirections]`

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

        - `as_destination: DataRelationshipsDirectionsAsDestination`

          The current record is the destination (incoming) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

        - `as_source: DataRelationshipsDirectionsAsSource`

          The current record is the source (outgoing) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

    - `updated_at: Optional[str]`

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

    - `external_id: Optional[str]`

      External identifier for the entity, or null if unset.

  - `object: str`

    The object type, always `"list"`.

  - `total_count: int`

    Total number of entities matching the query.

### Object Restore Response

- `class ObjectRestoreResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.

### Object Retrieve Response

- `ObjectRetrieveResponse`

  - `class Entity: …`

    - `id: str`

      Unique identifier for the entity.

    - `created_at: str`

      ISO 8601 timestamp of when the entity was created.

    - `fields: Dict[str, EntityFields]`

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

      - `value: Optional[EntityFieldsValue]`

        The field value, or null if unset.

        - `str`

        - `float`

        - `bool`

        - `List[str]`

        - `class EntityFieldsValueAddress: …`

          - `city: Optional[str]`

            City name.

          - `country: Optional[str]`

            2-letter ISO 3166-1 alpha-2 country code.

          - `latitude: Optional[float]`

            Latitude coordinate.

          - `longitude: Optional[float]`

            Longitude coordinate.

          - `postal_code: Optional[str]`

            Postal or ZIP code.

          - `state: Optional[str]`

            State or province.

          - `street: Optional[str]`

            Street address line 1.

          - `street2: Optional[str]`

            Street address line 2.

        - `class EntityFieldsValueFullName: …`

          - `first_name: Optional[str]`

            The contact's first name.

          - `last_name: Optional[str]`

            The contact's last name.

      - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

        The data type of the field.

        - `"ADDRESS"`

        - `"CHECKBOX"`

        - `"CURRENCY"`

        - `"DATE"`

        - `"DATETIME"`

        - `"EMAIL"`

        - `"FULL_NAME"`

        - `"MARKDOWN"`

        - `"MULTI_SELECT"`

        - `"NUMBER"`

        - `"SINGLE_SELECT"`

        - `"SOCIAL_HANDLE"`

        - `"TELEPHONE"`

        - `"TEXT"`

        - `"URL"`

        - `"HTML"`

    - `http_link: Optional[str]`

      URL to view the entity in the Lightfield web app, or null.

    - `relationships: Dict[str, EntityRelationships]`

      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: 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.

      - `directions: Optional[EntityRelationshipsDirections]`

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

        - `as_destination: EntityRelationshipsDirectionsAsDestination`

          The current record is the destination (incoming) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

        - `as_source: EntityRelationshipsDirectionsAsSource`

          The current record is the source (outgoing) endpoint.

          - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

            Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

            - `"HAS_ONE"`

            - `"HAS_MANY"`

          - `values: List[str]`

            IDs of the related entities in this direction.

    - `updated_at: Optional[str]`

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

    - `external_id: Optional[str]`

      External identifier for the entity, or null if unset.

  - `class Restricted: …`

    - `id: str`

      Unique identifier for the record, the same ID a full response carries.

    - `restricted: RestrictedRestricted`

      Present only on a record the caller may know exists but not read. Check for it before reading `fields` or `relationships`, which a restricted record does not carry.

      - `name: str`

        A label for the record's type, such as "Restricted opportunity". Never the record's name.

      - `reason: Literal["NO_ACCESS", "INHERITED"]`

        Why the record is restricted.

        - `"NO_ACCESS"`

        - `"INHERITED"`

### Object Update Response

- `class ObjectUpdateResponse: …`

  - `id: str`

    Unique identifier for the entity.

  - `created_at: str`

    ISO 8601 timestamp of when the entity was created.

  - `fields: Dict[str, Fields]`

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

    - `value: Optional[FieldsValue]`

      The field value, or null if unset.

      - `str`

      - `float`

      - `bool`

      - `List[str]`

      - `class FieldsValueAddress: …`

        - `city: Optional[str]`

          City name.

        - `country: Optional[str]`

          2-letter ISO 3166-1 alpha-2 country code.

        - `latitude: Optional[float]`

          Latitude coordinate.

        - `longitude: Optional[float]`

          Longitude coordinate.

        - `postal_code: Optional[str]`

          Postal or ZIP code.

        - `state: Optional[str]`

          State or province.

        - `street: Optional[str]`

          Street address line 1.

        - `street2: Optional[str]`

          Street address line 2.

      - `class FieldsValueFullName: …`

        - `first_name: Optional[str]`

          The contact's first name.

        - `last_name: Optional[str]`

          The contact's last name.

    - `value_type: Literal["ADDRESS", "CHECKBOX", "CURRENCY", 13 more]`

      The data type of the field.

      - `"ADDRESS"`

      - `"CHECKBOX"`

      - `"CURRENCY"`

      - `"DATE"`

      - `"DATETIME"`

      - `"EMAIL"`

      - `"FULL_NAME"`

      - `"MARKDOWN"`

      - `"MULTI_SELECT"`

      - `"NUMBER"`

      - `"SINGLE_SELECT"`

      - `"SOCIAL_HANDLE"`

      - `"TELEPHONE"`

      - `"TEXT"`

      - `"URL"`

      - `"HTML"`

  - `http_link: Optional[str]`

    URL to view the entity in the Lightfield web app, or null.

  - `relationships: Dict[str, Relationships]`

    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: 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.

    - `directions: Optional[RelationshipsDirections]`

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

      - `as_destination: RelationshipsDirectionsAsDestination`

        The current record is the destination (incoming) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

      - `as_source: RelationshipsDirectionsAsSource`

        The current record is the source (outgoing) endpoint.

        - `cardinality: Literal["HAS_ONE", "HAS_MANY"]`

          Whether this endpoint direction is `HAS_ONE` or `HAS_MANY`.

          - `"HAS_ONE"`

          - `"HAS_MANY"`

        - `values: List[str]`

          IDs of the related entities in this direction.

  - `updated_at: Optional[str]`

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

  - `external_id: Optional[str]`

    External identifier for the entity, or null if unset.
