Skip to content

Latest commit

 

History

History
629 lines (437 loc) · 22.3 KB

File metadata and controls

629 lines (437 loc) · 22.3 KB

Pipedrive\versions\v1\OrganizationsApi

All URIs are relative to https://api.pipedrive.com/v1.

Method HTTP request Description
addOrganizationFollower() POST /organizations/{id}/followers Add a follower to an organization
deleteOrganizationFollower() DELETE /organizations/{id}/followers/{follower_id} Delete a follower from an organization
getOrganizationChangelog() GET /organizations/{id}/changelog List updates about organization field values
getOrganizationFiles() GET /organizations/{id}/files List files attached to an organization
getOrganizationFollowers() GET /organizations/{id}/followers List followers of an organization
getOrganizationMailMessages() GET /organizations/{id}/mailMessages List mail messages associated with an organization
getOrganizationUpdates() GET /organizations/{id}/flow List updates about an organization
getOrganizationUsers() GET /organizations/{id}/permittedUsers List permitted users
mergeOrganizations() PUT /organizations/{id}/merge Merge two organizations

addOrganizationFollower()

addOrganizationFollower($id, $add_organization_follower_request): \Pipedrive\versions\v1\Model\OrganizationFollowerPostResponse

Add a follower to an organization

Adds a follower to an organization.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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
$add_organization_follower_request = new \Pipedrive\versions\v1\Model\AddOrganizationFollowerRequest(); // \Pipedrive\versions\v1\Model\AddOrganizationFollowerRequest

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

Parameters

Name Type Description Notes
id int The ID of the organization
add_organization_follower_request \Pipedrive\versions\v1\Model\AddOrganizationFollowerRequest [optional]

Return type

\Pipedrive\versions\v1\Model\OrganizationFollowerPostResponse

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]

deleteOrganizationFollower()

deleteOrganizationFollower($id, $follower_id): \Pipedrive\versions\v1\Model\OrganizationFollowerDeleteResponse

Delete a follower from an organization

Deletes a follower from an organization. You can retrieve the follower_id from the <a href="https://developers.pipedrive.com/docs/api/v1/Organizations#getOrganizationFollowers\">List followers of an organization endpoint.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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
$follower_id = 56; // int | The ID of the relationship between the follower and the organization

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

Parameters

Name Type Description Notes
id int The ID of the organization
follower_id int The ID of the relationship between the follower and the organization

Return type

\Pipedrive\versions\v1\Model\OrganizationFollowerDeleteResponse

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]

getOrganizationChangelog()

getOrganizationChangelog($id, $cursor, $limit): \Pipedrive\versions\v1\Model\ChangelogResponse

List updates about organization field values

Lists updates about field values of an organization.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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
$cursor = 'cursor_example'; // string | For pagination, the marker (an opaque string value) representing the first item on the next page
$limit = 56; // int | Items shown per page

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

Parameters

Name Type Description Notes
id int The ID of the organization
cursor string For pagination, the marker (an opaque string value) representing the first item on the next page [optional]
limit int Items shown per page [optional]

Return type

\Pipedrive\versions\v1\Model\ChangelogResponse

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]

getOrganizationFiles()

getOrganizationFiles($id, $start, $limit, $sort): \Pipedrive\versions\v1\Model\ListFilesResponse

List files attached to an organization

Lists files associated with an organization.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page. Please note that a maximum value of 100 is allowed.
$sort = 'sort_example'; // string | Supported fields: `id`, `update_time`

try {
    $result = $apiInstance->getOrganizationFiles($id, $start, $limit, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->getOrganizationFiles: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the organization
start int Pagination start [optional] [default to 0]
limit int Items shown per page. Please note that a maximum value of 100 is allowed. [optional]
sort string Supported fields: `id`, `update_time` [optional]

Return type

\Pipedrive\versions\v1\Model\ListFilesResponse

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]

getOrganizationFollowers()

getOrganizationFollowers($id): \Pipedrive\versions\v1\Model\OrganizationFollowersListResponse

List followers of an organization

Lists the followers of an organization.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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

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

Parameters

Name Type Description Notes
id int The ID of the organization

Return type

\Pipedrive\versions\v1\Model\OrganizationFollowersListResponse

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]

getOrganizationMailMessages()

getOrganizationMailMessages($id, $start, $limit): \Pipedrive\versions\v1\Model\ListMailMessagesResponse

List mail messages associated with an organization

Lists mail messages associated with an organization.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page

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

Parameters

Name Type Description Notes
id int The ID of the organization
start int Pagination start [optional] [default to 0]
limit int Items shown per page [optional]

Return type

\Pipedrive\versions\v1\Model\ListMailMessagesResponse

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]

getOrganizationUpdates()

getOrganizationUpdates($id, $start, $limit, $all_changes, $items): \Pipedrive\versions\v1\Model\OrganizationFlowResponse

List updates about an organization

Lists updates about an organization.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
$all_changes = 'all_changes_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).

try {
    $result = $apiInstance->getOrganizationUpdates($id, $start, $limit, $all_changes, $items);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->getOrganizationUpdates: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the organization
start int Pagination start [optional] [default to 0]
limit int Items shown per page [optional]
all_changes 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]

Return type

\Pipedrive\versions\v1\Model\OrganizationFlowResponse

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]

getOrganizationUsers()

getOrganizationUsers($id): \Pipedrive\versions\v1\Model\ListPermittedUsersResponse1

List permitted users

List users permitted to access an organization.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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

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

Parameters

Name Type Description Notes
id int The ID of the organization

Return type

\Pipedrive\versions\v1\Model\ListPermittedUsersResponse1

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]

mergeOrganizations()

mergeOrganizations($id, $merge_organizations_request): \Pipedrive\versions\v1\Model\OrganizationsMergeResponse

Merge two organizations

Merges an organization with another organization. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/merging-two-organizations\" target="_blank" rel="noopener noreferrer">merging two organizations.

Example

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


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

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


$apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi(
    // 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
$merge_organizations_request = new \Pipedrive\versions\v1\Model\MergeOrganizationsRequest(); // \Pipedrive\versions\v1\Model\MergeOrganizationsRequest

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

Parameters

Name Type Description Notes
id int The ID of the organization
merge_organizations_request \Pipedrive\versions\v1\Model\MergeOrganizationsRequest [optional]

Return type

\Pipedrive\versions\v1\Model\OrganizationsMergeResponse

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]