Skip to content

Latest commit

 

History

History
468 lines (318 loc) · 14 KB

FiltersApi.md

File metadata and controls

468 lines (318 loc) · 14 KB

Pipedrive\FiltersApi

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

addFilter()

addFilter($add_filter_request): \Pipedrive\Model\FiltersPostResponse

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.

Example

<?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\FiltersApi(
    // 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_filter_request = new \Pipedrive\Model\AddFilterRequest(); // \Pipedrive\Model\AddFilterRequest

try {
    $result = $apiInstance->addFilter($add_filter_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FiltersApi->addFilter: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
add_filter_request \Pipedrive\Model\AddFilterRequest [optional]

Return type

\Pipedrive\Model\FiltersPostResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFilter()

deleteFilter($id): \Pipedrive\Model\FiltersDeleteResponse

Delete a filter

Marks a filter as deleted.

Example

<?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\FiltersApi(
    // 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 filter

try {
    $result = $apiInstance->deleteFilter($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FiltersApi->deleteFilter: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the filter

Return type

\Pipedrive\Model\FiltersDeleteResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFilters()

deleteFilters($ids): \Pipedrive\Model\FiltersBulkDeleteResponse

Delete multiple filters in bulk

Marks multiple filters as deleted.

Example

<?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\FiltersApi(
    // 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
);
$ids = 'ids_example'; // string | The comma-separated filter IDs to delete

try {
    $result = $apiInstance->deleteFilters($ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FiltersApi->deleteFilters: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
ids string The comma-separated filter IDs to delete

Return type

\Pipedrive\Model\FiltersBulkDeleteResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFilter()

getFilter($id): \Pipedrive\Model\FiltersGetResponse

Get one filter

Returns data about a specific filter. Note that this also returns the condition lines of the filter.

Example

<?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\FiltersApi(
    // 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 filter

try {
    $result = $apiInstance->getFilter($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FiltersApi->getFilter: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the filter

Return type

\Pipedrive\Model\FiltersGetResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFilterHelpers()

getFilterHelpers(): object

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 or <a href="/docs/api/v1/Filters#updateFilter">update 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.

Example

<?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\FiltersApi(
    // 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
);

try {
    $result = $apiInstance->getFilterHelpers();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FiltersApi->getFilterHelpers: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

object

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFilters()

getFilters($type): \Pipedrive\Model\FiltersBulkGetResponse

Get all filters

Returns data about all filters.

Example

<?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\FiltersApi(
    // 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
);
$type = new \Pipedrive\Model\\Pipedrive\Model\FilterType(); // \Pipedrive\Model\FilterType | The types of filters to fetch

try {
    $result = $apiInstance->getFilters($type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FiltersApi->getFilters: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
type \Pipedrive\Model\FilterType The types of filters to fetch [optional]

Return type

\Pipedrive\Model\FiltersBulkGetResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateFilter()

updateFilter($id, $update_filter_request): \Pipedrive\Model\FiltersPostResponse

Update filter

Updates an existing filter.

Example

<?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\FiltersApi(
    // 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 filter
$update_filter_request = new \Pipedrive\Model\UpdateFilterRequest(); // \Pipedrive\Model\UpdateFilterRequest

try {
    $result = $apiInstance->updateFilter($id, $update_filter_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FiltersApi->updateFilter: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the filter
update_filter_request \Pipedrive\Model\UpdateFilterRequest [optional]

Return type

\Pipedrive\Model\FiltersPostResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]