Skip to content

Latest commit

 

History

History
709 lines (496 loc) · 23.4 KB

NotesApi.md

File metadata and controls

709 lines (496 loc) · 23.4 KB

Pipedrive\NotesApi

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

Method HTTP request Description
addNote() POST /notes Add a note
addNoteComment() POST /notes/{id}/comments Add a comment to a note
deleteComment() DELETE /notes/{id}/comments/{commentId} Delete a comment related to a note
deleteNote() DELETE /notes/{id} Delete a note
getComment() GET /notes/{id}/comments/{commentId} Get one comment
getNote() GET /notes/{id} Get one note
getNoteComments() GET /notes/{id}/comments Get all comments for a note
getNotes() GET /notes Get all notes
updateCommentForNote() PUT /notes/{id}/comments/{commentId} Update a comment related to a note
updateNote() PUT /notes/{id} Update a note

addNote()

addNote($add_note_request): \Pipedrive\Model\PostNote

Add a note

Adds a new note.

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\NotesApi(
    // 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_note_request = new \Pipedrive\Model\AddNoteRequest(); // \Pipedrive\Model\AddNoteRequest

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

Parameters

Name Type Description Notes
add_note_request \Pipedrive\Model\AddNoteRequest [optional]

Return type

\Pipedrive\Model\PostNote

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]

addNoteComment()

addNoteComment($id, $comment_post_put_object): \Pipedrive\Model\PostComment

Add a comment to a note

Adds a new comment to a note.

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\NotesApi(
    // 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 note
$comment_post_put_object = new \Pipedrive\Model\CommentPostPutObject(); // \Pipedrive\Model\CommentPostPutObject

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

Parameters

Name Type Description Notes
id int The ID of the note
comment_post_put_object \Pipedrive\Model\CommentPostPutObject [optional]

Return type

\Pipedrive\Model\PostComment

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]

deleteComment()

deleteComment($id, $comment_id): \Pipedrive\Model\DeleteComment

Delete a comment related to a note

Deletes a comment.

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\NotesApi(
    // 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 note
$comment_id = 'comment_id_example'; // string | The ID of the comment

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

Parameters

Name Type Description Notes
id int The ID of the note
comment_id string The ID of the comment

Return type

\Pipedrive\Model\DeleteComment

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]

deleteNote()

deleteNote($id): \Pipedrive\Model\DeleteNote

Delete a note

Deletes a specific note.

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\NotesApi(
    // 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 note

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

Parameters

Name Type Description Notes
id int The ID of the note

Return type

\Pipedrive\Model\DeleteNote

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]

getComment()

getComment($id, $comment_id): \Pipedrive\Model\PostComment

Get one comment

Returns the details of a comment.

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\NotesApi(
    // 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 note
$comment_id = 'comment_id_example'; // string | The ID of the comment

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

Parameters

Name Type Description Notes
id int The ID of the note
comment_id string The ID of the comment

Return type

\Pipedrive\Model\PostComment

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]

getNote()

getNote($id): \Pipedrive\Model\PostNote

Get one note

Returns details about a specific note.

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\NotesApi(
    // 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 note

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

Parameters

Name Type Description Notes
id int The ID of the note

Return type

\Pipedrive\Model\PostNote

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]

getNoteComments()

getNoteComments($id, $start, $limit): \Pipedrive\Model\GetComments

Get all comments for a note

Returns all comments associated with a note.

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\NotesApi(
    // 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 note
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page

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

Parameters

Name Type Description Notes
id int The ID of the note
start int Pagination start [optional] [default to 0]
limit int Items shown per page [optional]

Return type

\Pipedrive\Model\GetComments

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]

getNotes()

getNotes($user_id, $lead_id, $deal_id, $person_id, $org_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag): \Pipedrive\Model\GetNotes

Get all notes

Returns all notes.

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\NotesApi(
    // 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
);
$user_id = 56; // int | The ID of the user whose notes to fetch. If omitted, notes by all users will be returned.
$lead_id = 'lead_id_example'; // string | The ID of the lead which notes to fetch. If omitted, notes about all leads will be returned.
$deal_id = 56; // int | The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned.
$person_id = 56; // int | The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned.
$org_id = 56; // int | The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned.
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page
$sort = 'sort_example'; // string | The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`.
$start_date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The date in format of YYYY-MM-DD from which notes to fetch
$end_date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The date in format of YYYY-MM-DD until which notes to fetch to
$pinned_to_lead_flag = new \Pipedrive\Model\\Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | If set, the results are filtered by note to lead pinning state
$pinned_to_deal_flag = new \Pipedrive\Model\\Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | If set, the results are filtered by note to deal pinning state
$pinned_to_organization_flag = new \Pipedrive\Model\\Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | If set, the results are filtered by note to organization pinning state
$pinned_to_person_flag = new \Pipedrive\Model\\Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | If set, the results are filtered by note to person pinning state

try {
    $result = $apiInstance->getNotes($user_id, $lead_id, $deal_id, $person_id, $org_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NotesApi->getNotes: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
user_id int The ID of the user whose notes to fetch. If omitted, notes by all users will be returned. [optional]
lead_id string The ID of the lead which notes to fetch. If omitted, notes about all leads will be returned. [optional]
deal_id int The ID of the deal which notes to fetch. If omitted, notes about all deals will be returned. [optional]
person_id int The ID of the person whose notes to fetch. If omitted, notes about all persons will be returned. [optional]
org_id int The ID of the organization which notes to fetch. If omitted, notes about all organizations will be returned. [optional]
start int Pagination start [optional] [default to 0]
limit int Items shown per page [optional]
sort string The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. [optional]
start_date \DateTime The date in format of YYYY-MM-DD from which notes to fetch [optional]
end_date \DateTime The date in format of YYYY-MM-DD until which notes to fetch to [optional]
pinned_to_lead_flag \Pipedrive\Model\NumberBoolean If set, the results are filtered by note to lead pinning state [optional]
pinned_to_deal_flag \Pipedrive\Model\NumberBoolean If set, the results are filtered by note to deal pinning state [optional]
pinned_to_organization_flag \Pipedrive\Model\NumberBoolean If set, the results are filtered by note to organization pinning state [optional]
pinned_to_person_flag \Pipedrive\Model\NumberBoolean If set, the results are filtered by note to person pinning state [optional]

Return type

\Pipedrive\Model\GetNotes

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]

updateCommentForNote()

updateCommentForNote($id, $comment_id, $comment_post_put_object): \Pipedrive\Model\PostComment

Update a comment related to a note

Updates a comment related to a note.

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\NotesApi(
    // 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 note
$comment_id = 'comment_id_example'; // string | The ID of the comment
$comment_post_put_object = new \Pipedrive\Model\CommentPostPutObject(); // \Pipedrive\Model\CommentPostPutObject

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

Parameters

Name Type Description Notes
id int The ID of the note
comment_id string The ID of the comment
comment_post_put_object \Pipedrive\Model\CommentPostPutObject [optional]

Return type

\Pipedrive\Model\PostComment

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]

updateNote()

updateNote($id, $note): \Pipedrive\Model\PostNote

Update a note

Updates a note.

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\NotesApi(
    // 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 note
$note = new \Pipedrive\Model\Note(); // \Pipedrive\Model\Note

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

Parameters

Name Type Description Notes
id int The ID of the note
note \Pipedrive\Model\Note [optional]

Return type

\Pipedrive\Model\PostNote

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]