# Addepar

> Automate Addepar, the wealth management platform: keep clients, accounts and households in step with your other systems, run portfolio views and queries, record transactions, file documents and manage contacts. Start a workflow when a client, account, transaction, file or contact is added.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/addepar

## Actions

### Create contact

Add a contact, someone who can be given the Client Portal, affiliated with the clients or groups they belong to. Adding them doesn't invite them.

**Inputs**

- First name (`first_name`, text, required): Their first name, up to 40 characters.
- Last name (`last_name`, text, required): Their last name, up to 80 characters.
- Email (`email`, text): Their email.
- Email type (`email_type`, text): What kind of email it is. Leave blank for work. One of: `WORK`, `PERSONAL`, `FAMILY`, `OTHER`. Default: `WORK`.
- Phone (`phone`, text): A phone number, up to 15 characters, such as 9179999999.
- Phone type (`phone_type`, text): What kind of number it is. Leave blank for mobile. One of: `CELL` (Mobile), `WORK`, `HOME`, `FAX`, `OTHER`. Default: `CELL`.
- Client Portal email (`login_email`, text): The email they would sign in to the Client Portal with.
- Title (`title`, text): Their title, such as Mr. or Dr.
- Suffix (`suffix`, text): Their suffix, such as Jr.
- Employer (`employer`, text): Who they work for.
- Occupation (`occupation`, text): What they do.
- Birthday (`birthday`, date): Their date of birth.
- Your ID for them (`external_user_id`, text): Your firm's own ID for them, such as their ID in your CRM, up to 31 characters.
- Street (`street`, text): Their street address.
- City (`city`, text): Their city.
- State (`state`, text): Their state or province.
- ZIP or postcode (`postcode`, text): Their ZIP or postcode.
- Country (`country`, text): Their country.
- Entities (`entities`, list): The IDs of the clients or other entities to affiliate them with.
- Groups (`groups`, list): The IDs of the groups to affiliate them with.

**Outputs**

- `birthday` (text): Their birthday (YYYY-MM-DD)
- `email` (text): Their first email
- `emails` (list): All their emails
- `employer` (text): Their employer
- `entity_ids` (list): The entities they are affiliated with
- `external_user_id` (text): Your firm's own ID for them
- `first_name` (text): Their first name
- `group_ids` (list): The groups they are affiliated with
- `id` (text): The contact's ID
- `last_name` (text): Their last name
- `login_email` (text): The email they sign in to the Client Portal with
- `mailing_addresses` (list): Their mailing addresses
- `name` (text): Their full name
- `occupation` (text): Their occupation
- `phone` (text): Their first phone number
- `phone_numbers` (list): All their phone numbers
- `portal_access` (text): Their Client Portal access, such as deactivated
- `suffix` (text): Their suffix, such as Jr.
- `title` (text): Their title, such as Mr.

**Example output**

```json
{
  "birthday": "1990-10-31",
  "email": "example@addepar.com",
  "emails": [
    {
      "email": "example@addepar.com",
      "type": "WORK"
    }
  ],
  "employer": "Addepar",
  "entity_ids": [
    "22"
  ],
  "external_user_id": "abc123",
  "first_name": "Adam",
  "group_ids": [],
  "id": "2000",
  "last_name": "Smith",
  "login_email": "adam.smith@example.com",
  "mailing_addresses": [
    {
      "city": "New York",
      "country": "United States",
      "state": "New York",
      "street": "335 Madison Ave",
      "street2": "25th Floor",
      "type": "Work",
      "zip": "10017"
    }
  ],
  "name": "Adam Smith",
  "occupation": "Financial Services",
  "phone": "0987654321",
  "phone_numbers": [
    {
      "number": "0987654321",
      "type": "WORK"
    }
  ],
  "portal_access": "deactivated",
  "suffix": "Jr.",
  "title": "Mr."
}
```

### Create entity

Add an entity to Addepar, such as a client, a trust, a holding account or an investment.

**Inputs**

- Name (`name`, text, required): What the entity is called.
- Type (`entity_type`, text, required): What kind of entity it is, such as Client, Trust or Holding account.
- Currency (`currency`, text): Its currency, such as USD. Leave blank for USD.
- Display name (`display_name`, text): A name to show in its place, such as an account's nickname.
- Other attributes (`attributes`, object): Other attributes by their API field name, such as {"asset_class": "Equity"}. An attribute's API field name is under Firm Administration > Attributes in Addepar.

**Outputs**

- `attributes` (object): Its other attributes, by their API field name
- `created_at` (text): When it was added (ISO 8601)
- `currency` (text): Its currency, such as USD
- `display_name` (text): The name shown in its place, if one is set
- `id` (text): The entity's ID
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name as Addepar shows it: its display name, or its name
- `original_name` (text): Its name
- `ownership_type` (text): How it is owned: PERCENT_BASED, SHARE_BASED or VALUE_BASED; empty for a client
- `type` (text): Its type, as Addepar stores it, such as PERSON_NODE
- `type_name` (text): Its type as Addepar's app names it, such as Client

