Skip to content

Latest commit

 

History

History
270 lines (183 loc) · 8 KB

LeadLabelsApi.md

File metadata and controls

270 lines (183 loc) · 8 KB

Pipedrive\LeadLabelsApi

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

Method HTTP request Description
addLeadLabel() POST /leadLabels Add a lead label
deleteLeadLabel() DELETE /leadLabels/{id} Delete a lead label
getLeadLabels() GET /leadLabels Get all lead labels
updateLeadLabel() PATCH /leadLabels/{id} Update a lead label

addLeadLabel()

addLeadLabel($add_lead_label_request): \Pipedrive\Model\AddOrUpdateLeadLabelResponse200

Add a lead label

Creates a lead label.

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\LeadLabelsApi(
    // 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_lead_label_request = new \Pipedrive\Model\AddLeadLabelRequest(); // \Pipedrive\Model\AddLeadLabelRequest

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

Parameters

Name Type Description Notes
add_lead_label_request \Pipedrive\Model\AddLeadLabelRequest [optional]

Return type

\Pipedrive\Model\AddOrUpdateLeadLabelResponse200

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]

deleteLeadLabel()

deleteLeadLabel($id): \Pipedrive\Model\LeadIdResponse200

Delete a lead label

Deletes a specific lead label.

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\LeadLabelsApi(
    // 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 = 'id_example'; // string | The ID of the lead label

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

Parameters

Name Type Description Notes
id string The ID of the lead label

Return type

\Pipedrive\Model\LeadIdResponse200

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]

getLeadLabels()

getLeadLabels(): \Pipedrive\Model\GetLeadLabelsResponse200

Get all lead labels

Returns details of all lead labels. This endpoint does not support pagination and all labels are always returned.

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

Parameters

This endpoint does not need any parameter.

Return type

\Pipedrive\Model\GetLeadLabelsResponse200

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]

updateLeadLabel()

updateLeadLabel($id, $update_lead_label_request): \Pipedrive\Model\AddOrUpdateLeadLabelResponse200

Update a lead label

Updates one or more properties of a lead label. Only properties included in the request will be updated.

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\LeadLabelsApi(
    // 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 = 'id_example'; // string | The ID of the lead label
$update_lead_label_request = new \Pipedrive\Model\UpdateLeadLabelRequest(); // \Pipedrive\Model\UpdateLeadLabelRequest

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

Parameters

Name Type Description Notes
id string The ID of the lead label
update_lead_label_request \Pipedrive\Model\UpdateLeadLabelRequest [optional]

Return type

\Pipedrive\Model\AddOrUpdateLeadLabelResponse200

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]