All URIs are relative to https://api.pipedrive.com/v1.
Method | HTTP request | Description |
---|---|---|
addOrganization() | POST /organizations | Add an organization |
addOrganizationFollower() | POST /organizations/{id}/followers | Add a follower to an organization |
deleteOrganization() | DELETE /organizations/{id} | Delete an organization |
deleteOrganizationFollower() | DELETE /organizations/{id}/followers/{follower_id} | Delete a follower from an organization |
deleteOrganizations() | DELETE /organizations | Delete multiple organizations in bulk |
getOrganization() | GET /organizations/{id} | Get details of an organization |
getOrganizationActivities() | GET /organizations/{id}/activities | List activities associated with an organization |
getOrganizationDeals() | GET /organizations/{id}/deals | List deals associated with an organization |
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 |
getOrganizationPersons() | GET /organizations/{id}/persons | List persons of an organization |
getOrganizationUpdates() | GET /organizations/{id}/flow | List updates about an organization |
getOrganizationUsers() | GET /organizations/{id}/permittedUsers | List permitted users |
getOrganizations() | GET /organizations | Get all organizations |
getOrganizationsCollection() | GET /organizations/collection | Get all organizations (BETA) |
mergeOrganizations() | PUT /organizations/{id}/merge | Merge two organizations |
searchOrganization() | GET /organizations/search | Search organizations |
updateOrganization() | PUT /organizations/{id} | Update an organization |
addOrganization($new_organization): \Pipedrive\Model\OrganizationPostResponse
Add an organization
Adds a new organization. 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 organizationFields and look for key
values. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/adding-an-organization\" target="_blank" rel="noopener noreferrer">adding an organization.
<?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\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
);
$new_organization = new \Pipedrive\Model\NewOrganization(); // \Pipedrive\Model\NewOrganization
try {
$result = $apiInstance->addOrganization($new_organization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->addOrganization: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
new_organization | \Pipedrive\Model\NewOrganization | [optional] |
\Pipedrive\Model\OrganizationPostResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
addOrganizationFollower($id, $add_organization_follower_request): \Pipedrive\Model\OrganizationFollowerPostResponse
Add a follower to an organization
Adds a follower to an organization.
<?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\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\Model\AddOrganizationFollowerRequest(); // \Pipedrive\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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization | |
add_organization_follower_request | \Pipedrive\Model\AddOrganizationFollowerRequest | [optional] |
\Pipedrive\Model\OrganizationFollowerPostResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteOrganization($id): \Pipedrive\Model\OrganizationDeleteResponse
Delete an organization
Marks an organization as deleted. After 30 days, the organization will be permanently deleted.
<?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\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->deleteOrganization($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->deleteOrganization: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization |
\Pipedrive\Model\OrganizationDeleteResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteOrganizationFollower($id, $follower_id): \Pipedrive\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.
<?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');
$apiInstance = new Pipedrive\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 follower
try {
$result = $apiInstance->deleteOrganizationFollower($id, $follower_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->deleteOrganizationFollower: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization | |
follower_id | int | The ID of the follower |
\Pipedrive\Model\OrganizationFollowerDeleteResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteOrganizations($ids): \Pipedrive\Model\OrganizationsDeleteResponse
Delete multiple organizations in bulk
Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
<?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\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
);
$ids = 'ids_example'; // string | The comma-separated IDs that will be deleted
try {
$result = $apiInstance->deleteOrganizations($ids);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->deleteOrganizations: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
ids | string | The comma-separated IDs that will be deleted |
\Pipedrive\Model\OrganizationsDeleteResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganization($id): \Pipedrive\Model\OrganizationDetailsGetResponse
Get details of an organization
Returns the details of an organization. Note that this also returns some additional fields which are not present when asking for all organizations. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the key
value of organizationFields.
<?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\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->getOrganization($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganization: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization |
\Pipedrive\Model\OrganizationDetailsGetResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationActivities($id, $start, $limit, $done, $exclude): \Pipedrive\Model\ListActivitiesResponse
List activities associated with an organization
Lists activities associated with an organization.
<?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\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
$done = new \Pipedrive\Model\\Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\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
try {
$result = $apiInstance->getOrganizationActivities($id, $start, $limit, $done, $exclude);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganizationActivities: ', $e->getMessage(), PHP_EOL;
}
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] |
done | \Pipedrive\Model\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] |
\Pipedrive\Model\ListActivitiesResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationDeals($id, $start, $limit, $status, $sort, $only_primary_association): \Pipedrive\Model\ListDealsResponse
List deals associated with an organization
Lists deals associated with an organization.
<?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\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
$status = 'all_not_deleted'; // string | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
$sort = 'sort_example'; // string | The 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).
$only_primary_association = new \Pipedrive\Model\\Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization.
try {
$result = $apiInstance->getOrganizationDeals($id, $start, $limit, $status, $sort, $only_primary_association);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganizationDeals: ', $e->getMessage(), PHP_EOL;
}
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] |
status | string | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. | [optional] [default to 'all_not_deleted'] |
sort | string | The 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] |
only_primary_association | \Pipedrive\Model\NumberBoolean | If set, only deals that are directly associated to the organization are fetched. If not set (default), all deals are fetched that are either directly or indirectly related to the organization. Indirect relations include relations through custom, organization-type fields and through persons of the given organization. | [optional] |
\Pipedrive\Model\ListDealsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationFiles($id, $start, $limit, $sort): \Pipedrive\Model\ListFilesResponse
List files attached to an organization
Lists files associated with an organization.
<?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\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
$sort = 'sort_example'; // string | The 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`.
try {
$result = $apiInstance->getOrganizationFiles($id, $start, $limit, $sort);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganizationFiles: ', $e->getMessage(), PHP_EOL;
}
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] |
sort | string | The 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] |
\Pipedrive\Model\ListFilesResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationFollowers($id): \Pipedrive\Model\OrganizationFollowersListResponse
List followers of an organization
Lists the followers of an organization.
<?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\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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization |
\Pipedrive\Model\OrganizationFollowersListResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationMailMessages($id, $start, $limit): \Pipedrive\Model\ListMailMessagesResponse
List mail messages associated with an organization
Lists mail messages associated with an organization.
<?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\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;
}
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] |
\Pipedrive\Model\ListMailMessagesResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationPersons($id, $start, $limit): \Pipedrive\Model\ListPersonsResponse
List persons of an organization
Lists persons associated with an organization.
If a company uses the Campaigns product, then this endpoint will also return the data.marketing_status
field.
<?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\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->getOrganizationPersons($id, $start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganizationPersons: ', $e->getMessage(), PHP_EOL;
}
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] |
\Pipedrive\Model\ListPersonsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationUpdates($id, $start, $limit, $all_changes, $items): \Pipedrive\Model\OrganizationFlowResponse
List updates about an organization
Lists updates about an organization.
<?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\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;
}
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] |
\Pipedrive\Model\OrganizationFlowResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationUsers($id): \Pipedrive\Model\ListPermittedUsersResponse1
List permitted users
List users permitted to access an organization.
<?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');
$apiInstance = new Pipedrive\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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization |
\Pipedrive\Model\ListPermittedUsersResponse1
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizations($user_id, $filter_id, $first_char, $start, $limit, $sort): \Pipedrive\Model\AllOrganizationsGetResponse
Get all organizations
Returns all organizations.
<?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\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
);
$user_id = 56; // int | If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied.
$filter_id = 56; // int | The ID of the filter to use
$first_char = 'first_char_example'; // string | If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
$sort = 'sort_example'; // string | The 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).
try {
$result = $apiInstance->getOrganizations($user_id, $filter_id, $first_char, $start, $limit, $sort);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganizations: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
user_id | int | If supplied, only organizations owned by the given user will be returned. However, `filter_id` takes precedence over `user_id` when both are supplied. | [optional] |
filter_id | int | The ID of the filter to use | [optional] |
first_char | string | If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) | [optional] |
start | int | Pagination start | [optional] [default to 0] |
limit | int | Items shown per page | [optional] |
sort | string | The 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] |
\Pipedrive\Model\AllOrganizationsGetResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getOrganizationsCollection($cursor, $limit, $since, $until, $owner_id, $first_char): \Pipedrive\Model\InlineResponse2001
Get all organizations (BETA)
Returns all organizations. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on <a href="https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target="_blank" rel="noopener noreferrer">pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions <a href="https://support.pipedrive.com/en/article/global-user-management\" target="_blank" rel="noopener noreferrer">here.
<?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\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
);
$cursor = 'cursor_example'; // string | For pagination, the marker (an opaque string value) representing the first item on the next page
$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
$since = 'since_example'; // string | The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
$until = 'until_example'; // string | The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field.
$owner_id = 56; // int | If supplied, only organizations owned by the given user will be returned
$first_char = 'first_char_example'; // string | If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive)
try {
$result = $apiInstance->getOrganizationsCollection($cursor, $limit, $since, $until, $owner_id, $first_char);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->getOrganizationsCollection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
cursor | string | For pagination, the marker (an opaque string value) representing the first item on the next page | [optional] |
limit | int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. | [optional] |
since | string | The time boundary that points to the start of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. | [optional] |
until | string | The time boundary that points to the end of the range of data. Datetime in ISO 8601 format. E.g. 2022-11-01 08:55:59. Operates on the `update_time` field. | [optional] |
owner_id | int | If supplied, only organizations owned by the given user will be returned | [optional] |
first_char | string | If supplied, only organizations whose name starts with the specified letter will be returned (case-insensitive) | [optional] |
\Pipedrive\Model\InlineResponse2001
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
mergeOrganizations($id, $merge_organizations_request): \Pipedrive\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.
<?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\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\Model\MergeOrganizationsRequest(); // \Pipedrive\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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization | |
merge_organizations_request | \Pipedrive\Model\MergeOrganizationsRequest | [optional] |
\Pipedrive\Model\OrganizationsMergeResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
searchOrganization($term, $fields, $exact_match, $start, $limit): \Pipedrive\Model\OrganizationSearchResponse
Search organizations
Searches all organizations by name, address, notes and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch with a narrower OAuth scope.
<?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\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
);
$term = 'term_example'; // string | The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
$fields = 'fields_example'; // string | A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
$exact_match = True; // bool | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
$start = 0; // int | 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; // int | Items shown per page
try {
$result = $apiInstance->searchOrganization($term, $fields, $exact_match, $start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->searchOrganization: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
term | string | The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded. | |
fields | string | A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target="_blank" rel="noopener noreferrer">here</a>. | [optional] |
exact_match | bool | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. | [optional] |
start | int | 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 | int | Items shown per page | [optional] |
\Pipedrive\Model\OrganizationSearchResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateOrganization($id, $update_organization): \Pipedrive\Model\OrganizationUpdateResponse
Update an organization
Updates the properties of an organization.
<?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\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
$update_organization = new \Pipedrive\Model\UpdateOrganization(); // \Pipedrive\Model\UpdateOrganization
try {
$result = $apiInstance->updateOrganization($id, $update_organization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrganizationsApi->updateOrganization: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the organization | |
update_organization | \Pipedrive\Model\UpdateOrganization | [optional] |
\Pipedrive\Model\OrganizationUpdateResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]