**Example output**

```json
{
  "attributes": {
    "is_rolled_up": false
  },
  "created_at": "2023-07-28T02:24:30Z",
  "currency": "USD",
  "display_name": "Citco",
  "id": "1000002",
  "modified_at": "2023-07-30T10:43:21Z",
  "name": "Citco",
  "original_name": "X092849032",
  "ownership_type": "PERCENT_BASED",
  "type": "FINANCIAL_ACCOUNT",
  "type_name": "Holding account"
}
```

### Create group

Add a group, such as a household, of clients, accounts, trusts, holding companies or managed funds.

**Inputs**

- Name (`name`, text, required): What the group is called.
- Group type (`group_type`, text): What kind of group it is. Leave blank for Addepar's standard groups.
- Members (`members`, list): The entity IDs of its members, such as 1000001.

**Outputs**

- `attributes` (object): Its other attributes, by their API field name
- `child_group_ids` (list): The IDs of the groups inside it
- `created_at` (text): When it was added (ISO 8601)
- `group_type` (text): Its group type, such as GROUPS
- `id` (text): The group's ID
- `member_ids` (list): The entity IDs of its members
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name

**Example output**

```json
{
  "attributes": {},
  "child_group_ids": [
    "6"
  ],
  "created_at": "2023-07-28T02:24:30Z",
  "group_type": "GROUPS",
  "id": "5",
  "member_ids": [
    "22",
    "24",
    "117"
  ],
  "modified_at": "2023-07-30T10:43:21Z",
  "name": "Group 1"
}
```

### Create transaction

Record a transaction, such as a capital call, a contribution, a distribution, a fee or a trade. It changes the portfolio's balances and performance.

**Inputs**

- Type (`transaction_type`, text, required): What kind of transaction it is. One of: `account_fee` (Account fee), `account_fee_advisor` (Account fee (advisor)), `account_fee_bank` (Account fee (bank)), `account_fee_custodian` (Account fee (custodian)), `account_fee_management` (Account fee (management)), `account_fee_professional` (Account fee (professional)), `account_fee_reimbursement` (Account fee reimbursement), `account_fee_reimbursement_advisor` (Account fee reimbursement (advisor)), `account_fee_reimbursement_bank` (Account fee reimbursement (bank)), `account_fee_reimbursement_custodian` (Account fee reimbursement (custodian)), and 63 more.
- Investment or account (`owned`, text, required): The investment or account's ID, a number such as 1000002, from another Addepar step or the trigger.
- Held by (`owner`, text): The client, account or other entity that holds it's ID, a number such as 1000002, from another Addepar step or the trigger. Leave blank only for an account fee, which goes on the account alone.
- Trade date (`trade_date`, date, required): The day it happened.
- Currency (`currency`, text): Its currency, such as USD. Leave blank for USD.
- Amount (`amount`, number): Its gross amount, such as 50000. Needed for a contribution, a distribution, a fee or a value-based investment.
- Units (`units`, number): How many shares or units, for a trade such as a buy.
- Cash position (`cash_position`, text): The cash position's ID, a number such as 1000002, from another Addepar step or the trigger. The position its cash is paid to or from, if you know it.
- Posted date (`posted_date`, date): The day the custodian reported it.
- Settlement date (`settlement_date`, date): The day it settles.
- Description (`description`, text): A description of it.
- Comment (`comment`, text): Your firm's note on it.
- Other fields (`other_fields`, object): Other fields by their API name, such as how a distribution splits: {"return_of_capital": 1000}. Without one, a distribution's amount is recorded as generic and a cash dividend's as its dividend.

**Outputs**

- `amount` (number): Its gross amount; 0 if not set
- `attributes` (object): Its other fields, by their API name
- `base_value` (number): Its value in the firm's currency, as Addepar works it out
- `cancelled` (true/false): True if it was cancelled, which keeps it out of balances
- `cash_position_id` (text): The cash position it is paid to or from; empty if none
- `comment` (text): Your firm's note on it
- `created_at` (text): When it was added (ISO 8601)
- `currency` (text): Its currency, such as USD
- `description` (text): The custodian's description
- `fee` (number): Its fees; 0 if none
- `id` (text): The transaction's ID
- `modified_at` (text): When it last changed (ISO 8601)
- `owned_id` (text): The investment or account it is in
- `owner_id` (text): The entity that holds it, such as an account; empty for none
- `posted_date` (text): The day the custodian reported it; empty if not set
- `settlement_date` (text): The day it settles; empty if not set
- `tags` (list): Its tags
- `trade_date` (text): The day it happened (YYYY-MM-DD)
- `type` (text): Its type, as Addepar stores it, such as buy
- `type_name` (text): Its type in words, such as Buy
- `units` (number): How many shares or units; 0 if not set

