Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
dist: focal
php:
- 7.3
- 7.4
- 8.1
- 8.2
before_install: "composer install"
script: "vendor/bin/phpunit"
script: "vendor/bin/pest"
36 changes: 25 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Added
- Added `website`, `linkedin`, `industry`, `annual_revenue`, and `employee_count` fields to v2 organization response schema (`GET /api/v2/organizations`, `GET /api/v2/organizations/{id}`) — all nullable, not included by default
- Added `deal_id`, `person_id`, and `org_id` as optional query filter parameters to `GET /api/v2/projects`
### Fixed
- Fixed `deal_ids` query parameter serialization in `GET /api/v2/deals/products` — the array is now correctly encoded as a comma-separated string (e.g. `deal_ids=1,2,3`) to match the expected backend format
- Fixed `BillingStartDate` format from non-standard `'YYYY-MM-DD'` to correct OAS3 `date` format in both v1 and v2 deal product schemas

## [16.0.0](https://github.com/pipedrive/client-php/compare/15.7.0...16.0.0) (2026-05-05)
### Added
- Added projects v2 API
- Added project boards v2 API
- Added project phases v2 API
Expand All @@ -15,18 +23,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added project fields v2 API
- Added `include_option_labels` parameter for v2 GET deal, person and organization endpoints
- Added `include_labels` parameter to v2 GET deal, person, and organization endpoints
- Added `source_deal_id` field to Lead schema to track the deal ID when a lead is converted from a deal
- Added `source_lead_id` field to v2 Deal schema to track the lead ID when a lead is converted from a lead
- Added `include_field_code` query parameter to Filters endpoints:
- `GET /v1/filters/{id}`
- `PUT /v1/filters/{id}`
- `POST /v1/filters`
- When set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name. The value is `null` if the field code cannot be resolved.
- Added `assignee_ids` field to Tasks endpoints:
- `GET /v1/tasks`
- `GET /v1/tasks/{id}`
- `POST /v1/tasks`
- `PUT /v1/tasks/{id}`
- Added `task_id` field support to Notes endpoints:
- `GET /v1/notes` — new `task_id` and `pinned_to_task_flag` query parameters
- `POST /v1/notes` — new optional `task_id` field in request body
- `PUT /v1/notes/{id}` — new optional `task_id` field in request body
- Response schema includes new `task_id`, `task` (with `title`), and `pinned_to_task_flag` fields
### Removed
- Removed deprecated v1 endpoints that have v2 equivalents. See the [deprecation announcement](https://developers.pipedrive.com/changelog/post/deprecation-of-selected-api-v1-endpoints) for details. Please migrate to the corresponding v2 endpoints listed below:
- `GET /v1/activities` → `GET /api/v2/activities`
Expand Down Expand Up @@ -87,17 +93,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `DELETE /v1/stages/{id}` → `DELETE /api/v2/stages/{id}`
### Fixed
- Made `picture_id`, `org_id`, `label`, `last_name`, `cc_email`, `last_incoming_mail_time`, and `last_outgoing_mail_time` nullable in person and organization schemas to match real API behavior
### Changed
- Changed `board_id` and `phase_id` to be optional in `POST /api/v1/projects`

## [16.0.0](https://github.com/pipedrive/client-php/compare/15.7.0...16.0.0) (2026-05-05)

## [15.7.0](https://github.com/pipedrive/client-php/compare/15.6.0...15.7.0) (2026-05-05)
### Changed
- Changed `board_id` and `phase_id` to be optional in `POST /api/v1/projects`

## [15.6.0](https://github.com/pipedrive/client-php/compare/15.5.0...15.6.0) (2026-05-05)
### Added
- Added `source_deal_id` field to Lead schema to track the deal ID when a lead is converted from a deal
- Added `source_lead_id` field to v2 Deal schema to track the lead ID when a lead is converted from a lead

## [15.5.0](https://github.com/pipedrive/client-php/compare/15.4.0...15.5.0) (2026-04-16)

### Added
- Added `include_field_code` query parameter to Filters endpoints:
- `GET /v1/filters/{id}`
- `PUT /v1/filters/{id}`
- `POST /v1/filters`
- When set to `true`, each condition in the response includes a `field_code` field identifying the field by its code name. The value is `null` if the field code cannot be resolved.

## [15.4.0](https://github.com/pipedrive/client-php/compare/15.3.0...15.4.0) (2026-02-16)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This SDK supports two API versions, each with its own namespace and documentatio

### Requirements

PHP 7.4+ and later.
PHP 8.0+ and later.

### Composer

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"homepage": "https://github.com/pipedrive/client-php",
"license": "MIT",
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
Expand Down
10 changes: 8 additions & 2 deletions docs/versions/v2/Api/ProjectsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ Name | Type | Description | Notes
## `getProjects()`

```php
getProjects($filter_id, $status, $phase_id, $limit, $cursor): \Pipedrive\versions\v2\Model\GetProjects
getProjects($filter_id, $status, $phase_id, $deal_id, $person_id, $org_id, $limit, $cursor): \Pipedrive\versions\v2\Model\GetProjects
```

Get all projects
Expand Down Expand Up @@ -518,11 +518,14 @@ $apiInstance = new Pipedrive\versions\v2\Api\ProjectsApi(
$filter_id = 56; // int | If supplied, only projects matching the specified filter are returned
$status = open,completed; // string | If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned.
$phase_id = 56; // int | If supplied, only projects in the specified phase are returned
$deal_id = 56; // int | If supplied, only projects associated with the specified deal are returned
$person_id = 56; // int | If supplied, only projects associated with the specified person are returned
$org_id = 56; // int | If supplied, only projects associated with the specified organization are returned
$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.
$cursor = 'cursor_example'; // string | For pagination, the marker (an opaque string value) representing the first item on the next page

try {
$result = $apiInstance->getProjects($filter_id, $status, $phase_id, $limit, $cursor);
$result = $apiInstance->getProjects($filter_id, $status, $phase_id, $deal_id, $person_id, $org_id, $limit, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getProjects: ', $e->getMessage(), PHP_EOL;
Expand All @@ -536,6 +539,9 @@ Name | Type | Description | Notes
**filter_id** | **int**| If supplied, only projects matching the specified filter are returned | [optional]
**status** | **string**| If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned. | [optional]
**phase_id** | **int**| If supplied, only projects in the specified phase are returned | [optional]
**deal_id** | **int**| If supplied, only projects associated with the specified deal are returned | [optional]
**person_id** | **int**| If supplied, only projects associated with the specified person are returned | [optional]
**org_id** | **int**| If supplied, only projects associated with the specified organization are returned | [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]
**cursor** | **string**| For pagination, the marker (an opaque string value) representing the first item on the next page | [optional]

Expand Down
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/BaseDealProduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Name | Type | Description | Notes
**is_enabled** | **bool** | Whether this product is enabled for the deal | [optional] [default to true]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency**](BillingFrequency.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/BaseDealProductAllOf3.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/NewDealProductRequestBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Name | Type | Description | Notes
**product_variation_id** | **int** | The ID of the product variation | [optional]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency**](BillingFrequency.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
5 changes: 5 additions & 0 deletions docs/versions/v2/Model/OrganizationItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Name | Type | Description | Notes
**visible_to** | **int** | The visibility of the organization | [optional]
**address** | [**\Pipedrive\versions\v2\Model\OrganizationItemAddress**](OrganizationItemAddress.md) | | [optional]
**label_ids** | **int[]** | The IDs of labels assigned to the organization | [optional]
**website** | **string** | The website of the organization | [optional]
**linkedin** | **string** | The LinkedIn profile URL of the organization | [optional]
**industry** | **int** | The industry the organization belongs to | [optional]
**annual_revenue** | **int** | The annual revenue of the organization | [optional]
**employee_count** | **int** | The number of employees in the organization | [optional]
**custom_fields** | **array<string,object>** | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to &#x60;null&#x60;. For multi-option fields (field type &#x60;set&#x60;), use &#x60;null&#x60; to clear the selection — sending an empty array &#x60;[]&#x60; is not supported and will result in a validation error. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/UpdateDealProductRequestBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Name | Type | Description | Notes
**product_variation_id** | **int** | The ID of the product variation | [optional]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency**](BillingFrequency.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When &#x60;billing_frequency&#x60; is set to &#x60;one-time&#x60;, this field must be &#x60;null&#x60; When &#x60;billing_frequency&#x60; is set to &#x60;weekly&#x60;, this field cannot be &#x60;null&#x60; For all the other values of &#x60;billing_frequency&#x60;, &#x60;null&#x60; represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/ActivityFieldsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ActivityFieldsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class ActivityFieldsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/ActivityTypesApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ActivityTypesApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class ActivityTypesApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/BillingApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* BillingApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class BillingApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/CallLogsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* CallLogsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class CallLogsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/ChannelsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ChannelsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class ChannelsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/CurrenciesApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* CurrenciesApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class CurrenciesApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/DealFieldsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* DealFieldsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class DealFieldsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/DealsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* DealsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class DealsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/FilesApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* FilesApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class FilesApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
Loading