All URIs are relative to https://api.pipedrive.com/api/v2.
| Method | HTTP request | Description |
|---|---|---|
| addProductField() | POST /productFields | Create one product field |
| addProductFieldOptions() | POST /productFields/{field_code}/options | Add product field options in bulk |
| deleteProductField() | DELETE /productFields/{field_code} | Delete one product field |
| deleteProductFieldOptions() | DELETE /productFields/{field_code}/options | Delete product field options in bulk |
| getProductField() | GET /productFields/{field_code} | Get one product field |
| getProductFields() | GET /productFields | Get all product fields |
| updateProductField() | PATCH /productFields/{field_code} | Update one product field |
| updateProductFieldOptions() | PATCH /productFields/{field_code}/options | Update product field options in bulk |
addProductField($create_product_field_request): \Pipedrive\versions\v2\Model\CreateProductFieldCreate one product field
Creates a new product custom field.
<?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\ProductFieldsApi(
// 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
);
$create_product_field_request = new \Pipedrive\versions\v2\Model\CreateProductFieldRequest(); // \Pipedrive\versions\v2\Model\CreateProductFieldRequest
try {
$result = $apiInstance->addProductField($create_product_field_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->addProductField: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| create_product_field_request | \Pipedrive\versions\v2\Model\CreateProductFieldRequest |
\Pipedrive\versions\v2\Model\CreateProductField
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
addProductFieldOptions($field_code, $request_body): \Pipedrive\versions\v2\Model\InlineResponse200Add product field options in bulk
Adds new options to a product custom field that supports options (enum or set field types). This operation is atomic - all options are added or none are added. Returns only the newly added options.
<?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\ProductFieldsApi(
// 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
);
$field_code = 'field_code_example'; // string | The unique code identifying the field
$request_body = array(new \stdClass); // object[]
try {
$result = $apiInstance->addProductFieldOptions($field_code, $request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->addProductFieldOptions: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_code | string | The unique code identifying the field | |
| request_body | object[] |
\Pipedrive\versions\v2\Model\InlineResponse200
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteProductField($field_code): \Pipedrive\versions\v2\Model\DeleteProductFieldDelete one product field
Marks a custom field as deleted.
<?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\ProductFieldsApi(
// 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
);
$field_code = 'field_code_example'; // string | The unique code identifying the field
try {
$result = $apiInstance->deleteProductField($field_code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->deleteProductField: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_code | string | The unique code identifying the field |
\Pipedrive\versions\v2\Model\DeleteProductField
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteProductFieldOptions($field_code, $request_body): \Pipedrive\versions\v2\Model\InlineResponse200Delete product field options in bulk
Removes existing options from a product custom field. This operation is atomic and fails if any of the specified option IDs do not exist. Returns only the deleted options.
<?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\ProductFieldsApi(
// 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
);
$field_code = 'field_code_example'; // string | The unique code identifying the field
$request_body = array(new \stdClass); // object[]
try {
$result = $apiInstance->deleteProductFieldOptions($field_code, $request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->deleteProductFieldOptions: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_code | string | The unique code identifying the field | |
| request_body | object[] |
\Pipedrive\versions\v2\Model\InlineResponse200
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductField($field_code, $include_fields): \Pipedrive\versions\v2\Model\GetProductFieldGet one product field
Returns metadata about a specific product field.
<?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\ProductFieldsApi(
// 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
);
$field_code = 'field_code_example'; // string | The unique code identifying the field
$include_fields = 'include_fields_example'; // string | Optional comma separated string array of additional data namespaces to include in response
try {
$result = $apiInstance->getProductField($field_code, $include_fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->getProductField: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_code | string | The unique code identifying the field | |
| include_fields | string | Optional comma separated string array of additional data namespaces to include in response | [optional] |
\Pipedrive\versions\v2\Model\GetProductField
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductFields($include_fields, $limit, $cursor): \Pipedrive\versions\v2\Model\GetProductFieldsGet all product fields
Returns metadata about all product fields in the company.
<?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\ProductFieldsApi(
// 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
);
$include_fields = 'include_fields_example'; // string | Optional comma separated string array of additional data namespaces to include in response
$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->getProductFields($include_fields, $limit, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->getProductFields: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| include_fields | string | Optional comma separated string array of additional data namespaces to include in response | [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] |
\Pipedrive\versions\v2\Model\GetProductFields
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateProductField($field_code, $update_product_field_request): \Pipedrive\versions\v2\Model\GetProductFieldUpdate one product field
Updates a product custom field. The field_code and field_type cannot be changed. At least one field must be provided in the request body.
<?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\ProductFieldsApi(
// 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
);
$field_code = 'field_code_example'; // string | The unique code identifying the field
$update_product_field_request = new \Pipedrive\versions\v2\Model\UpdateProductFieldRequest(); // \Pipedrive\versions\v2\Model\UpdateProductFieldRequest
try {
$result = $apiInstance->updateProductField($field_code, $update_product_field_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->updateProductField: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_code | string | The unique code identifying the field | |
| update_product_field_request | \Pipedrive\versions\v2\Model\UpdateProductFieldRequest |
\Pipedrive\versions\v2\Model\GetProductField
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateProductFieldOptions($field_code, $request_body): \Pipedrive\versions\v2\Model\InlineResponse200Update product field options in bulk
Updates existing options for a product custom field. This operation is atomic and fails if any of the specified option IDs do not exist. Returns only the updated options.
<?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\ProductFieldsApi(
// 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
);
$field_code = 'field_code_example'; // string | The unique code identifying the field
$request_body = array(new \stdClass); // object[]
try {
$result = $apiInstance->updateProductFieldOptions($field_code, $request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductFieldsApi->updateProductFieldOptions: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| field_code | string | The unique code identifying the field | |
| request_body | object[] |
\Pipedrive\versions\v2\Model\InlineResponse200
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]