**Example output**

```json
{
  "amount": 0,
  "attributes": {
    "calculation_date": "2025-05-15"
  },
  "base_value": 10000,
  "cancelled": false,
  "cash_position_id": "315",
  "comment": "Random comment",
  "created_at": "",
  "currency": "USD",
  "description": "",
  "fee": 0,
  "id": "1967",
  "modified_at": "",
  "owned_id": "199",
  "owner_id": "196",
  "posted_date": "",
  "settlement_date": "",
  "tags": [
    "Unknown"
  ],
  "trade_date": "2019-01-02",
  "type": "buy",
  "type_name": "Buy",
  "units": 100
}
```

### Delete contact

Delete a contact from Addepar. They lose any Client Portal access.

**Inputs**

- Contact (`contact`, text, required): The contact's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The record's ID

**Example output**

```json
{
  "deleted": true,
  "id": "1111"
}
```

### Delete entity

Delete an entity from Addepar for good. Addepar refuses one that holds other entities or has positions.

**Inputs**

- Entity (`entity`, text, required): The entity's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The record's ID

**Example output**

```json
{
  "deleted": true,
  "id": "1111"
}
```

### Delete file

Delete a file or folder from Addepar's file vault. Addepar keeps it in its archive.

**Inputs**

- File (`file`, text, required): The file or folder's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The record's ID

**Example output**

```json
{
  "deleted": true,
  "id": "1111"
}
```

### Delete group

Delete a group from Addepar. Its members stay in Addepar.

**Inputs**

- Group (`group`, text, required): The group's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The record's ID

**Example output**

```json
{
  "deleted": true,
  "id": "1111"
}
```

### Delete transaction

Delete a transaction from Addepar for good, taking it out of the portfolio's balances and history.

**Inputs**

- Transaction (`transaction`, text, required): The transaction's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The record's ID

**Example output**

```json
{
  "deleted": true,
  "id": "1111"
}
```

### Find contacts

Find contacts, the people who can be given the Client Portal, by email, by words in their name, or by an entity they're affiliated with.

**Inputs**

- Email (`email`, text): Any of their emails, or their portal email.
- Name (`name`, text): Words in their name, such as Smith.
- Entity (`entity`, text): The entity's ID, a number such as 1000002, from another Addepar step or the trigger. Only contacts affiliated with this client or other entity.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 500.

**Outputs**

- `contacts` (list): The contacts found
- `count` (number): How many are listed

**Example output**

```json
{
  "contacts": [
    {
      "birthday": "1990-10-31",
      "email": "example@addepar.com",
      "emails": [
        {
          "email": "example@addepar.com",
          "type": "WORK"
        }
      ],
      "employer": "Addepar",
      "entity_ids": [
        "22"
      ],
      "external_user_id": "abc123",
      "first_name": "Adam",
      "group_ids": [],
      "id": "2000",
      "last_name": "Smith",
      "login_email": "adam.smith@example.com",
      "mailing_addresses": [
        {
          "city": "New York",
          "country": "United States",
          "state": "New York",
          "street": "335 Madison Ave",
          "street2": "25th Floor",
          "type": "Work",
          "zip": "10017"
        }
      ],
      "name": "Adam Smith",
      "occupation": "Financial Services",
      "phone": "0987654321",
      "phone_numbers": [
        {
          "number": "0987654321",
          "type": "WORK"
        }
      ],
      "portal_access": "deactivated",
      "suffix": "Jr.",
      "title": "Mr."
    }
  ],
  "count": 1
}
```

### Find entities

Find clients, accounts, trusts, investments and other entities by type, by words in their name, or by when they were added or last changed. Choose a type to search faster.

**Inputs**

- Types (`types`, list): Only entities of these types, such as Client or Holding account. Leave blank for every type.
- Name (`name`, text): Words in the entity's name, such as Smith.
- Added on or after (`created_after`, date): Only entities added on or after this day.
- Changed on or after (`modified_after`, date): Only entities changed on or after this day.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 500.

**Outputs**

- `count` (number): How many are listed
- `entities` (list): The entities found

**Example output**

```json
{
  "count": 1,
  "entities": [
    {
      "attributes": {
        "is_rolled_up": false
      },
      "created_at": "2023-07-28T02:24:30Z",
      "currency": "USD",
      "display_name": "Citco",
      "id": "1000002",
      "modified_at": "2023-07-30T10:43:21Z",
      "name": "Citco",
      "original_name": "X092849032",
      "ownership_type": "PERCENT_BASED",
      "type": "FINANCIAL_ACCOUNT",
      "type_name": "Holding account"
    }
  ]
}
```

### Find files

Find files in Addepar's file vault, by the client, group or folder they're in, or when they were added.

**Inputs**

