> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Contact

> Documentation for the Get Contact action for Spruce

![images/spruce.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/spruce.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=8a74ebc9757cf4bfebab7b5e33a27182)

# Parameters

**Action** `Parameters`

**parameters**

**Contact ID** `string` *required*

`ID`
This field maps to the destination API `id` field.

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "api_url": "https://api.sprucehealth.com/v1/contacts/contact_12345",
    "app_url": "https://app.sprucehealth.com/contacts/contact_12345",
    "can_delete": null,
    "can_edit": null,
    "category": "patient",
    "company_name": "ACME Healthcare",
    "created_at": "2023-11-13T17:42:17Z",
    "custom_contact_fields": [
      {
        "id": "entityCustomField_0E5QDGJC03000",
        "name": "Insurance Provider",
        "value": "Blue Cross Blue Shield"
      }
    ],
    "date_of_birth": "1990-01-15",
    "deleted_contact_ids": [
      "entity_0E5QDGJC03001"
    ],
    "display_name": "John Doe",
    "email_addresses": [
      {
        "id": "entityContact_26RRC7PQ6JG00",
        "label": "primary",
        "value": "john.doe@example.com"
      }
    ],
    "fax_numbers": [
      {
        "display_value": "(555) 123-4567",
        "id": "entityContact_26RRC7PQ6JG00",
        "label": "mobile",
        "value": null
      }
    ],
    "first_name": "John",
    "gender": "male",
    "gender_detail": null,
    "has_account": null,
    "has_pending_invite": null,
    "id": "entity_0E5QDGJC03000",
    "integration_links": [
      {
        "contact_id": "entity_0E5QDGJC03000",
        "external_id": "ext_12345",
        "integration_type": "epic",
        "url": "https://hint.com/patient/100031277"
      }
    ],
    "internal_member_ids": [],
    "last_name": "Doe",
    "middle_name": "Smith",
    "object": "contact",
    "organization_contact_fields": [
      {
        "id": "managedCustomField_0E5QDGJC03000",
        "name": "Patient ID",
        "value": "PT12345"
      }
    ],
    "phone_numbers": [
      {
        "display_value": "(555) 123-4567",
        "id": "entityContact_26RRC7PQ6JG00",
        "label": "mobile",
        "value": null
      }
    ],
    "pronouns": "he/him",
    "tags": [
      {
        "id": "tag_0E5QDGJC03000",
        "value": "high-priority"
      }
    ]
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "api_url": "API URL for this contact.",
    "app_url": "App URL for this contact.",
    "can_delete": "Whether this contact can be deleted.",
    "can_edit": "Whether this contact can be edited.",
    "category": "Contact category.",
    "company_name": "Company name associated with the contact.",
    "created_at": "Timestamp when the contact was created.",
    "custom_contact_fields": {
      "id": "Unique identifier for the custom field.",
      "name": "Name of the custom field.",
      "value": "Value of the custom field."
    },
    "date_of_birth": "Date of birth",
    "deleted_contact_ids": "Prior contact IDs merged into this Contact (note: they are deleted post-merge)",
    "display_name": "Display name for the contact.",
    "email_addresses": {
      "id": "Unique identifier for the email address.",
      "label": "Label for the email address.",
      "value": "Email address value."
    },
    "fax_numbers": {
      "display_value": "Formatted display value for the phone number.",
      "id": "Unique identifier for the phone number.",
      "label": "Label for the phone number.",
      "value": "Phone number value."
    },
    "first_name": "Given name (first name) of the contact.",
    "gender": "Gender of the contact.",
    "gender_detail": "Additional gender details.",
    "has_account": "Whether the contact has a Spruce account.",
    "has_pending_invite": "Whether the contact has a pending invitation to Spruce.",
    "id": "Unique identifier for the contact in the Spruce system.",
    "integration_links": {
      "contact_id": "Contact ID in Spruce.",
      "external_id": "External system identifier.",
      "integration_type": "Type of integration.",
      "url": "URL to the external system."
    },
    "internal_member_ids": "Internal member IDs associated with this contact.",
    "last_name": "Family name (last name) of the contact.",
    "middle_name": "Middle name of the contact.",
    "object": "Object type identifier.",
    "organization_contact_fields": {
      "id": "Unique identifier for the organization field.",
      "name": "Name of the organization field.",
      "value": "Value of the organization field."
    },
    "phone_numbers": {
      "display_value": "Formatted display value for the phone number.",
      "id": "Unique identifier for the phone number.",
      "label": "Label for the phone number.",
      "value": "Phone number value."
    },
    "pronouns": "Preferred pronouns of the contact.",
    "tags": {
      "id": "Unique identifier for the tag.",
      "value": "Tag value."
    }
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**Contact** `Fetch Action Response Object`

