# Create Account

This tutorial should help you create the first Account. Before moving forward, make sure your [**Authentication** ](https://developers.pipelinersales.com/api-docs/overview/authentication)works and you understand the [**Key Concepts**](https://developers.pipelinersales.com/api-docs/core-api-concepts/understanding-the-crm-concept) of the Pipeliner API, and make sure you know how to use [**API parameters**](https://developers.pipelinersales.com/api-docs/core-api-concepts/api-parameters)

**The Account** represents the Company/organization, that your company is dealing with. Go to the web Application and Accounts can be located on the Accounts screen.&#x20;

![](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FJUKyY1Ggn9r3lwc0bHMg%2FAccounts%20_%20Pipeliner%20CRM%20-%20Google%20Chrome%202021-12-2.png?alt=media\&token=424fe980-4886-411b-b77e-7f862ba45c27)

## Tutorial Assignment <a href="#tutorial-assignment" id="tutorial-assignment"></a>

Create an Account in Pipeliner with Several Contacts (with bulk create method). For this account, we will set the `industry` field to *`Agriculture`*

### 0. Required fields <a href="#id-0.-required-fields" id="id-0.-required-fields"></a>

<table><thead><tr><th width="251.76811427063683">Required API field Name</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>Name of the Account</td></tr><tr><td>owner_id</td><td>Id of the User in Pipeliner Application</td></tr></tbody></table>

### 1.  Prepare Data

#### Owner\_id

Load an id of the user with the [default sales unit](https://developers.pipelinersales.com/api-docs/core-api-concepts/understanding-the-crm-concept#users-and-roles-and-sales-units-accessing-records). This user will become the owner of the newly created Account.

{% openapi src="<https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20(1).json?alt=media&token=4be07353-5170-4a95-9100-4f16545d47b0>" path="/entities/Clients" method="get" %}
[openapi (1).json](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20\(1\).json?alt=media\&token=4be07353-5170-4a95-9100-4f16545d47b0)
{% endopenapi %}

```
{{baseUrl}}/entities/Clients?load-only=id,default_unit_id&filter[email]=john.doe@example.com
```

```json
{
            "id": "00000000-0000-0000-0000-000000011a7d",
            "default_unit_id": "aba4a358-f3f8-4f55-b3ed-dd5cf589103b"
}
```

{% hint style="info" %}
We don´t necessarily need to load the default unit id. If only owner\_id is specified in the final request, Pipeliner will automatically create an Account with the default User´s sales unit. (See step 2. of this tutorial)
{% endhint %}

#### Industry

We need to retrieve existing values of Industry field. For more information how to work with fields and get values read [Fields section](https://developers.pipelinersales.com/api-docs/core-api-concepts/fields).

```
GET 
{{baseUrl}}/entities/Fields?expand=data_set&load-only=api_name,data_set.option_name,data_set.id&filter[api_name]=industry_id
```

```
"data": [
        {
           "api_name": "industry_id",
           "data_set": [
                {
                    "id": "36430b74-f0ae-01b0-bc4a-47d6235f9405",
                    "option_name": "Accounting"
                },
                {
                    "id": "3e046e52-00e4-097b-b2a4-b58af0381541",
                    "option_name": "Agriculture"
                },
                {
                    "id": "acbda72f-2054-0b71-9d42-cb35aaa37600",
                    "option_name": "Broadcasting"
                },
                ...
    }
 ]       
                
                
```

### 2.  Create Account

Let´s Take data from Step 1. and use them in the following request to create a Contact.

{% openapi src="<https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20(1).json?alt=media&token=4be07353-5170-4a95-9100-4f16545d47b0>" path="/entities/Accounts" method="post" %}
[openapi (1).json](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20\(1\).json?alt=media\&token=4be07353-5170-4a95-9100-4f16545d47b0)
{% endopenapi %}

```json
{
    "name": "My New Account",
    "owner_id": "00000000-0000-0000-0000-000000011a7d",
    "industry_id": "3e046e52-00e4-097b-b2a4-b58af0381541"
}
```

{% hint style="info" %}
When working with Dropdown fields like `industry_id` you need to use a relation to the id of the value in field data\_set. In our case Option **Agriculture** has id 3e046e52-00e4-097b-b2a4-b58af0381541
{% endhint %}
