...
...
Overview
The following operations allow you to work with persons. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with persons, see Sample configuration.
Operation details
This section provides further details on the operations related to persons.
Adding a new personThe createPerson
operation adds a new person.
Code Block |
---|
language | xml |
---|
title | createPerson |
---|
|
<pipedrive.createPerson>
<name>{$ctx:name}</name>
<customFields>{$ctx:customFields}</customFields>
<ownerId>{$ctx:ownerId}</ownerId>
<organizationId>{$ctx:organizationId}</organizationId>
<emails>{$ctx:emails}</emails>
<phoneNumbers>{$ctx:phoneNumbers}</phoneNumbers>
<visibility>{$ctx:visibility}</visibility>
<addedTime>{$ctx:addedTime}</addedTime>
<prettyOutput>{$ctx:prettyOutput}</prettyOutput>
<fields>{$ctx:fields}</fields>
</pipedrive.createPerson> |
Properties
name:
The name of the person being created.customFields:
JSON object specifying the values for the person's custom fields created in the account, keys for the object are the 40-character hashes assigned for the respective custom fields.ownerId:
The ID of the user who will be marked as the owner of this person.organizationId:
The ID of the organization this person will belong to.emails:
E-mail addresses (one or more) associated with the person.phoneNumbers:
Phone numbers (one or more) associated with the person.visibility:
Visibility of the person. If omitted, visibility will be set to the default visibility, possible values are 0,1,2.addedTime:
Optional creation date and time of the person in UTC, Format: YYYY-MM-DD HH:MM:SS.prettyOutput:
If the prettyOutput is specified as 1, will return an indented response of the output.fields:
The array of fields to be returned in the output.
Sample requestFollowing is a sample REST/JSON request that can be handled by the createPerson
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for createPerson |
---|
|
{
"apiToken":"39126d07e28ce7e3a62bc49b50ad51adc82b5f91",
"apiUrl":"https://api.pipedrive.com",
"name" : "testPersonAPIA6",
"customFields" : {"a80e9f19fb2a3d793c7a33cd1cd0e7aaafdd81e0":"myMiddleNameValue"},
"ownerId" : 545970,
"organizationId" : 1,
"emails" : ["test@test.com", "test1@test.com"],
"phoneNumbers" : ["0714600270","0714600271"],
"visibility" : 1,
"addedTime" : "2015-05-01 11:11:12",
"prettyOutput":1,
"fields":["id", "owner_id"]
} |
https://developers.pipedrive.com/v1#methods-Persons
Retrieving details of a personThe getPerson
operation retrieves the details of a person.
Code Block |
---|
language | xml |
---|
title | getPerson |
---|
|
<pipedrive.getPerson>
<id>{$ctx:id}</id>
<prettyOutput>{$ctx:prettyOutput}</prettyOutput>
<fields>{$ctx:fields}</fields>
</pipedrive.getPerson> |
Properties
id:
The identifier of the person to be retrieved.prettyOutput:
If the prettyOutput is specified as 1, will return an indented response of the output.fields:
The array of fields to be returned in the output.
Sample requestFollowing is a sample REST/JSON request that can be handled by the getPerson
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for getPerson |
---|
|
{
"apiToken":"39126d07e28ce7e3a62bc49b50ad51adc82b5f91",
"apiUrl":"https://api.pipedrive.com",
"id" : 5,
"prettyOutput" : 1,
"fields" : ["id", "company_id"]
} |
https://developers.pipedrive.com/v1#methods-Persons
Retrieving all personsThe listPersons
operation retrieves all persons.
Code Block |
---|
language | xml |
---|
title | listPersons |
---|
|
<pipedrive.listPersons>
<limit>{$ctx:limit}</limit>
<sort>{$ctx:sort}</sort>
<filterId>{$ctx:filterId}</filterId>
<start>{$ctx:start}</start>
<prettyOutput>{$ctx:prettyOutput}</prettyOutput>
<fields>{$ctx:fields}</fields>
</pipedrive.listPersons> |
Properties
limit:
The number of items shown per page.sort:
The field names and sorting mode separated by comma (E.g.field_name_1 ASC, field_name_2 DESC).filterId:
The unique identifier of the filter to be used.start:
The start of the pagination.prettyOutput:
If the prettyOutput is specified as 1, will return an indented response of the output.fields:
The array of fields to be returned in the output.
Sample requestFollowing is a sample REST/JSON request that can be handled by the listPersons
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for listPersons |
---|
|
{
"apiToken":"23e5036a3fbea622c27ec5fbc09cad17b97f1c04",
"apiUrl":"https://api.pipedrive.com",
"limit":2,
"sort":["add_time asc", "update_time desc"],
"filterId":2,
"start":1,
"prettyOutput":1,
"fields":["name","id"]
} |
https://developers.pipedrive.com/v1#methods-Persons
Anchor |
---|
| searchPersons |
---|
| searchPersons |
---|
|
Searching all persons by their nameThe searchPersons
operation searches all persons by their name.
Code Block |
---|
language | xml |
---|
title | searchPersons |
---|
|
<pipedrive.searchPersons>
<term>{$ctx:term}</term>
<prettyOutput>{$ctx:prettyOutput}</prettyOutput>
<fields>{$ctx:fields}</fields>
<organizationId>{$ctx:organizationId}</organizationId>
<start>{$ctx:start}</start>
<limit>{$ctx:limit}</limit>
<searchByEmail>{$ctx:searchByEmail}</searchByEmail>
</pipedrive.searchPersons> |
Properties
term:
The search term to look for organizations.prettyOutput:
If the prettyOutput is specified as 1, will return an indented response of the output.fields:
The array of fields to be returned in the output.organizationId:
The identifier of the organization the person is associated with.start:
Specifies the pagination start index.limit:
Specifies the number of items returned per page.searchByEmail:
When enabled, term will only be matched against e-mail addresses of people. Default: false.
Sample requestFollowing is a sample REST/JSON request that can be handled by the searchPersons
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for searchPersons |
---|
|
{
"apiToken":"23e5036a3fbea622c27ec5fbc09cad17b97f1c04",
"apiUrl":"https://api.pipedrive.com",
"term" : "test",
"prettyOutput" : 1,
"fields" : ["id","name","email"],
"organizationId" : 1,
"start" : 0,
"limit" : 5,
"searchByEmail" : 1
} |
https://developers.pipedrive.com/v1#methods-Persons
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configurationFollowing is a sample proxy service that illustrates how to connect to Pipedrive with the init
operation and use the createPerson
operation. The sample request for this proxy can be found in the createPerson sample request. You can use this sample as a template for using other operations in this category.
...