**fields**

**id** `string` *required*

`ID` Unique identifier for the contact in the Spruce system.

```json CEL theme={null}
$result_object_key.id
```

```json Example theme={null}
"entity_0E5QDGJC03000"
```

**api\_url** `string`

API URL for this contact.

```json CEL theme={null}
$result_object_key.api_url
```

```json Example theme={null}
"https://api.sprucehealth.com/v1/contacts/contact_12345"
```

**app\_url** `string`

App URL for this contact.

```json CEL theme={null}
$result_object_key.app_url
```

```json Example theme={null}
"https://app.sprucehealth.com/contacts/contact_12345"
```

**can\_delete** `bool` *required*

Whether this contact can be deleted.

```json CEL theme={null}
$result_object_key.can_delete
```

```json Example theme={null}
null
```

**can\_edit** `bool` *required*

Whether this contact can be edited.

```json CEL theme={null}
$result_object_key.can_edit
```

```json Example theme={null}
null
```

**category** `spruce.v1.ContactCategory` *required*

Contact category.

```json CEL theme={null}
$result_object_key.category
```

```json Example theme={null}
spruce.v1.ContactCategory.CONTACT_CATEGORY_PATIENT
spruce.v1.ContactCategory.CONTACT_CATEGORY_PROFESSIONAL
spruce.v1.ContactCategory.CONTACT_CATEGORY_CLINIC
```

**company\_name** `string`

`PII` Company name associated with the contact.

```json CEL theme={null}
$result_object_key.company_name
```

```json Example theme={null}
"ACME Healthcare"
```

**created\_at** `timing.v1.Timestamp` *required*

Timestamp when the contact was created.

```json CEL theme={null}
$result_object_key.created_at
```

```json Example theme={null}
"2023-11-13T17:42:17Z"
```

**custom\_contact\_fields** `[]object` *required*

Custom contact fields defined by the organization.

```json CEL theme={null}
$result_object_key.custom_contact_fields
```

```json Example theme={null}
[
{
"id": "entityCustomField_0E5QDGJC03000",
"name": "Insurance Provider",
"value": "Blue Cross Blue Shield"
}
]
```

**custom\_contact\_fields.map(x, x.id)** `[]string` *required*

`ID` Mapped array of: Unique identifier for the custom field.

```json CEL theme={null}
$result_object_key.custom_contact_fields.map(x, x.id)
```

```json Example theme={null}
[
"entityCustomField_0E5QDGJC03000"
]
```

**custom\_contact\_fields.map(x, x.name)** `[]string` *required*

Mapped array of: Name of the custom field.

```json CEL theme={null}
$result_object_key.custom_contact_fields.map(x, x.name)
```

```json Example theme={null}
[
"Insurance Provider"
]
```

**custom\_contact\_fields.map(x, x.value)** `[]string` *required*

`PII` Mapped array of: Value of the custom field.

```json CEL theme={null}
$result_object_key.custom_contact_fields.map(x, x.value)
```

```json Example theme={null}
[
"Blue Cross Blue Shield"
]
```

**date\_of\_birth** `values.v1.Date`

`HI` Date of birth

```json CEL theme={null}
$result_object_key.date_of_birth
```

```json Example theme={null}
"1990-01-15"
```

**display\_name** `string`

`PII` Display name for the contact.

```json CEL theme={null}
$result_object_key.display_name
```

```json Example theme={null}
"John Doe"
```

**email\_addresses** `[]object` *required*

Email addresses associated with the contact.

```json CEL theme={null}
$result_object_key.email_addresses
```

```json Example theme={null}
[
{
"id": "entityContact_26RRC7PQ6JG00",
"label": "primary",
"value": "john.doe@example.com"
}
]
```

**email\_addresses.map(x, x.id)** `[]string` *required*

`ID` Mapped array of: Unique identifier for the email address.

```json CEL theme={null}
$result_object_key.email_addresses.map(x, x.id)
```

```json Example theme={null}
[
"entityContact_26RRC7PQ6JG00"
]
```

