All URIs are relative to https://api.pipedrive.com/api/v2.
| Method | HTTP request | Description |
|---|---|---|
| deleteInstallment() | DELETE /deals/{id}/installments/{installment_id} | Delete an installment from a deal |
| getInstallments() | GET /deals/installments | List installments added to a list of deals |
| postInstallment() | POST /deals/{id}/installments | Add an installment to a deal |
| updateInstallment() | PATCH /deals/{id}/installments/{installment_id} | Update an installment added to a deal |
deleteInstallment($id, $installment_id): \Pipedrive\versions\v2\Model\DeleteInstallmentResponseDelete an installment from a deal
Removes an installment from a deal. Only available in Growth and above plans.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v2\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\v2\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v2\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v2\Api\DealInstallmentsApi(
// 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 deal
$installment_id = 56; // int | The ID of the installment
try {
$result = $apiInstance->deleteInstallment($id, $installment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DealInstallmentsApi->deleteInstallment: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the deal | |
| installment_id | int | The ID of the installment |
\Pipedrive\versions\v2\Model\DeleteInstallmentResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getInstallments($deal_ids, $cursor, $limit, $sort_by, $sort_direction): \Pipedrive\versions\v2\Model\InstallmentsResponseList installments added to a list of deals
Lists installments attached to a list of deals. Only available in Growth and above plans.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v2\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\v2\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v2\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v2\Api\DealInstallmentsApi(
// 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
);
$deal_ids = array(56); // int[] | An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided.
$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.
$sort_by = 'id'; // string | The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`.
$sort_direction = 'asc'; // string | The sorting direction. Supported values: `asc`, `desc`.
try {
$result = $apiInstance->getInstallments($deal_ids, $cursor, $limit, $sort_by, $sort_direction);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DealInstallmentsApi->getInstallments: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| deal_ids | int[] | An array of integers with the IDs of the deals for which the attached installments will be returned. A maximum of 100 deal IDs can be provided. | |
| 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] |
| sort_by | string | The field to sort by. Supported fields: `id`, `billing_date`, `deal_id`. | [optional] [default to 'id'] |
| sort_direction | string | The sorting direction. Supported values: `asc`, `desc`. | [optional] [default to 'asc'] |
\Pipedrive\versions\v2\Model\InstallmentsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
postInstallment($id, $body): \Pipedrive\versions\v2\Model\AddInstallmentResponseAdd an installment to a deal
Adds an installment to a deal. An installment can only be added if the deal includes at least one one-time product. If the deal contains at least one recurring product, adding installments is not allowed. Only available in Growth and above plans.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v2\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\v2\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v2\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v2\Api\DealInstallmentsApi(
// 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 deal
$body = new \stdClass; // object
try {
$result = $apiInstance->postInstallment($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DealInstallmentsApi->postInstallment: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the deal | |
| body | object | [optional] |
\Pipedrive\versions\v2\Model\AddInstallmentResponse
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateInstallment($id, $installment_id, $body): \Pipedrive\versions\v2\Model\UpdateInstallmentResponseUpdate an installment added to a deal
Edits an installment added to a deal. Only available in Growth and above plans.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = (new Pipedrive\versions\v2\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\v2\Configuration())->setApiKeyPrefix('x-api-token', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\versions\v2\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Pipedrive\versions\v2\Api\DealInstallmentsApi(
// 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 deal
$installment_id = 56; // int | The ID of the installment
$body = new \stdClass; // object
try {
$result = $apiInstance->updateInstallment($id, $installment_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DealInstallmentsApi->updateInstallment: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | The ID of the deal | |
| installment_id | int | The ID of the installment | |
| body | object | [optional] |
\Pipedrive\versions\v2\Model\UpdateInstallmentResponse
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]