# Client Entity

It stores the data of an individual client. It provides a single point of access to user data and **API** keys (third-party services) associated with customer portfolios.

# How to create an Client Entity?

You need to get a new client into the system. To do this, find the item **Client Entity** in the side menu. On the page we can add a new client, or edit an existing one.

[![image.png](https://docs.finmars.com/uploads/images/gallery/2025-01/scaled-1680-/7zaimage.png)](https://docs.finmars.com/uploads/images/gallery/2025-01/7zaimage.png)

Our job is to add сlient into the system, so we clicked on the *Add Entity* button and a form appeared in front of us with the client's data filled in. Part of the form is reserved for the client's data, and the second part for his API keys.

[![image.png](https://docs.finmars.com/uploads/images/gallery/2025-01/scaled-1680-/iNAimage.png)](https://docs.finmars.com/uploads/images/gallery/2025-01/iNAimage.png)

Let's fill out the client data. Fill in the client given and select the portfolios that will belong to it.

[![image.png](https://docs.finmars.com/uploads/images/gallery/2025-01/scaled-1680-/KaEimage.png)](https://docs.finmars.com/uploads/images/gallery/2025-01/KaEimage.png)

We can also immediately fill in the data for the API key of a third-party broker. For example, our client has two portfolios. In two different banks.  
**Path to Secret** - path to the vault (with API Key).  
**Provider** - name of broker, source, bank, API.  
**Portfolio** - Portfolio name (e.g. above I chose *Bonds Portfolio* and *Crypto Portfolio* for the client).

[![image.png](https://docs.finmars.com/uploads/images/gallery/2025-01/scaled-1680-/XPEimage.png)](https://docs.finmars.com/uploads/images/gallery/2025-01/XPEimage.png)

Once created, the client will be available for editing. For example, we can add a new API to it or modify an existing one.

[![image.png](https://docs.finmars.com/uploads/images/gallery/2025-01/scaled-1680-/LFmimage.png)](https://docs.finmars.com/uploads/images/gallery/2025-01/LFmimage.png)

# Description

#### **Table of Contents**

- [Description](#bkmrk-description)
- [Examples](#bkmrk-examples)
- [Cookbook](#bkmrk-cookbook)
- [F.A.Q.](#bkmrk-api-documentation)
- [API Documentation](#bkmrk-api-documentation)

#### **Description**

##### *Financial meaning*

It stores the data of an individual client. It provides a single point of access to user data and **API** keys (third-party services) associated with customer portfolios.

##### *Platform abstraction*

A **Client** in Finmars platform is a container for client information, this entity is referenced by:

- [client\_secret](https://docs.finmars.com/books/client-entity/page/client-secret "Clietn Entity") an entity that stores the API keys to the brokers, one client's connection to many secrets.
- [portfolio](https://docs.finmars.com/books/entities/chapter/portfolio "Client Entity") container for financial assets, one client's connection to many portfolios.

#### **Examples**

<table border="1" id="bkmrk-" style="border-collapse: collapse; width: 100%;"><thead><tr><td class="align-center" style="width: 7.50894%;">Name</td><td class="align-center" style="width: 11.2038%;">Short Name  
</td><td style="width: 13.4598%;">Public Name</td><td class="align-center" style="width: 11.57%;">First Name  
</td><td class="align-center" style="width: 10.3695%;">Last Name</td><td class="align-center" style="width: 12.7533%;">User code  
</td><td class="align-center" style="width: 8.10489%;">Notes</td><td class="align-center" style="width: 12.5149%;">Email</td><td class="align-center" style="width: 12.5149%;">Phone  
</td></tr></thead><tbody><tr><td style="width: 7.50894%;">J-Doe</td><td style="width: 11.2038%;">J-Doe  
</td><td style="width: 13.4598%;">J-Doe</td><td style="width: 11.57%;">Josh</td><td style="width: 10.3695%;">Doe</td><td style="width: 12.7533%;">client-00</td><td style="width: 8.10489%;">-</td><td style="width: 12.5149%;">J.Doe@bank-c.com</td><td style="width: 12.5149%;">+8812345</td></tr></tbody></table>

- `User code`: workspace unique identifier of the client
- `Name`: full name
- `Short name`: short name, showed in other relations
- `Public name`: public view name for users without access
- `First name`: public view name for users without access
- `Last name`: public view name for users without access
- `Notes`: custom description
- `Email`: client's email
- `Phone`: client's phone number (5-15 digits long)

#### **Cookbook**

##### *CRUD* 

Operations within platform.

##### *Use Cases*

What for it's used.

#### **F.A.Q.**

Frequently asked questions.

#### **API documentation**

Link to API documentation.

# Client Secret

#### **Table of Contents**

- [Description](#bkmrk-description)
- [Examples](#bkmrk-examples)
- [Cookbook](#bkmrk-cookbook)
- [F.A.Q.](#bkmrk-api-documentation)
- [API Documentation](#bkmrk-api-documentation)

#### **Description**

##### *Financial meaning*

It stores the data of an API key of broker, bank, API. It provides a single point of access to user data and **API** keys (third-party services) associated with customer portfolios.

##### *Platform abstraction*

**Client Secret** in the Finmars platform is information about the client's API key, which refers to:

- [client](https://docs.finmars.com/books/client-entity/page/description "Client Secret") container for client information.

#### **Examples**

<table border="1" id="bkmrk-" style="border-collapse: collapse; width: 100%; height: 59.6px;"><thead><tr style="height: 29.8px;"><td class="align-center" style="width: 21.2157%; height: 29.8px;">User code  
</td><td style="width: 13.5876%; height: 29.8px;">Provider  
</td><td style="width: 18.9598%;">Portfolio  
</td><td class="align-center" style="width: 26.809%; height: 29.8px;">Path to Secret  
</td><td style="width: 9.77354%;">Client ID  
</td><td style="width: 9.77354%;">Notes  
</td></tr></thead><tbody><tr style="height: 29.8px;"><td style="width: 21.2157%; height: 29.8px;">client-00</td><td style="width: 13.5876%; height: 29.8px;">Bank A  
</td><td style="width: 18.9598%;">Bonds Portfolio  
</td><td style="width: 26.809%; height: 29.8px;">finmars/bank-a-access</td><td style="width: 9.77354%;">1  
</td><td style="width: 9.77354%;">-  
</td></tr></tbody></table>

- `User code`: workspace unique identifier of the client
- `Provider`: name of broker, source, bank, API
- `Portfolio`: portfolio name
- `Path to Secret`: path to the vault (with API key)
- `Notes`: custom description
- `Client ID`: ID of [client](https://docs.finmars.com/books/client-entity/page/description "Client Secret")

#### **Cookbook**

##### *CRUD* 

Operations within platform.

##### *Use Cases*

Now u can use some thing like this in workflow script:

```python
payload = kwargs.get("payload")
client = payload.get("client")
secrets = workflow.finmars.get_secrets(client, provider="exante") 

credentials = vault.get_secret(secret.path_to_secret)
```

#### **F.A.Q.**

Frequently asked questions.

#### **API documentation**

Link to API documentation.