- Entity (`entity`, text): The entity's ID, a number such as 1000002, from another Addepar step or the trigger. Only files linked to this client or other entity.
- Group (`group`, text): The group's ID, a number such as 1000002, from another Addepar step or the trigger. Only files linked to this group.
- Folder (`folder`, text): The folder's ID, a number such as 1000002, from another Addepar step or the trigger. Only what is in this folder.
- Added after (`created_after`, date and time): Only files added after this time.
- List (`include`, text): Files, folders or both. Leave blank for files. One of: `FILES_ONLY` (Files), `FOLDERS_ONLY` (Folders), `FILES_AND_FOLDERS` (Files and folders). Default: `FILES_ONLY`.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 500.

**Outputs**

- `count` (number): How many are listed
- `files` (list): The files found

**Example output**

```json
{
  "count": 1,
  "files": [
    {
      "bytes": 256201,
      "content_type": "application/PDF",
      "created_at": "2014-06-20T20:55:07Z",
      "entity_ids": [
        "10000",
        "10001"
      ],
      "group_ids": [
        "1234",
        "5678"
      ],
      "id": "123",
      "is_folder": false,
      "modified_at": "",
      "name": "Sample.pdf",
      "parent_folder_id": ""
    }
  ]
}
```

### Find groups

Find groups, such as households, by name, type, or when they were added or last changed.

**Inputs**

- Name (`name`, text): Words in the group's name.
- Group type (`group_type`, text): Only groups of this type. Leave blank for every type.
- Added on or after (`created_after`, date): Only groups added on or after this day.
- Changed on or after (`modified_after`, date): Only groups changed on or after this day.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 500.

**Outputs**

