Skip to content

Build 191 - version-major #196

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Added archived deals/leads endpoints:
- `GET /v1/deals/archived`
- `GET /v2/deals/archived`
- `GET /v1/deals/timeline/archived`
- `GET /v1/deals/summary/archived`
- `GET /v1/leads/archived`
- Added `is_archived` and `archive_time` properties to deals endpoints response
### Changed
- Updated non archived deals/leads endpoint description to specify that following endpoints do not return archived items:
- `GET /v1/deals`
- `GET /v2/deals`
- `GET /v1/deals/timeline`
- `GET /v1/deals/summary`
- `GET /v1/leads`
- Removed deprecated `archived_status` query parameter from leads endpoints

[9.0.0](https://github.com/pipedrive/client-php/compare/8.1.5...9.0.0) (2025-03-31)

Expand Down
8 changes: 4 additions & 4 deletions docs/versions/v1/Api/ActivitiesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Method | HTTP request | Description
[**deleteActivities()**](ActivitiesApi.md#deleteActivities) | **DELETE** /activities | Delete multiple activities in bulk
[**deleteActivity()**](ActivitiesApi.md#deleteActivity) | **DELETE** /activities/{id} | Delete an activity
[**getActivities()**](ActivitiesApi.md#getActivities) | **GET** /activities | Get all activities assigned to a particular user
[**getActivitiesCollection()**](ActivitiesApi.md#getActivitiesCollection) | **GET** /activities/collection | Get all activities (BETA)
[**getActivitiesCollection()**](ActivitiesApi.md#getActivitiesCollection) | **GET** /activities/collection | Get all activities collection
[**getActivity()**](ActivitiesApi.md#getActivity) | **GET** /activities/{id} | Get details of an activity
[**updateActivity()**](ActivitiesApi.md#updateActivity) | **PUT** /activities/{id} | Update an activity

Expand Down Expand Up @@ -86,7 +86,7 @@ deleteActivities($ids): \Pipedrive\versions\v1\Model\DeleteActivitiesResponse

Delete multiple activities in bulk

Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted. <br>This endpoint has been deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/Activities#deleteActivity\" target=\"_blank\" rel=\"noopener noreferrer\">DELETE /api/v2/activities/{id}</a> instead.

### Example

Expand Down Expand Up @@ -293,9 +293,9 @@ Name | Type | Description | Notes
getActivitiesCollection($cursor, $limit, $since, $until, $user_id, $done, $type): \Pipedrive\versions\v1\Model\GetActivitiesCollectionResponse
```

Get all activities (BETA)
Get all activities collection

Returns all activities. 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</a>. 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</a>.
Returns all activities. Please note that only global admins (those with global permissions) can access this endpoint. 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</a>. <br>This endpoint has been deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/Activities#getActivities\" target=\"_blank\" rel=\"noopener noreferrer\">GET /api/v2/activities</a> instead.

### Example

Expand Down
262 changes: 253 additions & 9 deletions docs/versions/v1/Api/DealsApi.md

Large diffs are not rendered by default.

86 changes: 81 additions & 5 deletions docs/versions/v1/Api/LeadsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**addLead()**](LeadsApi.md#addLead) | **POST** /leads | Add a lead
[**deleteLead()**](LeadsApi.md#deleteLead) | **DELETE** /leads/{id} | Delete a lead
[**getArchivedLeads()**](LeadsApi.md#getArchivedLeads) | **GET** /leads/archived | Get all archived leads
[**getLead()**](LeadsApi.md#getLead) | **GET** /leads/{id} | Get one lead
[**getLeadUsers()**](LeadsApi.md#getLeadUsers) | **GET** /leads/{id}/permittedUsers | List permitted users
[**getLeads()**](LeadsApi.md#getLeads) | **GET** /leads | Get all leads
Expand Down Expand Up @@ -143,6 +144,83 @@ Name | Type | Description | Notes
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

## `getArchivedLeads()`

```php
getArchivedLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort): \Pipedrive\versions\v1\Model\GetLeadsResponse
```

Get all archived leads

Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.

### Example

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


// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v1\Configuration())->setApiKey('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('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\LeadsApi(
// 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
);
$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
$start = 0; // int | For pagination, the position that represents the first result for the page
$owner_id = 1; // int | If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied.
$person_id = 1; // int | If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied.
$organization_id = 1; // int | If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied.
$filter_id = 1; // int | The ID of the filter to use
$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->getArchivedLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadsApi->getArchivedLeads: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **int**| For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. | [optional]
**start** | **int**| For pagination, the position that represents the first result for the page | [optional]
**owner_id** | **int**| If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied. | [optional]
**person_id** | **int**| If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied. | [optional]
**organization_id** | **int**| If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied. | [optional]
**filter_id** | **int**| The ID of the filter to use | [optional]
**sort** | **string**| The field names and sorting mode separated by a comma (&#x60;field_name_1 ASC&#x60;, &#x60;field_name_2 DESC&#x60;). Only first-level field keys are supported (no nested keys). | [optional]

### Return type

[**\Pipedrive\versions\v1\Model\GetLeadsResponse**](../Model/GetLeadsResponse.md)

### Authorization

[api_key](../README.md#api_key), [oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

## `getLead()`

```php
Expand Down Expand Up @@ -276,12 +354,12 @@ Name | Type | Description | Notes
## `getLeads()`

```php
getLeads($limit, $start, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort): \Pipedrive\versions\v1\Model\GetLeadsResponse
getLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort): \Pipedrive\versions\v1\Model\GetLeadsResponse
```

Get all leads

Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.
Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.

### Example

Expand All @@ -307,15 +385,14 @@ $apiInstance = new Pipedrive\versions\v1\Api\LeadsApi(
);
$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
$start = 0; // int | For pagination, the position that represents the first result for the page
$archived_status = 'archived_status_example'; // string | Filtering based on the archived status of a lead. If not provided, `All` is used.
$owner_id = 1; // int | If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied.
$person_id = 1; // int | If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied.
$organization_id = 1; // int | If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied.
$filter_id = 1; // int | The ID of the filter to use
$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->getLeads($limit, $start, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort);
$result = $apiInstance->getLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadsApi->getLeads: ', $e->getMessage(), PHP_EOL;
Expand All @@ -328,7 +405,6 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **int**| For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. | [optional]
**start** | **int**| For pagination, the position that represents the first result for the page | [optional]
**archived_status** | **string**| Filtering based on the archived status of a lead. If not provided, &#x60;All&#x60; is used. | [optional]
**owner_id** | **int**| If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied. | [optional]
**person_id** | **int**| If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied. | [optional]
**organization_id** | **int**| If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied. | [optional]
Expand Down
14 changes: 7 additions & 7 deletions docs/versions/v1/Api/OrganizationsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Method | HTTP request | Description
[**getOrganizationUpdates()**](OrganizationsApi.md#getOrganizationUpdates) | **GET** /organizations/{id}/flow | List updates about an organization
[**getOrganizationUsers()**](OrganizationsApi.md#getOrganizationUsers) | **GET** /organizations/{id}/permittedUsers | List permitted users
[**getOrganizations()**](OrganizationsApi.md#getOrganizations) | **GET** /organizations | Get all organizations
[**getOrganizationsCollection()**](OrganizationsApi.md#getOrganizationsCollection) | **GET** /organizations/collection | Get all organizations (BETA)
[**getOrganizationsCollection()**](OrganizationsApi.md#getOrganizationsCollection) | **GET** /organizations/collection | Get all organizations collection
[**mergeOrganizations()**](OrganizationsApi.md#mergeOrganizations) | **PUT** /organizations/{id}/merge | Merge two organizations
[**searchOrganization()**](OrganizationsApi.md#searchOrganization) | **GET** /organizations/search | Search organizations
[**updateOrganization()**](OrganizationsApi.md#updateOrganization) | **PUT** /organizations/{id} | Update an organization
Expand Down Expand Up @@ -298,7 +298,7 @@ deleteOrganizations($ids): \Pipedrive\versions\v1\Model\OrganizationsDeleteRespo

Delete multiple organizations in bulk

Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted. <br>This endpoint has been deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/Organizations#deleteOrganization\" target=\"_blank\" rel=\"noopener noreferrer\">DELETE /api/v2/organizations/{id}</a> instead.

### Example

Expand Down Expand Up @@ -428,7 +428,7 @@ getOrganizationActivities($id, $start, $limit, $done, $exclude): \Pipedrive\vers

List activities associated with an organization

Lists activities associated with an organization.
Lists activities associated with an organization. <br>This endpoint has been deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/Activities#getActivities\" target=\"_blank\" rel=\"noopener noreferrer\">GET /api/v2/activities?org_id={id}</a> instead.

### Example

Expand Down Expand Up @@ -570,7 +570,7 @@ getOrganizationDeals($id, $start, $limit, $status, $sort, $only_primary_associat

List deals associated with an organization

Lists deals associated with an organization.
Lists deals associated with an organization. <br>This endpoint has been deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/Deals#getDeals\" target=\"_blank\" rel=\"noopener noreferrer\">GET /api/v2/deals?org_id={id}</a> instead.

### Example

Expand Down Expand Up @@ -850,7 +850,7 @@ getOrganizationPersons($id, $start, $limit): \Pipedrive\versions\v1\Model\ListPe

List persons of an organization

Lists persons associated with an organization.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
Lists persons associated with an organization.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field. <br>This endpoint has been deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/Persons#getPersons\" target=\"_blank\" rel=\"noopener noreferrer\">GET /api/v2/persons?org_id={id}</a> instead.

### Example

Expand Down Expand Up @@ -1130,9 +1130,9 @@ Name | Type | Description | Notes
getOrganizationsCollection($cursor, $limit, $since, $until, $owner_id, $first_char): \Pipedrive\versions\v1\Model\InlineResponse200
```

Get all organizations (BETA)
Get all organizations collection

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</a>. 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</a>.
Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. 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</a>. <br>This endpoint has been deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/Organizations#getOrganizations\" target=\"_blank\" rel=\"noopener noreferrer\">GET /api/v2/organizations</a> instead.

### Example

Expand Down
Loading