**email\_addresses.map(x, x.label)** `[]string` *required*

Mapped array of: Label for the email address.

```json CEL theme={null}
$result_object_key.email_addresses.map(x, x.label)
```

```json Example theme={null}
[
"primary"
]
```

**email\_addresses.map(x, x.value)** `[]string` *required*

`PII` Mapped array of: Email address value.

```json CEL theme={null}
$result_object_key.email_addresses.map(x, x.value)
```

```json Example theme={null}
[
"john.doe@example.com"
]
```

**last\_name** `string`

`PII` Family name (last name) of the contact.

```json CEL theme={null}
$result_object_key.last_name
```

```json Example theme={null}
"Doe"
```

**fax\_numbers** `[]object` *required*

Fax numbers associated with the contact.

```json CEL theme={null}
$result_object_key.fax_numbers
```

```json Example theme={null}
[
{
"display_value": "(555) 123-4567",
"id": "entityContact_26RRC7PQ6JG00",
"label": "mobile",
"value": null
}
]
```

**fax\_numbers.map(x, x.id)** `[]string` *required*

`ID` Mapped array of: Unique identifier for the phone number.

```json CEL theme={null}
$result_object_key.fax_numbers.map(x, x.id)
```

```json Example theme={null}
[
"entityContact_26RRC7PQ6JG00"
]
```

**fax\_numbers.map(x, x.label)** `[]string` *required*

Mapped array of: Label for the phone number.

```json CEL theme={null}
$result_object_key.fax_numbers.map(x, x.label)
```

```json Example theme={null}
[
"mobile"
]
```

**fax\_numbers.map(x, x.value)** `[]string` *required*

Mapped array of: Phone number value.

```json CEL theme={null}
$result_object_key.fax_numbers.map(x, x.value)
```

```json Example theme={null}
[
null
]
```

**fax\_numbers.map(x, x.display\_value)** `[]string` *required*

Mapped array of: Formatted display value for the phone number.

```json CEL theme={null}
$result_object_key.fax_numbers.map(x, x.display_value)
```

```json Example theme={null}
[
"(555) 123-4567"
]
```

**gender** `string`

`HI` Gender of the contact.

```json CEL theme={null}
$result_object_key.gender
```

```json Example theme={null}
"male"
```

**gender\_detail** `string`

`HI` Additional gender details.

```json CEL theme={null}
$result_object_key.gender_detail
```

```json Example theme={null}
null
```

**first\_name** `string`

`PII` Given name (first name) of the contact.

```json CEL theme={null}
$result_object_key.first_name
```

```json Example theme={null}
"John"
```

**has\_account** `bool` *required*

Whether the contact has a Spruce account.

```json CEL theme={null}
$result_object_key.has_account
```

```json Example theme={null}
null
```

**has\_pending\_invite** `bool` *required*

Whether the contact has a pending invitation to Spruce.

```json CEL theme={null}
$result_object_key.has_pending_invite
```

```json Example theme={null}
null
```

**integration\_links** `[]object` *required*

Links to third-party integrations.

```json CEL theme={null}
$result_object_key.integration_links
```

```json Example theme={null}
[
{
"contact_id": "entity_0E5QDGJC03000",
"external_id": "ext_12345",
"integration_type": "epic",
"url": "https://hint.com/patient/100031277"
}
]
```

**integration\_links.map(x, x.contact\_id)** `[]string` *required*

`ID` Mapped array of: Contact ID in Spruce.

```json CEL theme={null}
$result_object_key.integration_links.map(x, x.contact_id)
```

```json Example theme={null}
[
"entity_0E5QDGJC03000"
]
```

**integration\_links.map(x, x.external\_id)** `[]string` *required*

`ID` Mapped array of: External system identifier.

```json CEL theme={null}
$result_object_key.integration_links.map(x, x.external_id)
```

```json Example theme={null}
[
"ext_12345"
]
```

**integration\_links.map(x, x.integration\_type)** `[]string` *required*

Mapped array of: Type of integration.

```json CEL theme={null}
$result_object_key.integration_links.map(x, x.integration_type)
```

```json Example theme={null}
[
"epic"
]
```

**integration\_links.map(x, x.url)** `[]string` *required*

`ID` `PII` Mapped array of: URL to the external system.

```json CEL theme={null}
$result_object_key.integration_links.map(x, x.url)
```

```json Example theme={null}
[
"https://hint.com/patient/100031277"
]
```

