All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addFilter | POST /filters | Add a new filter |
deleteFilter | DELETE /filters/{id} | Delete a filter |
deleteFilters | DELETE /filters | Delete multiple filters in bulk |
getFilter | GET /filters/{id} | Get one filter |
getFilterHelpers | GET /filters/helpers | Get all filter helpers |
getFilters | GET /filters | Get all filters |
updateFilter | PUT /filters/{id} | Update filter |
FiltersPostResponse addFilter(opts)
Add a new filter
Adds a new filter, returns the ID upon success. Note that in the conditions JSON object only one first-level condition group is supported, and it must be glued with 'AND', and only two second level condition groups are supported of which one must be glued with 'AND' and the second with 'OR'. Other combinations do not work (yet) but the syntax supports introducing them in future. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/adding-a-filter\" target="_blank" rel="noopener noreferrer">adding a filter</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.FiltersApi(apiClient);
let opts = Pipedrive.AddFilterRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addFilter(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
AddFilterRequest | AddFilterRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
FiltersDeleteResponse deleteFilter(id)
Delete a filter
Marks a filter 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.FiltersApi(apiClient);
let id = 56; // Number | The ID of the filter
apiInstance.deleteFilter(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 filter |
- Content-Type: Not defined
- Accept: application/json
FiltersBulkDeleteResponse deleteFilters(ids)
Delete multiple filters in bulk
Marks multiple filters 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.FiltersApi(apiClient);
let ids = "ids_example"; // String | The comma-separated filter IDs to delete
apiInstance.deleteFilters(ids).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
ids | String | The comma-separated filter IDs to delete |
- Content-Type: Not defined
- Accept: application/json
FiltersGetResponse getFilter(id)
Get one filter
Returns data about a specific filter. Note that this also returns the condition lines of the filter.
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.FiltersApi(apiClient);
let id = 56; // Number | The ID of the filter
apiInstance.getFilter(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 filter |
- Content-Type: Not defined
- Accept: application/json
Object getFilterHelpers()
Get all filter helpers
Returns all supported filter helpers. It helps to know what conditions and helpers are available when you want to <a href="/docs/api/v1/Filters#addFilter">add</a> or <a href="/docs/api/v1/Filters#updateFilter">update</a> filters. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/adding-a-filter\" target="_blank" rel="noopener noreferrer">adding a filter</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.FiltersApi(apiClient);
apiInstance.getFilterHelpers().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
FiltersBulkGetResponse getFilters(opts)
Get all filters
Returns data about all filters.
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.FiltersApi(apiClient);
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'type': new Pipedrive.FilterType() // FilterType | The types of filters to fetch
};
apiInstance.getFilters(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
type | FilterType | The types of filters to fetch | [optional] |
- Content-Type: Not defined
- Accept: application/json
FiltersPostResponse updateFilter(id, opts)
Update filter
Updates an existing filter.
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.FiltersApi(apiClient);
let id = 56; // Number | The ID of the filter
let opts = Pipedrive.UpdateFilterRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.updateFilter(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 filter | |
UpdateFilterRequest | UpdateFilterRequest | [optional] |
- Content-Type: application/json
- Accept: application/json