- `count` (number): How many are listed
- `groups` (list): The groups found

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "attributes": {},
      "child_group_ids": [
        "6"
      ],
      "created_at": "2023-07-28T02:24:30Z",
      "group_type": "GROUPS",
      "id": "5",
      "member_ids": [
        "22",
        "24",
        "117"
      ],
      "modified_at": "2023-07-30T10:43:21Z",
      "name": "Group 1"
    }
  ]
}
```

### Find transactions

Find transactions traded between two dates in a client, account, group or the whole firm, such as last week's contributions.

**Inputs**

- Run it on (`portfolio_type`, text): Which portfolio. Leave blank for the whole firm. One of: `ENTITY` (A client, account or other entity), `GROUP` (A group), `FIRM` (The whole firm), `FIRM_CLIENTS` (Every client), `FIRM_ACCOUNTS` (Every account), `FIRM_HOUSEHOLDS` (Every household), `FIRM_UNVERIFIED_ACCOUNTS` (Every unverified account). Default: `FIRM`.
- Portfolio (`portfolio`, text): The entity or group's ID, such as 1000002. Give several, separated by commas, to run it on them together. Needed for a client, account or group. Only when Run it on is A client, account or other entity or A group.
- Traded from (`from_date`, date): The first trade date. Leave blank for 30 days before the last.
- Traded to (`to_date`, date): The last trade date. Leave blank for today.
- Types (`types`, list): Only transactions of these types. Leave blank for every type. One or more of: `account_fee` (Account fee), `account_fee_advisor` (Account fee (advisor)), `account_fee_bank` (Account fee (bank)), `account_fee_custodian` (Account fee (custodian)), `account_fee_management` (Account fee (management)), `account_fee_professional` (Account fee (professional)), `account_fee_reimbursement` (Account fee reimbursement), `account_fee_reimbursement_advisor` (Account fee reimbursement (advisor)), `account_fee_reimbursement_bank` (Account fee reimbursement (bank)), `account_fee_reimbursement_custodian` (Account fee reimbursement (custodian)), and 63 more.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 500.

**Outputs**

- `count` (number): How many are listed
- `transactions` (list): The transactions found

**Example output**

```json
{
  "count": 1,
  "transactions": [
    {
      "created_date": "",
      "currency": "",
      "description": "",
      "id": "1976",
      "owner_id": "208",
      "owner_name": "11112222",
      "posted_date": "",
      "security_id": "20",
      "security_name": "USD",
      "settlement_date": "",
      "trade_date": "2020-01-03",
      "type": "Distribution",
      "units": 0,
      "value": -100100
    }
  ]
}
```

### Get entity

Get an entity's details, such as a client's or an account's, with all its attributes.

**Inputs**

- Entity (`entity`, text, required): The entity's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `attributes` (object): Its other attributes, by their API field name
- `created_at` (text): When it was added (ISO 8601)
- `currency` (text): Its currency, such as USD
- `display_name` (text): The name shown in its place, if one is set
- `id` (text): The entity's ID
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name as Addepar shows it: its display name, or its name
- `original_name` (text): Its name
- `ownership_type` (text): How it is owned: PERCENT_BASED, SHARE_BASED or VALUE_BASED; empty for a client
- `type` (text): Its type, as Addepar stores it, such as PERSON_NODE
- `type_name` (text): Its type as Addepar's app names it, such as Client

**Example output**

```json
{
  "attributes": {
    "is_rolled_up": false
  },
  "created_at": "2023-07-28T02:24:30Z",
  "currency": "USD",
  "display_name": "Citco",
  "id": "1000002",
  "modified_at": "2023-07-30T10:43:21Z",
  "name": "Citco",
  "original_name": "X092849032",
  "ownership_type": "PERCENT_BASED",
  "type": "FINANCIAL_ACCOUNT",
  "type_name": "Holding account"
}
```

### Get group

Get a group's details, with the IDs of its members and of the groups inside it.

**Inputs**

- Group (`group`, text, required): The group's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `attributes` (object): Its other attributes, by their API field name
- `child_group_ids` (list): The IDs of the groups inside it
- `created_at` (text): When it was added (ISO 8601)
- `group_type` (text): Its group type, such as GROUPS
- `id` (text): The group's ID
- `member_ids` (list): The entity IDs of its members
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name

**Example output**

```json
{
  "attributes": {},
  "child_group_ids": [
    "6"
  ],
  "created_at": "2023-07-28T02:24:30Z",
  "group_type": "GROUPS",
  "id": "5",
  "member_ids": [
    "22",
    "24",
    "117"
  ],
  "modified_at": "2023-07-30T10:43:21Z",
  "name": "Group 1"
}
```

### Get portfolio job

Pick up the results of a portfolio view or query run in the background, waiting until Addepar has finished it. Addepar keeps results for 24 hours.

**Inputs**

- Job (`job`, text, required): The job's ID, from 'Run portfolio view' or 'Run portfolio query' run in the background.
- Wait for it (`wait`, true/false): On unless turned off. Off, the step hands on how far along the job is straight away.

**Outputs**

- `columns` (list): The columns, in order
- `groupings` (list): The groupings, outermost first
- `job_id` (text): The job Addepar ran it as; empty when it ran straight away
- `row_count` (number): How many rows the results hold in all
- `rows` (list): Each grouping's values, outermost first, each followed by those inside it
- `status` (text): Completed, or how far along the job is, such as In Progress
- `total` (object): The whole portfolio's value in each column, by column key
- `truncated` (true/false): True if there were more rows than a step hands on (2,000)

**Example output**

```json
{
  "columns": [
    {
      "currency": "USD",
      "key": "value",
      "name": "Value (USD)",
      "output_type": "Number"
    }
  ],
  "groupings": [
    {
      "key": "holding_account",
      "name": "Holding Account"
    },
    {
      "key": "position",
      "name": "Position"
    }
  ],
  "job_id": "b6c1b9da-4387-11ef-8636-dd826f8aeed1a",
  "row_count": 2,
  "rows": [
    {
      "depth": 1,
      "grouping": "holding_account",
      "name": "Directly Owned",
      "path": "Directly Owned",
      "values": {
        "value": 10375354.56
      }
    },
    {
      "depth": 2,
      "grouping": "position",
      "name": "GS Liquidity Partners 2007 LP",
      "path": "Directly Owned > GS Liquidity Partners 2007 LP",
      "values": {
        "value": 8629166.56
      }
    }
  ],
  "status": "Completed",
  "total": {
    "value": 10375354.56
  },
  "truncated": false
}
```

### Get transaction

Get a transaction's details, with the entities it is between.

**Inputs**

- Transaction (`transaction`, text, required): The transaction's ID, a number such as 1000002, from another Addepar step or the trigger.

**Outputs**

- `amount` (number): Its gross amount; 0 if not set
- `attributes` (object): Its other fields, by their API name
- `base_value` (number): Its value in the firm's currency, as Addepar works it out
- `cancelled` (true/false): True if it was cancelled, which keeps it out of balances
- `cash_position_id` (text): The cash position it is paid to or from; empty if none
- `comment` (text): Your firm's note on it
- `created_at` (text): When it was added (ISO 8601)
- `currency` (text): Its currency, such as USD
- `description` (text): The custodian's description
- `fee` (number): Its fees; 0 if none
- `id` (text): The transaction's ID
- `modified_at` (text): When it last changed (ISO 8601)
- `owned_id` (text): The investment or account it is in
- `owner_id` (text): The entity that holds it, such as an account; empty for none
- `posted_date` (text): The day the custodian reported it; empty if not set
- `settlement_date` (text): The day it settles; empty if not set
- `tags` (list): Its tags
- `trade_date` (text): The day it happened (YYYY-MM-DD)
- `type` (text): Its type, as Addepar stores it, such as buy
- `type_name` (text): Its type in words, such as Buy
- `units` (number): How many shares or units; 0 if not set

**Example output**

```json
{
  "amount": 0,
  "attributes": {
    "calculation_date": "2025-05-15"
  },
  "base_value": 10000,
  "cancelled": false,
  "cash_position_id": "315",
  "comment": "Random comment",
  "created_at": "",
  "currency": "USD",
  "description": "",
  "fee": 0,
  "id": "1967",
  "modified_at": "",
  "owned_id": "199",
  "owner_id": "196",
  "posted_date": "",
  "settlement_date": "",
  "tags": [
    "Unknown"
  ],
  "trade_date": "2019-01-02",
  "type": "buy",
  "type_name": "Buy",
  "units": 100
}
```

### List saved views

List the saved analysis views you can run with 'Run portfolio view', such as to run each of them in turn.

**Inputs**: None.

**Outputs**

- `count` (number): How many are listed
- `views` (list): The saved views

**Example output**

```json
{
  "count": 2,
  "views": [
    {
      "id": "2",
      "name": "owner1",
      "share_type": "FIRM"
    },
    {
      "id": "4",
      "name": "TOTAL RETURN VIEW",
      "share_type": "PORTAL"
    }
  ]
}
```

### Run portfolio query

Get chosen columns, such as value or time weighted return, for a client, account, group or the whole firm over a period, grouped as you choose, such as by asset class.

**Inputs**

- Columns (`columns`, list, required): What to show, such as Value or TWR.
- Group by (`groupings`, list): How to break it down, such as Asset Class, outermost first. Leave blank for the total alone.
- Run it on (`portfolio_type`, text): Which portfolio. Leave blank for a client, account or other entity. One of: `ENTITY` (A client, account or other entity), `GROUP` (A group), `FIRM` (The whole firm), `FIRM_CLIENTS` (Every client), `FIRM_ACCOUNTS` (Every account), `FIRM_HOUSEHOLDS` (Every household), `FIRM_UNVERIFIED_ACCOUNTS` (Every unverified account). Default: `ENTITY`.
- Portfolio (`portfolio`, text): The entity or group's ID, such as 1000002. Give several, separated by commas, to run it on them together. Needed for a client, account or group. Only when Run it on is A client, account or other entity or A group.
- Start date (`start_date`, date): The first day of the period. Leave blank for the end date, for a view of a single day such as current holdings.
- End date (`end_date`, date): The last day of the period. Leave blank for today.
- Hide previous holdings (`hide_previous_holdings`, true/false): Turn on to leave out holdings no longer held at the end date.
- In the background (`in_background`, true/false): Turn on for a big portfolio, such as the whole firm. Addepar prepares it as a job; this step waits up to about 45 seconds, then hands on the job's ID for 'Get portfolio job' to pick up the results.

**Outputs**

- `columns` (list): The columns, in order
- `groupings` (list): The groupings, outermost first
- `job_id` (text): The job Addepar ran it as; empty when it ran straight away
- `row_count` (number): How many rows the results hold in all
- `rows` (list): Each grouping's values, outermost first, each followed by those inside it
- `status` (text): Completed, or how far along the job is, such as In Progress
- `total` (object): The whole portfolio's value in each column, by column key
- `truncated` (true/false): True if there were more rows than a step hands on (2,000)

**Example output**

```json
{
  "columns": [
    {
      "currency": "USD",
      "key": "value",
      "name": "Value (USD)",
      "output_type": "Number"
    }
  ],
  "groupings": [
    {
      "key": "holding_account",
      "name": "Holding Account"
    },
    {
      "key": "position",
      "name": "Position"
    }
  ],
  "job_id": "",
  "row_count": 2,
  "rows": [
    {
      "depth": 1,
      "grouping": "holding_account",
      "name": "Directly Owned",
      "path": "Directly Owned",
      "values": {
        "value": 10375354.56
      }
    },
    {
      "depth": 2,
      "grouping": "position",
      "name": "GS Liquidity Partners 2007 LP",
      "path": "Directly Owned > GS Liquidity Partners 2007 LP",
      "values": {
        "value": 8629166.56
      }
    }
  ],
  "status": "Completed",
  "total": {
    "value": 10375354.56
  },
  "truncated": false
}
```

### Run portfolio view

Run a saved analysis view on a client, account, group or the whole firm for a period, and get its values as rows. Advanced and pivot tables can't be read this way.

**Inputs**

- View (`view`, text, required): The saved view to run, or its ID.
- Run it on (`portfolio_type`, text): Which portfolio. Leave blank for a client, account or other entity. One of: `ENTITY` (A client, account or other entity), `GROUP` (A group), `FIRM` (The whole firm), `FIRM_CLIENTS` (Every client), `FIRM_ACCOUNTS` (Every account), `FIRM_HOUSEHOLDS` (Every household), `FIRM_UNVERIFIED_ACCOUNTS` (Every unverified account). Default: `ENTITY`.
- Portfolio (`portfolio`, text): The entity or group's ID, such as 1000002. Needed for a client, account or group. Only when Run it on is A client, account or other entity or A group.
- Start date (`start_date`, date): The first day of the period. Leave blank for the end date, for a view of a single day such as current holdings.
- End date (`end_date`, date): The last day of the period. Leave blank for today.
- In the background (`in_background`, true/false): Turn on for a big portfolio, such as the whole firm. Addepar prepares it as a job; this step waits up to about 45 seconds, then hands on the job's ID for 'Get portfolio job' to pick up the results.

**Outputs**

- `columns` (list): The columns, in order
- `groupings` (list): The groupings, outermost first
- `job_id` (text): The job Addepar ran it as; empty when it ran straight away
- `row_count` (number): How many rows the results hold in all
- `rows` (list): Each grouping's values, outermost first, each followed by those inside it
- `status` (text): Completed, or how far along the job is, such as In Progress
- `total` (object): The whole portfolio's value in each column, by column key
- `truncated` (true/false): True if there were more rows than a step hands on (2,000)

**Example output**

```json
{
  "columns": [
    {
      "currency": "USD",
      "key": "value",
      "name": "Value (USD)",
      "output_type": "Number"
    }
  ],
  "groupings": [
    {
      "key": "holding_account",
      "name": "Holding Account"
    },
    {
      "key": "position",
      "name": "Position"
    }
  ],
  "job_id": "",
  "row_count": 2,
  "rows": [
    {
      "depth": 1,
      "grouping": "holding_account",
      "name": "Directly Owned",
      "path": "Directly Owned",
      "values": {
        "value": 10375354.56
      }
    },
    {
      "depth": 2,
      "grouping": "position",
      "name": "GS Liquidity Partners 2007 LP",
      "path": "Directly Owned > GS Liquidity Partners 2007 LP",
      "values": {
        "value": 8629166.56
      }
    }
  ],
  "status": "Completed",
  "total": {
    "value": 10375354.56
  },
  "truncated": false
}
```

### Update contact

Change a contact's details, or affiliate them with more clients or groups. Fields left blank keep what they have.

**Inputs**

- Contact (`contact`, text, required): The contact's ID, a number such as 1000002, from another Addepar step or the trigger.
- First name (`first_name`, text): Their first name, up to 40 characters. Leave blank to keep it.
- Last name (`last_name`, text): Their last name, up to 80 characters. Leave blank to keep it.
- Email (`email`, text): An email for them. It replaces their email of the same type.
- Email type (`email_type`, text): What kind of email it is. Leave blank for work. One of: `WORK`, `PERSONAL`, `FAMILY`, `OTHER`. Default: `WORK`.
- Phone (`phone`, text): A phone number, up to 15 characters, such as 9179999999. It replaces their number of the same type.
- Phone type (`phone_type`, text): What kind of number it is. Leave blank for mobile. One of: `CELL` (Mobile), `WORK`, `HOME`, `FAX`, `OTHER`. Default: `CELL`.
- Client Portal email (`login_email`, text): The email they would sign in to the Client Portal with. Leave blank to keep it.
- Title (`title`, text): Their title, such as Mr. or Dr. Leave blank to keep it.
- Suffix (`suffix`, text): Their suffix, such as Jr. Leave blank to keep it.
- Employer (`employer`, text): Who they work for. Leave blank to keep it.
- Occupation (`occupation`, text): What they do. Leave blank to keep it.
- Birthday (`birthday`, date): Their date of birth. Leave blank to keep it.
- Your ID for them (`external_user_id`, text): Your firm's own ID for them, such as their ID in your CRM, up to 31 characters. Leave blank to keep it.
- Add entities (`add_entities`, list): The IDs of more clients or other entities to affiliate them with.
- Add groups (`add_groups`, list): The IDs of more groups to affiliate them with.

**Outputs**

- `birthday` (text): Their birthday (YYYY-MM-DD)
- `email` (text): Their first email
- `emails` (list): All their emails
- `employer` (text): Their employer
- `entity_ids` (list): The entities they are affiliated with
- `external_user_id` (text): Your firm's own ID for them
- `first_name` (text): Their first name
- `group_ids` (list): The groups they are affiliated with
- `id` (text): The contact's ID
- `last_name` (text): Their last name
- `login_email` (text): The email they sign in to the Client Portal with
- `mailing_addresses` (list): Their mailing addresses
- `name` (text): Their full name
- `occupation` (text): Their occupation
- `phone` (text): Their first phone number
- `phone_numbers` (list): All their phone numbers
- `portal_access` (text): Their Client Portal access, such as deactivated
- `suffix` (text): Their suffix, such as Jr.
- `title` (text): Their title, such as Mr.

**Example output**

```json
{
  "birthday": "1990-10-31",
  "email": "example@addepar.com",
  "emails": [
    {
      "email": "example@addepar.com",
      "type": "WORK"
    }
  ],
  "employer": "Addepar",
  "entity_ids": [
    "22"
  ],
  "external_user_id": "abc123",
  "first_name": "Adam",
  "group_ids": [],
  "id": "2000",
  "last_name": "Smith",
  "login_email": "adam.smith@example.com",
  "mailing_addresses": [
    {
      "city": "New York",
      "country": "United States",
      "state": "New York",
      "street": "335 Madison Ave",
      "street2": "25th Floor",
      "type": "Work",
      "zip": "10017"
    }
  ],
  "name": "Adam Smith",
  "occupation": "Financial Services",
  "phone": "0987654321",
  "phone_numbers": [
    {
      "number": "0987654321",
      "type": "WORK"
    }
  ],
  "portal_access": "deactivated",
  "suffix": "Jr.",
  "title": "Mr."
}
```

### Update entity

Change an entity's name, display name, currency or other attributes. Fields left blank keep what they have.

**Inputs**

- Entity (`entity`, text, required): The entity's ID, a number such as 1000002, from another Addepar step or the trigger.
- Name (`name`, text): A new name. Leave blank to keep it.
- Display name (`display_name`, text): A new name to show in its place. Leave blank to keep it.
- Currency (`currency`, text): A new currency. Leave blank to keep it.
- Other attributes (`attributes`, object): Other attributes by their API field name, such as {"asset_class": "Equity"}. An attribute's API field name is under Firm Administration > Attributes in Addepar.

**Outputs**

- `attributes` (object): Its other attributes, by their API field name
- `created_at` (text): When it was added (ISO 8601)
- `currency` (text): Its currency, such as USD
- `display_name` (text): The name shown in its place, if one is set
- `id` (text): The entity's ID
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name as Addepar shows it: its display name, or its name
- `original_name` (text): Its name
- `ownership_type` (text): How it is owned: PERCENT_BASED, SHARE_BASED or VALUE_BASED; empty for a client
- `type` (text): Its type, as Addepar stores it, such as PERSON_NODE
- `type_name` (text): Its type as Addepar's app names it, such as Client

**Example output**

```json
{
  "attributes": {
    "is_rolled_up": false
  },
  "created_at": "2023-07-28T02:24:30Z",
  "currency": "USD",
  "display_name": "Citco",
  "id": "1000002",
  "modified_at": "2023-07-30T10:43:21Z",
  "name": "Citco",
  "original_name": "X092849032",
  "ownership_type": "PERCENT_BASED",
  "type": "FINANCIAL_ACCOUNT",
  "type_name": "Holding account"
}
```

### Update group

Rename a group, add members to it or take members out. Give at least one.

**Inputs**

- Group (`group`, text, required): The group's ID, a number such as 1000002, from another Addepar step or the trigger.
- Name (`name`, text): A new name. Leave blank to keep it.
- Add members (`add_members`, list): The entity IDs to add to the group.
- Take out members (`remove_members`, list): The entity IDs to take out of the group. They stay in Addepar.

**Outputs**

- `attributes` (object): Its other attributes, by their API field name
- `child_group_ids` (list): The IDs of the groups inside it
- `created_at` (text): When it was added (ISO 8601)
- `group_type` (text): Its group type, such as GROUPS
- `id` (text): The group's ID
- `member_ids` (list): The entity IDs of its members
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name

**Example output**

```json
{
  "attributes": {},
  "child_group_ids": [
    "6"
  ],
  "created_at": "2023-07-28T02:24:30Z",
  "group_type": "GROUPS",
  "id": "5",
  "member_ids": [
    "22",
    "24",
    "117"
  ],
  "modified_at": "2023-07-30T10:43:21Z",
  "name": "Group 1"
}
```

### Upload file

Upload a file to Addepar's file vault, such as a statement, linked to the clients or groups it's about. Give a file, or text to save as one.

**Inputs**

- File (`file`, text): The file: upload one, pick one from an earlier step, or give a public https link to it.
- Text (`text`, text): Text to save as a file instead, such as notes or CSV.
- File name (`name`, text): What to call it, with its extension, such as Statement.pdf. Leave blank to keep the file's own name.
- Folder (`folder`, text): The folder's ID, a number such as 1000002, from another Addepar step or the trigger. The folder to put it in. Leave blank for the top.
- Entities (`entities`, list): The IDs of the clients or other entities it's about.
- Groups (`groups`, list): The IDs of the groups it's about.

**Outputs**

- `bytes` (number): Its size in bytes
- `content_type` (text): What kind of file it is, such as application/PDF
- `created_at` (text): When it was added (ISO 8601)
- `entity_ids` (list): The entities it is linked to
- `group_ids` (list): The groups it is linked to
- `id` (text): The file's ID
- `is_folder` (true/false): True for a folder
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name, with its extension
- `parent_folder_id` (text): The folder it is in; empty or 0 at the top

**Example output**

```json
{
  "bytes": 256201,
  "content_type": "application/PDF",
  "created_at": "2014-06-20T20:55:07Z",
  "entity_ids": [
    "10000",
    "10001"
  ],
  "group_ids": [
    "1234",
    "5678"
  ],
  "id": "123",
  "is_folder": false,
  "modified_at": "",
  "name": "Sample.pdf",
  "parent_folder_id": ""
}
```
