# Spruce Health

> Read Spruce Health contacts, conversations, tags and contact fields.

App · 12 actions. Web page: https://docs.lodol.com/docs/integrations/spruce-health

## Actions

### Create contact

Create contact.

**Inputs**

- Category (`category`, text): Category. One of: `patient`, `professional`.
- Company name (`company_name`, text): Company name.
- Date of birth (`date_of_birth`, date): Date of birth.
- Email addresses (`email_addresses`, list): Email addresses.
- Family name (`family_name`, text): Family name.
- Fax numbers (`fax_numbers`, list): Fax numbers.
- Gender (`gender`, text): Gender. One of: `unknown`, `male`, `female`, `other`.
- Gender detail (`gender_detail`, text): Gender detail.
- Given name (`given_name`, text): Given name.
- Internal member IDs (`internal_member_ids`, list): Internal member ids.
- Middle name (`middle_name`, text): Middle name.
- Organization contact fields (`organization_contact_fields`, list): Organization contact fields.
- Phone numbers (`phone_numbers`, list): Phone numbers.
- Pronouns (`pronouns`, text): Pronouns.
- Tag IDs (`tag_ids`, list): Tag ids.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "apiURL": "example",
    "appURL": "example",
    "canDelete": true,
    "canEdit": true,
    "category": "patient",
    "companyName": "example",
    "created": "example",
    "customContactFields": [
      {
        "id": "example",
        "name": "example",
        "value": "example"
      }
    ],
    "dateOfBirth": "example",
    "displayName": "example",
    "emailAddresses": [
      {
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "embedded": true,
    "familyName": "example",
    "faxNumbers": [
      {
        "displayValue": "example",
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "gender": "unknown",
    "genderDetail": "example",
    "givenName": "example",
    "hasAccount": true,
    "hasPendingInvite": true,
    "id": "example",
    "integrationLinks": [
      {
        "contactId": "example",
        "externalId": "example",
        "type": "elation",
        "url": "example"
      }
    ],
    "internalMemberIds": [
      "example"
    ],
    "middleName": "example",
    "object": "example",
    "organizationContactFields": [
      {
        "id": "example",
        "name": "example",
        "value": "example"
      }
    ],
    "phoneNumbers": [
      {
        "displayValue": "example",
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "pronouns": "example",
    "tags": [
      {
        "id": "example",
        "object": "example",
        "value": "example"
      }
    ]
  }
}
```

### Get contact

Get contact.

**Inputs**

- Contact (`contact_id`, text, required): Contact id.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "apiURL": "example",
    "appURL": "example",
    "canDelete": true,
    "canEdit": true,
    "category": "patient",
    "companyName": "example",
    "created": "example",
    "customContactFields": [
      {
        "id": "example",
        "name": "example",
        "value": "example"
      }
    ],
    "dateOfBirth": "example",
    "displayName": "example",
    "emailAddresses": [
      {
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "embedded": true,
    "familyName": "example",
    "faxNumbers": [
      {
        "displayValue": "example",
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "gender": "unknown",
    "genderDetail": "example",
    "givenName": "example",
    "hasAccount": true,
    "hasPendingInvite": true,
    "id": "example",
    "integrationLinks": [
      {
        "contactId": "example",
        "externalId": "example",
        "type": "elation",
        "url": "example"
      }
    ],
    "internalMemberIds": [
      "example"
    ],
    "middleName": "example",
    "object": "example",
    "organizationContactFields": [
      {
        "id": "example",
        "name": "example",
        "value": "example"
      }
    ],
    "phoneNumbers": [
      {
        "displayValue": "example",
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "pronouns": "example",
    "tags": [
      {
        "id": "example",
        "object": "example",
        "value": "example"
      }
    ]
  }
}
```

### Get conversation

Get conversation.

**Inputs**

- Conversation (`conversation_id`, text, required): Conversation id.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "conversation": {
      "apiURL": "example",
      "appURL": "example",
      "archived": true,
      "assignedToMemberId": "example",
      "associatedContactIds": [
        "example"
      ],
      "createdAt": "example",
      "externalParticipants": [
        {}
      ],
      "id": "example",
      "internalEndpoint": {
        "channel": "email",
        "displayValue": "example",
        "id": "example",
        "isInternal": true,
        "label": "example",
        "object": "example",
        "rawValue": "example"
      },
      "internalMemberIds": [
        "example"
      ],
      "isReadOnly": true,
      "lastMessageAt": "example",
      "object": "example",
      "subtitle": "example",
      "tags": [
        {}
      ],
      "title": "example",
      "type": "email"
    }
  }
}
```

### List contact conversations

List contact conversations.

**Inputs**

- Contact (`contact_id`, text, required): Contact id.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "conversations": [
      {
        "apiURL": "example",
        "appURL": "example",
        "archived": true,
        "assignedToMemberId": "example",
        "associatedContactIds": [
          "example"
        ],
        "createdAt": "example",
        "externalParticipants": [
          {}
        ],
        "id": "example",
        "internalEndpoint": {},
        "internalMemberIds": [
          "example"
        ],
        "isReadOnly": true,
        "lastMessageAt": "example",
        "object": "example",
        "subtitle": "example",
        "tags": [
          {}
        ],
        "title": "example",
        "type": "email"
      }
    ]
  }
}
```

### List contact fields

List contact fields.

**Inputs**

- Page size (`page_size`, number): Page size. From 1 to 500.
- Pagination token (`pagination_token`, text): Pagination token.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "fields": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "hasMore": true,
    "paginationToken": "example",
    "totalCount": 1
  }
}
```

### List contact links

List contact links.

**Inputs**

- Contact (`contact_id`, text, required): Contact id.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "integrationLinks": [
      {
        "contactId": "example",
        "externalId": "example",
        "type": "elation",
        "url": "example"
      }
    ]
  }
}
```

