All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addDealField | POST /dealFields | Add a new deal field |
deleteDealField | DELETE /dealFields/{id} | Delete a deal field |
deleteDealFields | DELETE /dealFields | Delete multiple deal fields in bulk |
getDealField | GET /dealFields/{id} | Get one deal field |
getDealFields | GET /dealFields | Get all deal fields |
updateDealField | PUT /dealFields/{id} | Update a deal field |
FieldResponse addDealField(opts)
Add a new deal field
Adds a new deal field. For more information on adding a new custom field, see <a href="https://pipedrive.readme.io/docs/adding-a-new-custom-field\" target="_blank" rel="noopener noreferrer">this tutorial</a>.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.DealFieldsApi();
let opts = {
'name': "name_example", // String | Name of the field
'options': "options_example", // String | When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: [{\\\"id\\\":123,\\\"label\\\":\\\"Existing Item\\\"},{\\\"label\\\":\\\"New Item\\\"}]
'fieldType': new Pipedrive.FieldTypeAsString() // FieldTypeAsString |
};
apiInstance.addDealField(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
name | String | Name of the field | [optional] |
options | String | When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: [{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}] | [optional] |
fieldType | FieldTypeAsString | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
DeleteResponse deleteDealField(id)
Delete a deal field
Marks a field as deleted. For more information on how to delete a custom field, see <a href="https://pipedrive.readme.io/docs/deleting-a-custom-field\" target="_blank" rel="noopener noreferrer">this tutorial</a>.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.DealFieldsApi();
let id = 56; // Number | ID of the field
apiInstance.deleteDealField(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the field |
- Content-Type: Not defined
- Accept: application/json
BulkDeleteResponse deleteDealFields(ids)
Delete multiple deal fields in bulk
Marks multiple fields as deleted.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.DealFieldsApi();
let ids = "ids_example"; // String | Comma-separated field IDs to delete
apiInstance.deleteDealFields(ids).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ids | String | Comma-separated field IDs to delete |
- Content-Type: Not defined
- Accept: application/json
FieldResponse getDealField(id)
Get one deal field
Returns data about a specific deal field.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.DealFieldsApi();
let id = 56; // Number | ID of the field
apiInstance.getDealField(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the field |
- Content-Type: Not defined
- Accept: application/json
FieldsResponse getDealFields()
Get all deal fields
Returns data about all deal fields
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.DealFieldsApi();
apiInstance.getDealFields().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
FieldResponse updateDealField(id, opts)
Update a deal field
Updates a deal field. See an example of updating custom fields’ values in <a href=" https://pipedrive.readme.io/docs/updating-custom-field-value " target="_blank" rel="noopener noreferrer">this tutorial</a>.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.DealFieldsApi();
let id = 56; // Number | ID of the field
let opts = {
'name': "name_example", // String | Name of the field
'options': "options_example" // String | When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: [{\\\"id\\\":123,\\\"label\\\":\\\"Existing Item\\\"},{\\\"label\\\":\\\"New Item\\\"}]
};
apiInstance.updateDealField(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ID of the field | |
name | String | Name of the field | [optional] |
options | String | When field_type is either set or enum, possible options must be supplied as a JSON-encoded sequential array of objects. All active items must be supplied and already existing items must have their ID supplied. New items only require a label. Example: [{\"id\":123,\"label\":\"Existing Item\"},{\"label\":\"New Item\"}] | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json