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/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »



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

OperationDescription

1Working with Persons in Pipedrive

Adds a new person.

1Working with Persons in PipedriveRetrieves details of a person.
1Working with Persons in PipedriveRetrieves all persons.
1Working with Persons in PipedriveSearches all persons by their name.

Operation details

This section provides further details on the operations related to persons.

Adding a new person

The createPerson 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
  • 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 request

Following is a sample REST/JSON request that can be handled by the createPerson operation.

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"]
}
Related Pipedrive documentation

https://developers.pipedrive.com/v1#methods-Persons

Retrieving details of a person

The getPerson 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
  • 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 request

Following is a sample REST/JSON request that can be handled by the getPerson operation.

Sample Request for 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 listPersons 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
  • 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 request

Following is a sample REST/JSON request that can be handled by the listPersons operation.

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"]
}
Related Pipedrive documentation

https://developers.pipedrive.com/v1#methods-Persons

Searching all persons by their name

The searchPersons 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
  • 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 request

Following is a sample REST/JSON request that can be handled by the searchPersons operation.

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
}
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 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.

Sample Proxy
<?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> 
  • No labels