All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addOrganizationRelationship | POST /organizationRelationships | Create an organization relationship |
deleteOrganizationRelationship | DELETE /organizationRelationships/{id} | Delete an organization relationship |
getOrganizationRelationship | GET /organizationRelationships/{id} | Get one organization relationship |
getOrganizationRelationships | GET /organizationRelationships | Get all relationships for organization |
updateOrganizationRelationship | PUT /organizationRelationships/{id} | Update an organization relationship |
OrganizationRelationshipPostResponse addOrganizationRelationship(opts)
Create an organization relationship
Creates and returns an organization relationship.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.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 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.OrganizationRelationshipsApi(apiClient);
let opts = Pipedrive.AddOrganizationRelationshipRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addOrganizationRelationship(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
AddOrganizationRelationshipRequest | AddOrganizationRelationshipRequest | [optional] |
OrganizationRelationshipPostResponse
- Content-Type: application/json
- Accept: application/json
OrganizationRelationshipDeleteResponse deleteOrganizationRelationship(id)
Delete an organization relationship
Deletes an organization relationship and returns the deleted ID.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.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 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.OrganizationRelationshipsApi(apiClient);
let id = 56; // Number | The ID of the organization relationship
apiInstance.deleteOrganizationRelationship(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the organization relationship |
OrganizationRelationshipDeleteResponse
- Content-Type: Not defined
- Accept: application/json
OrganizationRelationshipGetResponse getOrganizationRelationship(id, opts)
Get one organization relationship
Finds and returns an organization relationship from its ID.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.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 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.OrganizationRelationshipsApi(apiClient);
let id = 56; // Number | The ID of the organization relationship
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'orgId': 56 // Number | The ID of the base organization for the returned calculated values
};
apiInstance.getOrganizationRelationship(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the organization relationship | |
org_id | Number | The ID of the base organization for the returned calculated values | [optional] |
OrganizationRelationshipGetResponse
- Content-Type: Not defined
- Accept: application/json
AllOrganizationRelationshipsGetResponse getOrganizationRelationships(orgId)
Get all relationships for organization
Gets all of the relationships for a supplied organization ID.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.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 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.OrganizationRelationshipsApi(apiClient);
let orgId = 56; // Number | The ID of the organization to get relationships for
apiInstance.getOrganizationRelationships(orgId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
org_id | Number | The ID of the organization to get relationships for |
AllOrganizationRelationshipsGetResponse
- Content-Type: Not defined
- Accept: application/json
OrganizationRelationshipUpdateResponse updateOrganizationRelationship(id, opts)
Update an organization relationship
Updates and returns an organization relationship.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.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 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.OrganizationRelationshipsApi(apiClient);
let id = 56; // Number | The ID of the organization relationship
let opts = Pipedrive.OrganizationRelationship.constructFromObject({
// Properties that you want to update
});
apiInstance.updateOrganizationRelationship(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the organization relationship | |
OrganizationRelationship | OrganizationRelationship | [optional] |
OrganizationRelationshipUpdateResponse
- Content-Type: application/json
- Accept: application/json