All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addProductField | POST /productFields | Add a new product field |
deleteProductField | DELETE /productFields/{id} | Delete a product field |
deleteProductFields | DELETE /productFields | Delete multiple product fields in bulk |
getProductField | GET /productFields/{id} | Get one product field |
getProductFields | GET /productFields | Get all product fields |
updateProductField | PUT /productFields/{id} | Update a product field |
GetProductFieldResponse addProductField(opts)
Add a new product field
Adds a new product field. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/adding-a-new-custom-field\" target="_blank" rel="noopener noreferrer">adding a new custom field</a>.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductFieldsApi(apiClient);
let opts = Pipedrive.NewProductField.constructFromObject({
// Properties that you want to update
});
apiInstance.addProductField(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
NewProductField | NewProductField | [optional] |
- Content-Type: application/json
- Accept: application/json
DeleteProductFieldResponse deleteProductField(id)
Delete a product field
Marks a product field as deleted. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/deleting-a-custom-field\" target="_blank" rel="noopener noreferrer">deleting a custom field</a>.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductFieldsApi(apiClient);
let id = 56; // Number | The ID of the product field
apiInstance.deleteProductField(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the product field |
- Content-Type: Not defined
- Accept: application/json
DeleteMultipleProductFieldsResponse deleteProductFields(ids)
Delete multiple product fields in bulk
Marks multiple fields as deleted.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductFieldsApi(apiClient);
let ids = "ids_example"; // String | The comma-separated field IDs to delete
apiInstance.deleteProductFields(ids).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ids | String | The comma-separated field IDs to delete |
DeleteMultipleProductFieldsResponse
- Content-Type: Not defined
- Accept: application/json
GetProductFieldResponse getProductField(id)
Get one product field
Returns data about a specific product field.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductFieldsApi(apiClient);
let id = 56; // Number | The ID of the product field
apiInstance.getProductField(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the product field |
- Content-Type: Not defined
- Accept: application/json
GetAllProductFieldsResponse getProductFields(opts)
Get all product fields
Returns data about all product fields.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductFieldsApi(apiClient);
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getProductFields(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
GetProductFieldResponse updateProductField(id, opts)
Update a product field
Updates a product field. For more information, see the tutorial for <a href=" https://pipedrive.readme.io/docs/updating-custom-field-value " target="_blank" rel="noopener noreferrer">updating custom fields' values</a>.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductFieldsApi(apiClient);
let id = 56; // Number | The ID of the product field
let opts = Pipedrive.UpdateProductField.constructFromObject({
// Properties that you want to update
});
apiInstance.updateProductField(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the product field | |
UpdateProductField | UpdateProductField | [optional] |
- Content-Type: application/json
- Accept: application/json