All URIs are relative to https://api.pipedrive.com/v1.
Method | HTTP request | Description |
---|---|---|
addProduct() | POST /products | Add a product |
addProductFollower() | POST /products/{id}/followers | Add a follower to a product |
deleteProduct() | DELETE /products/{id} | Delete a product |
deleteProductFollower() | DELETE /products/{id}/followers/{follower_id} | Delete a follower from a product |
getProduct() | GET /products/{id} | Get one product |
getProductDeals() | GET /products/{id}/deals | Get deals where a product is attached to |
getProductFiles() | GET /products/{id}/files | List files attached to a product |
getProductFollowers() | GET /products/{id}/followers | List followers of a product |
getProductUsers() | GET /products/{id}/permittedUsers | List permitted users |
getProducts() | GET /products | Get all products |
searchProducts() | GET /products/search | Search products |
updateProduct() | PUT /products/{id} | Update a product |
addProduct($add_product_request_body): \Pipedrive\Model\ProductResponse
Add a product
Adds a new product to the Products inventory. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/adding-a-product\" target="_blank" rel="noopener noreferrer">adding a product.
<?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\ProductsApi(
// 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
);
$add_product_request_body = new \Pipedrive\Model\AddProductRequestBody(); // \Pipedrive\Model\AddProductRequestBody
try {
$result = $apiInstance->addProduct($add_product_request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->addProduct: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
add_product_request_body | \Pipedrive\Model\AddProductRequestBody | [optional] |
\Pipedrive\Model\ProductResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
addProductFollower($id, $add_product_follower_request): \Pipedrive\Model\NewFollowerResponse
Add a follower to a product
Adds a follower to a product.
<?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\ProductsApi(
// 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 product
$add_product_follower_request = new \Pipedrive\Model\AddProductFollowerRequest(); // \Pipedrive\Model\AddProductFollowerRequest
try {
$result = $apiInstance->addProductFollower($id, $add_product_follower_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->addProductFollower: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product | |
add_product_follower_request | \Pipedrive\Model\AddProductFollowerRequest | [optional] |
\Pipedrive\Model\NewFollowerResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteProduct($id): \Pipedrive\Model\DeleteProductResponse
Delete a product
Marks a product as deleted. After 30 days, the product 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\ProductsApi(
// 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 product
try {
$result = $apiInstance->deleteProduct($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->deleteProduct: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product |
\Pipedrive\Model\DeleteProductResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteProductFollower($id, $follower_id): \Pipedrive\Model\DeleteProductFollowerResponse
Delete a follower from a product
Deletes a follower from a product.
<?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\ProductsApi(
// 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 product
$follower_id = 56; // int | The ID of the relationship between the follower and the product
try {
$result = $apiInstance->deleteProductFollower($id, $follower_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->deleteProductFollower: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product | |
follower_id | int | The ID of the relationship between the follower and the product |
\Pipedrive\Model\DeleteProductFollowerResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProduct($id): \Pipedrive\Model\ProductResponse
Get one product
Returns data about a specific product.
<?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\ProductsApi(
// 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 product
try {
$result = $apiInstance->getProduct($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProduct: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product |
\Pipedrive\Model\ProductResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductDeals($id, $start, $limit, $status): \Pipedrive\Model\ListDealsResponse
Get deals where a product is attached to
Returns data about deals that have a product attached to it.
<?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\ProductsApi(
// 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 product
$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.
try {
$result = $apiInstance->getProductDeals($id, $start, $limit, $status);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProductDeals: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product | |
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'] |
\Pipedrive\Model\ListDealsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductFiles($id, $start, $limit, $sort): \Pipedrive\Model\ListProductFilesResponse
List files attached to a product
Lists files associated with a product.
<?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\ProductsApi(
// 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 product
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
$sort = 'sort_example'; // string | The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`.
try {
$result = $apiInstance->getProductFiles($id, $start, $limit, $sort);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProductFiles: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product | |
start | int | Pagination start | [optional] [default to 0] |
limit | int | Items shown per page | [optional] |
sort | string | The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`. | [optional] |
\Pipedrive\Model\ListProductFilesResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductFollowers($id, $start, $limit): \Pipedrive\Model\ListProductFollowersResponse
List followers of a product
Lists the followers of a product.
<?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\ProductsApi(
// 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 product
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
try {
$result = $apiInstance->getProductFollowers($id, $start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProductFollowers: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product | |
start | int | Pagination start | [optional] [default to 0] |
limit | int | Items shown per page | [optional] |
\Pipedrive\Model\ListProductFollowersResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductUsers($id): \Pipedrive\Model\UserIDs
List permitted users
Lists users permitted to access a product.
<?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\ProductsApi(
// 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 product
try {
$result = $apiInstance->getProductUsers($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProductUsers: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProducts($user_id, $filter_id, $ids, $first_char, $get_summary, $start, $limit): \Pipedrive\Model\ProductsResponse
Get all products
Returns data about all products.
<?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\ProductsApi(
// 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 products owned by the given user will be returned
$filter_id = 56; // int | The ID of the filter to use
$ids = array(56); // int[] | An array of integers with the IDs of the products that should be returned in the response
$first_char = 'first_char_example'; // string | If supplied, only products whose name starts with the specified letter will be returned (case-insensitive)
$get_summary = True; // bool | If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
try {
$result = $apiInstance->getProducts($user_id, $filter_id, $ids, $first_char, $get_summary, $start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProducts: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
user_id | int | If supplied, only products owned by the given user will be returned | [optional] |
filter_id | int | The ID of the filter to use | [optional] |
ids | int[] | An array of integers with the IDs of the products that should be returned in the response | [optional] |
first_char | string | If supplied, only products whose name starts with the specified letter will be returned (case-insensitive) | [optional] |
get_summary | bool | If supplied, the response will return the total numbers of products in the `additional_data.summary.total_count` property | [optional] |
start | int | Pagination start | [optional] [default to 0] |
limit | int | Items shown per page | [optional] |
\Pipedrive\Model\ProductsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
searchProducts($term, $fields, $exact_match, $include_fields, $start, $limit): \Pipedrive\Model\ProductSearchResponse
Search products
Searches all products by name, code 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\ProductsApi(
// 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.
$include_fields = 'include_fields_example'; // string | Supports including optional fields in the results which are not provided by default
$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->searchProducts($term, $fields, $exact_match, $include_fields, $start, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->searchProducts: ', $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] |
include_fields | string | Supports including optional fields in the results which are not provided by default | [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\ProductSearchResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateProduct($id, $update_product_request_body): \Pipedrive\Model\UpdateProductResponse
Update a product
Updates product data.
<?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\ProductsApi(
// 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 product
$update_product_request_body = new \Pipedrive\Model\UpdateProductRequestBody(); // \Pipedrive\Model\UpdateProductRequestBody
try {
$result = $apiInstance->updateProduct($id, $update_product_request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->updateProduct: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | The ID of the product | |
update_product_request_body | \Pipedrive\Model\UpdateProductRequestBody | [optional] |
\Pipedrive\Model\UpdateProductResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]