### List contact tags

List contact tags.

**Inputs**

- Page size (`page_size`, number): Page size. From 1 to 500.
- Pagination token (`pagination_token`, text): Pagination token.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "hasMore": true,
    "paginationToken": "example",
    "tags": [
      {
        "id": "example",
        "object": "example",
        "value": "example"
      }
    ],
    "totalCount": 1
  }
}
```

### List contacts

List contacts.

**Inputs**

- Page size (`page_size`, number): Page size. From 1 to 500.
- Pagination token (`pagination_token`, text): Pagination token.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "contacts": [
      {
        "apiURL": "example",
        "appURL": "example",
        "canDelete": true,
        "canEdit": true,
        "category": "patient",
        "companyName": "example",
        "created": "example",
        "customContactFields": [
          {}
        ],
        "dateOfBirth": "example",
        "displayName": "example",
        "emailAddresses": [
          {}
        ],
        "embedded": true,
        "familyName": "example",
        "faxNumbers": [
          {}
        ],
        "gender": "unknown",
        "genderDetail": "example",
        "givenName": "example",
        "hasAccount": true,
        "hasPendingInvite": true,
        "id": "example",
        "integrationLinks": [
          {}
        ],
        "internalMemberIds": [
          "example"
        ],
        "middleName": "example",
        "object": "example",
        "organizationContactFields": [
          {}
        ],
        "phoneNumbers": [
          {}
        ],
        "pronouns": "example",
        "tags": [
          {}
        ]
      }
    ],
    "hasMore": true,
    "paginationToken": "example",
    "totalCount": 1
  }
}
```

### List conversations

List conversations.

**Inputs**

- Page size (`page_size`, number): Page size. From 1 to 200.
- Pagination token (`pagination_token`, text): Pagination token.
- Order by (`order_by`, text, required): Order by. One of: `created`, `last_message` (Last message).
- Start from (`start_from`, date and time): Start from.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "conversations": [
      {
        "apiURL": "example",
        "appURL": "example",
        "archived": true,
        "assignedToMemberId": "example",
        "associatedContactIds": [
          "example"
        ],
        "createdAt": "example",
        "externalParticipants": [
          {}
        ],
        "id": "example",
        "internalEndpoint": {},
        "internalMemberIds": [
          "example"
        ],
        "isReadOnly": true,
        "lastMessageAt": "example",
        "object": "example",
        "subtitle": "example",
        "tags": [
          {}
        ],
        "title": "example",
        "type": "email"
      }
    ],
    "hasMore": true,
    "paginationToken": "example",
    "totalCount": 1
  }
}
```

### List scheduled messages

List scheduled messages.

**Inputs**

- Conversation (`conversation_id`, text, required): Conversation id.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "scheduledMessages": [
      {
        "conversationId": "example",
        "createdAt": "example",
        "id": "example",
        "isInternalNote": true,
        "message": {},
        "modifiedAt": "example",
        "object": "example",
        "scheduledToSendAt": "example",
        "sendAsInternalMemberId": "example",
        "sentConversationItemId": "example"
      }
    ]
  }
}
```

