Skip to content

Latest commit

 

History

History
336 lines (228 loc) · 10.1 KB

ActivityTypesApi.md

File metadata and controls

336 lines (228 loc) · 10.1 KB

Pipedrive\ActivityTypesApi

All URIs are relative to https://api.pipedrive.com/v1.

Method HTTP request Description
addActivityType() POST /activityTypes Add new activity type
deleteActivityType() DELETE /activityTypes/{id} Delete an activity type
deleteActivityTypes() DELETE /activityTypes Delete multiple activity types in bulk
getActivityTypes() GET /activityTypes Get all activity types
updateActivityType() PUT /activityTypes/{id} Update an activity type

addActivityType()

addActivityType($activity_type_create_request): \Pipedrive\Model\ActivityTypeCreateUpdateDeleteResponse

Add new activity type

Adds a new activity type.

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\ActivityTypesApi(
    // 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
);
$activity_type_create_request = new \Pipedrive\Model\ActivityTypeCreateRequest(); // \Pipedrive\Model\ActivityTypeCreateRequest

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

Parameters

Name Type Description Notes
activity_type_create_request \Pipedrive\Model\ActivityTypeCreateRequest [optional]

Return type

\Pipedrive\Model\ActivityTypeCreateUpdateDeleteResponse

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]

deleteActivityType()

deleteActivityType($id): \Pipedrive\Model\ActivityTypeCreateUpdateDeleteResponse

Delete an activity type

Marks an activity type 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\ActivityTypesApi(
    // 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 activity type

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

Parameters

Name Type Description Notes
id int The ID of the activity type

Return type

\Pipedrive\Model\ActivityTypeCreateUpdateDeleteResponse

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]

deleteActivityTypes()

deleteActivityTypes($ids): \Pipedrive\Model\ActivityTypeBulkDeleteResponse

Delete multiple activity types in bulk

Marks multiple activity types 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\ActivityTypesApi(
    // 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 activity type IDs

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

Parameters

Name Type Description Notes
ids string The comma-separated activity type IDs

Return type

\Pipedrive\Model\ActivityTypeBulkDeleteResponse

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]

getActivityTypes()

getActivityTypes(): \Pipedrive\Model\ActivityTypeListResponse

Get all activity types

Returns all activity types.

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\ActivityTypesApi(
    // 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->getActivityTypes();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActivityTypesApi->getActivityTypes: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Pipedrive\Model\ActivityTypeListResponse

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]

updateActivityType()

updateActivityType($id, $activity_type_update_request): \Pipedrive\Model\ActivityTypeCreateUpdateDeleteResponse

Update an activity type

Updates an activity type.

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\ActivityTypesApi(
    // 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 activity type
$activity_type_update_request = new \Pipedrive\Model\ActivityTypeUpdateRequest(); // \Pipedrive\Model\ActivityTypeUpdateRequest

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

Parameters

Name Type Description Notes
id int The ID of the activity type
activity_type_update_request \Pipedrive\Model\ActivityTypeUpdateRequest [optional]

Return type

\Pipedrive\Model\ActivityTypeCreateUpdateDeleteResponse

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]