All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addPerson | POST /persons | Add a person |
addPersonFollower | POST /persons/{id}/followers | Add a follower to a person |
addPersonPicture | POST /persons/{id}/picture | Add person picture |
deletePerson | DELETE /persons/{id} | Delete a person |
deletePersonFollower | DELETE /persons/{id}/followers/{follower_id} | Deletes a follower from a person. |
deletePersonPicture | DELETE /persons/{id}/picture | Delete person picture |
deletePersons | DELETE /persons | Delete multiple persons in bulk |
findPersonByName | GET /persons/find | Find persons by name |
getPerson | GET /persons/{id} | Get details of a person |
getPersonActivities | GET /persons/{id}/activities | List activities associated with a person |
getPersonDeals | GET /persons/{id}/deals | List deals associated with a person |
getPersonFiles | GET /persons/{id}/files | List files attached to a person |
getPersonFollowers | GET /persons/{id}/followers | List followers of a person |
getPersonMailMessages | GET /persons/{id}/mailMessages | List mail messages associated with a person |
getPersonProducts | GET /persons/{id}/products | List products associated with a person |
getPersonUpdates | GET /persons/{id}/flow | List updates about a person |
getPersonUsers | GET /persons/{id}/permittedUsers | List permitted users |
getPersons | GET /persons | Get all persons |
mergePersons | PUT /persons/{id}/merge | Merge two persons |
searchPersons | GET /persons/search | Search persons |
updatePerson | PUT /persons/{id} | Update a person |
AddPersonResponse addPerson(opts)
Add a person
Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for 'key' values.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let opts = {
'newPerson': new Pipedrive.NewPerson() // NewPerson |
};
apiInstance.addPerson(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
newPerson | NewPerson | [optional] |
- Content-Type: application/json
- Accept: application/json
AddFollowerToPersonResponse addPersonFollower(id, userId)
Add a follower to a person
Adds a follower to a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let userId = 56; // Number | ID of the user
apiInstance.addPersonFollower(id, userId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
userId | Number | ID of the user |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
AddPersonPictureResponse addPersonPicture(id, file, opts)
Add person picture
Add a picture to a person. If a picture is already set, the old picture will be replaced. Added image (or the cropping parameters supplied with the request) should have an equal width and height and should be at least 128 pixels. GIF, JPG and PNG are accepted. All added images will be resized to 128 and 512 pixel wide squares.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let file = "/path/to/file"; // File | One image supplied in the multipart/form-data encoding.
let opts = {
'cropX': 56, // Number | X coordinate to where start cropping form (in pixels)
'cropY': 56, // Number | Y coordinate to where start cropping form (in pixels)
'cropWidth': 56, // Number | Width of cropping area (in pixels)
'cropHeight': 56 // Number | Height of cropping area (in pixels)
};
apiInstance.addPersonPicture(id, file, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
file | File | One image supplied in the multipart/form-data encoding. | |
cropX | Number | X coordinate to where start cropping form (in pixels) | [optional] |
cropY | Number | Y coordinate to where start cropping form (in pixels) | [optional] |
cropWidth | Number | Width of cropping area (in pixels) | [optional] |
cropHeight | Number | Height of cropping area (in pixels) | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
DeletePersonResponse deletePerson(id)
Delete a person
Marks a person as deleted.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
apiInstance.deletePerson(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person |
- Content-Type: Not defined
- Accept: application/json
DeletePersonResponse deletePersonFollower(id, followerId)
Deletes a follower from a person.
Delete a follower from a person
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let followerId = 56; // Number | ID of the follower
apiInstance.deletePersonFollower(id, followerId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
followerId | Number | ID of the follower |
- Content-Type: Not defined
- Accept: application/json
DeletePersonResponse deletePersonPicture(id)
Delete person picture
Delete person picture
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
apiInstance.deletePersonPicture(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person |
- Content-Type: Not defined
- Accept: application/json
DeletePersonsInBulkResponse deletePersons(opts)
Delete multiple persons in bulk
Marks multiple persons as deleted.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let opts = {
'ids': "ids_example" // String | Comma-separated IDs that will be deleted
};
apiInstance.deletePersons(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ids | String | Comma-separated IDs that will be deleted | [optional] |
- Content-Type: Not defined
- Accept: application/json
Object findPersonByName(term, opts)
Find persons by name
<strong>This endpoint is deprecated. Please use <a href="https://developers.pipedrive.com/docs/api/v1/#!/Persons/get_persons_search\">/v1/persons/search</a> or <a href="https://developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch\">/v1/itemSearch</a> instead</strong>. <br> Searches all persons by their name.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let term = "term_example"; // String | Search term to look for
let opts = {
'orgId': 56, // Number | ID of the organization person is associated with.
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'searchByEmail': new Pipedrive.NumberBoolean() // NumberBoolean | When enabled, term will only be matched against email addresses of people. Default: false
};
apiInstance.findPersonByName(term, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
term | String | Search term to look for | |
orgId | Number | ID of the organization person is associated with. | [optional] |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
searchByEmail | NumberBoolean | When enabled, term will only be matched against email addresses of people. Default: false | [optional] |
Object
- Content-Type: Not defined
- Accept: application/json
GetPersonDetailsResponse getPerson(id)
Get details of a person
Returns details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the 'key' value of personFields.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
apiInstance.getPerson(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person |
- Content-Type: Not defined
- Accept: application/json
ListActivitiesResponse getPersonActivities(id, opts)
List activities associated with a person
Lists activities associated with a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'done': new Pipedrive.NumberBoolean(), // NumberBoolean | Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities.
'exclude': "exclude_example" // String | A comma-separated string of activity IDs to exclude from result
};
apiInstance.getPersonActivities(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
done | NumberBoolean | Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted returns both Done and Not done activities. | [optional] |
exclude | String | A comma-separated string of activity IDs to exclude from result | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListDealsResponse getPersonDeals(id, opts)
List deals associated with a person
Lists deals associated with a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'status': "'all_not_deleted'", // String | Only fetch deals with specific status. If omitted, all not deleted deals are fetched.
'sort': "sort_example" // String | Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys).
};
apiInstance.getPersonDeals(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
status | String | Only fetch deals with specific status. If omitted, all not deleted deals are fetched. | [optional] [default to 'all_not_deleted'] |
sort | String | Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListFilesResponse getPersonFiles(id, opts)
List files attached to a person
Lists files associated with a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'includeDeletedFiles': new Pipedrive.NumberBoolean(), // NumberBoolean | When enabled, the list of files will also include deleted files. Please note that trying to download these files will not work.
'sort': "sort_example" // String | Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). Supported fields: id, user_id, deal_id, person_id, org_id, product_id, add_time, update_time, file_name, file_type, file_size, comment.
};
apiInstance.getPersonFiles(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
includeDeletedFiles | NumberBoolean | When enabled, the list of files will also include deleted files. Please note that trying to download these files will not work. | [optional] |
sort | String | Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). Supported fields: id, user_id, deal_id, person_id, org_id, product_id, add_time, update_time, file_name, file_type, file_size, comment. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListFollowersResponse getPersonFollowers(id)
List followers of a person
Lists the followers of a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
apiInstance.getPersonFollowers(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person |
- Content-Type: Not defined
- Accept: application/json
ListMailMessagesResponse getPersonMailMessages(id, opts)
List mail messages associated with a person
Lists mail messages associated with a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let opts = {
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getPersonMailMessages(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListPersonProductsResponse getPersonProducts(id, opts)
List products associated with a person
Lists products associated with a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let opts = {
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getPersonProducts(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
PersonFlowResponse getPersonUpdates(id, opts)
List updates about a person
Lists updates about a person.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'allChanges': "allChanges_example", // String | Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
'items': "items_example" // String | A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document)
};
apiInstance.getPersonUpdates(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
allChanges | String | Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. | [optional] |
items | String | A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document) | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListPermittedUsersResponse2 getPersonUsers(id)
List permitted users
List users permitted to access a person
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
apiInstance.getPersonUsers(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person |
- Content-Type: Not defined
- Accept: application/json
GetAllPersonsResponse getPersons(opts)
Get all persons
Returns all persons
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let opts = {
'userId': 56, // Number | If supplied, only persons owned by the given user will be returned.
'filterId': 56, // Number | ID of the filter to use.
'firstChar': "firstChar_example", // String | If supplied, only persons whose name starts with the specified letter will be returned (case insensitive).
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'sort': "sort_example" // String | Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys).
};
apiInstance.getPersons(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | Number | If supplied, only persons owned by the given user will be returned. | [optional] |
filterId | Number | ID of the filter to use. | [optional] |
firstChar | String | If supplied, only persons whose name starts with the specified letter will be returned (case insensitive). | [optional] |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
sort | String | Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). | [optional] |
- Content-Type: Not defined
- Accept: application/json
MergePersonsResponse mergePersons(id, mergeWithId)
Merge two persons
Merges a person with another person. For more information on how to merge two persons, see <a href="https://pipedrive.readme.io/docs/merging-two-persons\" target="_blank" rel="noopener noreferrer">this tutorial</a>.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let mergeWithId = 56; // Number | The ID of the Person that will not be overwritten. This Person’s data will be prioritized in case of conflict with the other Person.
apiInstance.mergePersons(id, mergeWithId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
mergeWithId | Number | The ID of the Person that will not be overwritten. This Person’s data will be prioritized in case of conflict with the other Person. |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
PersonSearchResponse searchPersons(term, opts)
Search persons
Searches all Persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch\">/v1/itemSearch</a> with a narrower OAuth scope. Found Persons can be filtered by Organization ID.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let term = "term_example"; // String | The search term to look for. Minimum 2 characters (or 1 if using exact_match).
let opts = {
'fields': "fields_example", // String | A comma-separated string array. The fields to perform the search from. Defaults to all of them.
'exactMatch': true, // Boolean | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
'organizationId': 56, // Number | Will filter Deals by the provided Organization ID. The upper limit of found Deals associated with the Organization is 2000.
'includeFields': "includeFields_example", // String | Supports including optional fields in the results which are not provided by default.
'start': 0, // Number | Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter.
'limit': 56 // Number | Items shown per page
};
apiInstance.searchPersons(term, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
term | String | The search term to look for. Minimum 2 characters (or 1 if using exact_match). | |
fields | String | A comma-separated string array. The fields to perform the search from. Defaults to all of them. | [optional] |
exactMatch | Boolean | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. | [optional] |
organizationId | Number | Will filter Deals by the provided Organization ID. The upper limit of found Deals associated with the Organization is 2000. | [optional] |
includeFields | String | Supports including optional fields in the results which are not provided by default. | [optional] |
start | Number | Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter. | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
UpdatePersonResponse updatePerson(id, opts)
Update a person
Updates the properties of a person. For more information on how to update a person, see <a href="https://pipedrive.readme.io/docs/updating-a-person\" target="_blank" rel="noopener noreferrer">this tutorial</a>.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.PersonsApi();
let id = 56; // Number | ID of a person
let opts = {
'basicPerson': new Pipedrive.BasicPerson() // BasicPerson |
};
apiInstance.updatePerson(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of a person | |
basicPerson | BasicPerson | [optional] |
- Content-Type: application/json
- Accept: application/json