### Search contacts

Search contacts.

**Inputs**

- Page size (`page_size`, number): Page size. From 1 to 500.
- Pagination token (`pagination_token`, text): Pagination token.
- Free text (`free_text`, text): Free text.
- Structured (`structured`, object): Structured.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "contacts": [
      {
        "apiURL": "example",
        "appURL": "example",
        "canDelete": true,
        "canEdit": true,
        "category": "patient",
        "companyName": "example",
        "created": "example",
        "customContactFields": [
          {}
        ],
        "dateOfBirth": "example",
        "displayName": "example",
        "emailAddresses": [
          {}
        ],
        "embedded": true,
        "familyName": "example",
        "faxNumbers": [
          {}
        ],
        "gender": "unknown",
        "genderDetail": "example",
        "givenName": "example",
        "hasAccount": true,
        "hasPendingInvite": true,
        "id": "example",
        "integrationLinks": [
          {}
        ],
        "internalMemberIds": [
          "example"
        ],
        "middleName": "example",
        "object": "example",
        "organizationContactFields": [
          {}
        ],
        "phoneNumbers": [
          {}
        ],
        "pronouns": "example",
        "tags": [
          {}
        ]
      }
    ],
    "hasMore": true,
    "paginationToken": "example",
    "totalCount": 1,
    "totalCountRelation": "eq"
  }
}
```

### Update contact

Update contact.

**Inputs**

- Contact (`contact_id`, text, required): Contact id.
- Category (`category`, text): Category. One of: `patient`, `professional`.
- Company name (`company_name`, text): Company name.
- Date of birth (`date_of_birth`, date): Date of birth.
- Email addresses (`email_addresses`, list): Email addresses.
- Family name (`family_name`, text): Family name.
- Fax numbers (`fax_numbers`, list): Fax numbers.
- Gender (`gender`, text): Gender. One of: `unknown`, `male`, `female`, `other`.
- Gender detail (`gender_detail`, text): Gender detail.
- Given name (`given_name`, text): Given name.
- Internal member IDs (`internal_member_ids`, list): Internal member ids.
- Middle name (`middle_name`, text): Middle name.
- Organization contact fields (`organization_contact_fields`, list): Organization contact fields.
- Phone numbers (`phone_numbers`, list): Phone numbers.
- Pronouns (`pronouns`, text): Pronouns.
- Tag IDs (`tag_ids`, list): Tag ids.

**Outputs**

- `data` (object): The response from Spruce Health.

**Example output**

```json
{
  "data": {
    "apiURL": "example",
    "appURL": "example",
    "canDelete": true,
    "canEdit": true,
    "category": "patient",
    "companyName": "example",
    "created": "example",
    "customContactFields": [
      {
        "id": "example",
        "name": "example",
        "value": "example"
      }
    ],
    "dateOfBirth": "example",
    "displayName": "example",
    "emailAddresses": [
      {
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "embedded": true,
    "familyName": "example",
    "faxNumbers": [
      {
        "displayValue": "example",
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "gender": "unknown",
    "genderDetail": "example",
    "givenName": "example",
    "hasAccount": true,
    "hasPendingInvite": true,
    "id": "example",
    "integrationLinks": [
      {
        "contactId": "example",
        "externalId": "example",
        "type": "elation",
        "url": "example"
      }
    ],
    "internalMemberIds": [
      "example"
    ],
    "middleName": "example",
    "object": "example",
    "organizationContactFields": [
      {
        "id": "example",
        "name": "example",
        "value": "example"
      }
    ],
    "phoneNumbers": [
      {
        "displayValue": "example",
        "id": "example",
        "label": "example",
        "value": "example"
      }
    ],
    "pronouns": "example",
    "tags": [
      {
        "id": "example",
        "object": "example",
        "value": "example"
      }
    ]
  }
}
```
