This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Persons in Pipedrive
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 | Description |
---|---|
Adds a new person. | |
getPerson | Retrieves details of a person. |
listPersons | Retrieves all persons. |
searchPersons | Searches all persons by their name. |
Operation details
This section provides further details on the operations related to persons.
Adding a new person
The
operation adds a new person.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
The name of the person being created.name:
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.customFields:
The ID of the user who will be marked as the owner of this person.ownerId:
The ID of the organization this person will belong to.organizationId:
E-mail addresses (one or more) associated with the person.emails:
Phone numbers (one or more) associated with the person.phoneNumbers:
Visibility of the person. If omitted, visibility will be set to the default visibility, possible values are 0,1,2.visibility:
Optional creation date and time of the person in UTC, Format: YYYY-MM-DD HH:MM:SS.addedTime:
If the prettyOutput is specified as 1, will return an indented response of the output.prettyOutput:
The array of fields to be returned in the output.fields:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.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"] }
Related Pipedrive documentation
https://developers.pipedrive.com/v1#methods-Persons
Retrieving details of a person
The
operation retrieves the details of a person.getPerson
<pipedrive.getPerson> <id>{$ctx:id}</id> <prettyOutput>{$ctx:prettyOutput}</prettyOutput> <fields>{$ctx:fields}</fields> </pipedrive.getPerson>
Properties
The identifier of the person to be retrieved.id:
If the prettyOutput is specified as 1, will return an indented response of the output.prettyOutput:
The array of fields to be returned in the output.fields:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getPerson
{ "apiToken":"39126d07e28ce7e3a62bc49b50ad51adc82b5f91", "apiUrl":"https://api.pipedrive.com", "id" : 5, "prettyOutput" : 1, "fields" : ["id", "company_id"] }
Related Pipedrive documentation
https://developers.pipedrive.com/v1#methods-Persons
Retrieving all persons
The
operation retrieves all persons.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
The number of items shown per page.limit:
The field names and sorting mode separated by comma (E.g.field_name_1 ASC, field_name_2 DESC).sort:
The unique identifier of the filter to be used.filterId:
The start of the pagination.start:
If the prettyOutput is specified as 1, will return an indented response of the output.prettyOutput:
The array of fields to be returned in the output.fields:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.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"] }
Related Pipedrive documentation
https://developers.pipedrive.com/v1#methods-Persons
Searching all persons by their name
The
operation searches all persons by their name.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
The search term to look for organizations.term:
If the prettyOutput is specified as 1, will return an indented response of the output.prettyOutput:
The array of fields to be returned in the output.fields:
The identifier of the organization the person is associated with.organizationId:
Specifies the pagination start index.start:
Specifies the number of items returned per page.limit:
When enabled, term will only be matched against e-mail addresses of people. Default: false.searchByEmail:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.searchPersons
{ "apiToken":"23e5036a3fbea622c27ec5fbc09cad17b97f1c04", "apiUrl":"https://api.pipedrive.com", "term" : "test", "prettyOutput" : 1, "fields" : ["id","name","email"], "organizationId" : 1, "start" : 0, "limit" : 5, "searchByEmail" : 1 }
Related Pipedrive documentation
https://developers.pipedrive.com/v1#methods-Persons
Sample configuration
Following is a sample proxy service that illustrates how to connect to Pipedrive with the init
operation and use the
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.createPerson
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="pipedrive_createPerson" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)" /> <property name="apiToken" expression="json-eval($.apiToken)" /> <property name="name" expression="json-eval($.name)" /> <property name="customFields" expression="json-eval($.customFields)" /> <property name="ownerId" expression="json-eval($.ownerId)" /> <property name="organizationId" expression="json-eval($.organizationId)" /> <property name="emails" expression="json-eval($.emails)" /> <property name="phoneNumbers" expression="json-eval($.phoneNumbers)" /> <property name="visibility" expression="json-eval($.visibility)" /> <property name="addedTime" expression="json-eval($.addedTime)" /> <property name="prettyOutput" expression="json-eval($.prettyOutput)"/> <property name="fields" expression="json-eval($.fields)"/> <pipedrive.init> <apiToken>{$ctx:apiToken}</apiToken> <apiUrl>{$ctx:apiUrl}</apiUrl> </pipedrive.init> <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> <respond /> </inSequence> <outSequence> <send /> </outSequence> </target> <description /> </proxy>