Skip to content

Latest commit

 

History

History
341 lines (233 loc) · 11.5 KB

OrganizationRelationshipsApi.md

File metadata and controls

341 lines (233 loc) · 11.5 KB

Pipedrive\OrganizationRelationshipsApi

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

addOrganizationRelationship()

addOrganizationRelationship($add_organization_relationship_request): \Pipedrive\Model\OrganizationRelationshipPostResponse

Create an organization relationship

Creates and returns an organization relationship.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\OrganizationRelationshipsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$add_organization_relationship_request = new \Pipedrive\Model\AddOrganizationRelationshipRequest(); // \Pipedrive\Model\AddOrganizationRelationshipRequest

try {
    $result = $apiInstance->addOrganizationRelationship($add_organization_relationship_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationRelationshipsApi->addOrganizationRelationship: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
add_organization_relationship_request \Pipedrive\Model\AddOrganizationRelationshipRequest [optional]

Return type

\Pipedrive\Model\OrganizationRelationshipPostResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteOrganizationRelationship()

deleteOrganizationRelationship($id): \Pipedrive\Model\OrganizationRelationshipDeleteResponse

Delete an organization relationship

Deletes an organization relationship and returns the deleted ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\OrganizationRelationshipsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the organization relationship

try {
    $result = $apiInstance->deleteOrganizationRelationship($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationRelationshipsApi->deleteOrganizationRelationship: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the organization relationship

Return type

\Pipedrive\Model\OrganizationRelationshipDeleteResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getOrganizationRelationship()

getOrganizationRelationship($id, $org_id): \Pipedrive\Model\OrganizationRelationshipGetResponse

Get one organization relationship

Finds and returns an organization relationship from its ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\OrganizationRelationshipsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the organization relationship
$org_id = 56; // int | The ID of the base organization for the returned calculated values

try {
    $result = $apiInstance->getOrganizationRelationship($id, $org_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationRelationshipsApi->getOrganizationRelationship: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the organization relationship
org_id int The ID of the base organization for the returned calculated values [optional]

Return type

\Pipedrive\Model\OrganizationRelationshipGetResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getOrganizationRelationships()

getOrganizationRelationships($org_id): \Pipedrive\Model\AllOrganizationRelationshipsGetResponse

Get all relationships for organization

Gets all of the relationships for a supplied organization ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\OrganizationRelationshipsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$org_id = 56; // int | The ID of the organization to get relationships for

try {
    $result = $apiInstance->getOrganizationRelationships($org_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationRelationshipsApi->getOrganizationRelationships: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id int The ID of the organization to get relationships for

Return type

\Pipedrive\Model\AllOrganizationRelationshipsGetResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateOrganizationRelationship()

updateOrganizationRelationship($id, $organization_relationship): \Pipedrive\Model\OrganizationRelationshipUpdateResponse

Update an organization relationship

Updates and returns an organization relationship.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\OrganizationRelationshipsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the organization relationship
$organization_relationship = new \Pipedrive\Model\OrganizationRelationship(); // \Pipedrive\Model\OrganizationRelationship

try {
    $result = $apiInstance->updateOrganizationRelationship($id, $organization_relationship);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationRelationshipsApi->updateOrganizationRelationship: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the organization relationship
organization_relationship \Pipedrive\Model\OrganizationRelationship [optional]

Return type

\Pipedrive\Model\OrganizationRelationshipUpdateResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]