**internal\_member\_ids** `[]string` *required*

`ID` Internal member IDs associated with this contact.

```json CEL theme={null}
$result_object_key.internal_member_ids
```

```json Example theme={null}
[]
```

**middle\_name** `string`

`PII` Middle name of the contact.

```json CEL theme={null}
$result_object_key.middle_name
```

```json Example theme={null}
"Smith"
```

**object** `string` *required*

Object type identifier.

```json CEL theme={null}
$result_object_key.object
```

```json Example theme={null}
"contact"
```

**organization\_contact\_fields** `[]object` *required*

Organization-specific contact fields.

```json CEL theme={null}
$result_object_key.organization_contact_fields
```

```json Example theme={null}
[
{
"id": "managedCustomField_0E5QDGJC03000",
"name": "Patient ID",
"value": "PT12345"
}
]
```

**organization\_contact\_fields.map(x, x.id)** `[]string` *required*

`ID` Mapped array of: Unique identifier for the organization field.

```json CEL theme={null}
$result_object_key.organization_contact_fields.map(x, x.id)
```

```json Example theme={null}
[
"managedCustomField_0E5QDGJC03000"
]
```

**organization\_contact\_fields.map(x, x.name)** `[]string` *required*

Mapped array of: Name of the organization field.

```json CEL theme={null}
$result_object_key.organization_contact_fields.map(x, x.name)
```

```json Example theme={null}
[
"Patient ID"
]
```

**organization\_contact\_fields.map(x, x.value)** `[]string` *required*

`ID` Mapped array of: Value of the organization field.

```json CEL theme={null}
$result_object_key.organization_contact_fields.map(x, x.value)
```

```json Example theme={null}
[
"PT12345"
]
```

**phone\_numbers** `[]object` *required*

Phone numbers associated with the contact.

```json CEL theme={null}
$result_object_key.phone_numbers
```

```json Example theme={null}
[
{
"display_value": "(555) 123-4567",
"id": "entityContact_26RRC7PQ6JG00",
"label": "mobile",
"value": null
}
]
```

**phone\_numbers.map(x, x.id)** `[]string` *required*

`ID` Mapped array of: Unique identifier for the phone number.

```json CEL theme={null}
$result_object_key.phone_numbers.map(x, x.id)
```

```json Example theme={null}
[
"entityContact_26RRC7PQ6JG00"
]
```

**phone\_numbers.map(x, x.label)** `[]string` *required*

Mapped array of: Label for the phone number.

```json CEL theme={null}
$result_object_key.phone_numbers.map(x, x.label)
```

```json Example theme={null}
[
"mobile"
]
```

**phone\_numbers.map(x, x.value)** `[]string` *required*

Mapped array of: Phone number value.

```json CEL theme={null}
$result_object_key.phone_numbers.map(x, x.value)
```

```json Example theme={null}
[
null
]
```

**phone\_numbers.map(x, x.display\_value)** `[]string` *required*

Mapped array of: Formatted display value for the phone number.

```json CEL theme={null}
$result_object_key.phone_numbers.map(x, x.display_value)
```

```json Example theme={null}
[
"(555) 123-4567"
]
```

**pronouns** `string`

`PII` Preferred pronouns of the contact.

```json CEL theme={null}
$result_object_key.pronouns
```

```json Example theme={null}
"he/him"
```

**tags** `[]object` *required*

Tags associated with the contact.

```json CEL theme={null}
$result_object_key.tags
```

```json Example theme={null}
[
{
"id": "tag_0E5QDGJC03000",
"value": "high-priority"
}
]
```

**tags.map(x, x.id)** `[]string` *required*

`ID` Mapped array of: Unique identifier for the tag.

```json CEL theme={null}
$result_object_key.tags.map(x, x.id)
```

```json Example theme={null}
[
"tag_0E5QDGJC03000"
]
```

**tags.map(x, x.value)** `[]string` *required*

Mapped array of: Tag value.

```json CEL theme={null}
$result_object_key.tags.map(x, x.value)
```

```json Example theme={null}
[
"high-priority"
]
```

**deleted\_contact\_ids** `[]string` *required*

`PII` Prior contact IDs merged into this Contact (note: they are deleted post-merge)

```json CEL theme={null}
$result_object_key.deleted_contact_ids
```

```json Example theme={null}
[
"entity_0E5QDGJC03001"
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.