Create Contact
This tutorial should help you create the first Contact. Before moving forward, make sure your Authentication works and you understand the Key Concepts of the Pipeliner API ,and make sure you know how to use API parameters
The Contact represents existing contact from the company, that your company is dealing with. Go to the web Application and Contacts can be located on the Contacts screen. Contact should not be standalone records, but they should always be linked to the Accounts.

Tutorial Assignment

Create a Contact in Pipeliner with Job Position/Job Title. This contact will be linked with one Account.

0. Required fields

Required API field Name
Description
first_name or last_name
Name of the Contact. Name of the Contact is created as "Fist_name" + "Middle_Name" + "Last_Name"
Required: at least one of the first_name, last_name
owner_id
Id of the User in Pipeliner Application

1. Prepare Data

Owner_id

Load an id of the user with the default sales unit. This user will become the owner of the newly created Contact.
get
https://us-east.pipelinersales.com/api/v100/rest/spaces/<space_id>
/entities/Clients
1
{{baseUrl}}/entities/Clients?load-only=id,default_unit_id&filter[email][email protected]
Copied!
1
{
2
"id": "00000000-0000-0000-0000-000000011a7d",
3
"default_unit_id": "aba4a358-f3f8-4f55-b3ed-dd5cf589103b"
4
}
Copied!
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 contact with the default User´s sales unit. (See step 2. of this tutorial)

Account_id

We want to assign this contact with an Account. We are going to search for Accounts by email address. But you can use whatever parameter.
get
https://us-east.pipelinersales.com/api/v100/rest/spaces/<space_id>
/entities/Accounts/{id}
1
{{baseUrl}}/entities/Accounts?include-deleted=false&filter[email1][email protected]
Copied!
1
{
2
"is_delete_protected": false,
3
"id": "0bc376a4-c579-413a-9221-e86e4a134766",
4
"is_deleted": false,
5
"modified": "2019-02-01 10:01:23.011709+00:00",
6
"created": "2019-01-30 11:44:23.586083+00:00",
7
"account_type": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/AccountTypes/a456236f-6f23-0908-abfd-384aa0f62f9e",
8
"customer_type": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Data/04444b3a-c669-03bc-2c49-bcd7f047d41a",
9
"industry": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Data/acbda72f-2054-0b71-9d42-cb35aaa37600",
10
"owner": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/Clients/00000000-0000-0000-0000-000000011a3d",
11
"parent_account": null,
12
"parent_account_relation_type": null,
13
"picture": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/CloudObjects/5ddfe953-a569-48e1-86bb-271e6506e7d0",
14
"unit": "https://us-east.pipelinersales.com/api/v100/rest/spaces/nv3_PipelinerDev/entities/SalesUnits/ea33e8fb-9a56-4802-a175-2d1f406af7cf",
15
"account_class": 5,
16
"account_type_id": "a456236f-6f23-0908-abfd-384aa0f62f9e",
17
"address": "7 Lillian Plaza",
18
"city": "Coronda",
19
"comments": "",
20
"country": "Argentina",
21
"customer_type_id": "04444b3a-c669-03bc-2c49-bcd7f047d41a",
22
"email1": "[email protected]",
23
"email2": "",
24
"email3": "",
25
"email4": "",
26
"email5": "",
27
"health_category": null,
28
"health_status": null,
29
"home_page": "www.ziemannandsons.com",
30
"industry_id": "acbda72f-2054-0b71-9d42-cb35aaa37600",
31
"name": "Ziemann and Sons",
32
"owner_id": "00000000-0000-0000-0000-000000011a3d",
33
"parent_account_id": null,
34
"parent_account_relation_type_id": null,
35
"phone1": "+1 (888) 500-8000",
36
"..."
37
}
Copied!

2. Create Contact

Let´s Take data from Step 1. and use them in the following request to create a Contact.
post
https://us-east.pipelinersales.com/api/v100/rest/spaces/<space_id>
/entities/Contacts
1
{
2
"first_name": "Pipeliner",
3
"last_name":"Developer",
4
"position": "This is position in Quick Account Position field",
5
"owner_id": "00000000-0000-0000-0000-000000011a7d",
6
"account_relations": [
7
{
8
"account_id": "0bc376a4-c579-413a-9221-e86e4a134766",
9
"position": "This is Primary Account Job Title",
10
"is_primary": true
11
}
12
]
13
}
Copied!
Linking Contact to Account
To Link Contact with Account, we are going to create relation by creating new primary relation in account_relations array
Setting up the Position
position - In Pipeliner Application this api_field is called Quick Account Position. This is the Contact field. Use this field when you are not linking Contact with Account immediately.
account_position - This is Primary Account Job Title. This position is linked directly with the Account. It is recommended to use this api_field, as Contacts might have different positions on different Accounts.
List view of Contacts
Detail of the Contact with Linked Account
Possible Errors
Error description
Resolution
Error on field account_relations. Exactly one 'is_primary' item must be set.
Use is_primary flag for Account relation object.
-When creating account relations at least one Account needs to be primary -When creating contact relations at least one Contact needs to be primary