Skip to content

Latest commit

 

History

History
237 lines (174 loc) · 8.62 KB

LeadApi.md

File metadata and controls

237 lines (174 loc) · 8.62 KB

VereTech\SyncroMSP_PHPclient\Client\LeadApi

All URIs are relative to https://{subdomain}.syncromsp.com/api/v1

Method HTTP request Description
leadsGet GET /leads Returns a paginated list of Leads
leadsIdGet GET /leads/{id} Retrieves a Lead by ID
leadsIdPut PUT /leads/{id} Updates an existing Lead by ID
leadsPost POST /leads Creates a Lead

leadsGet

leadsGet($statuses, $status_list, $users, $mailbox_ids, $has_ticket, $query, $page)

Returns a paginated list of Leads

Required permission: Leads - List/Search

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\LeadApi(
    // 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
);
$statuses = array("statuses_example"); // string[] | Array of statuses. Possible values are \"New\", \"Lead\", \"First Contact\", \"Opportunity\", \"Prospect\", \"Waiting on Client\", \"In Negotiation\", \"Pending\", \"Won\", \"Lost\".
$status_list = "status_list_example"; // string | Comma separated list of statuses.
$users = array(56); // int[] | Array of user IDs.
$mailbox_ids = array(56); // int[] | Array of Mailbox IDs
$has_ticket = true; // bool | 
$query = "query_example"; // string | Search query
$page = 56; // int | Returns provided page of results, each 'page' contains 25 results

try {
    $apiInstance->leadsGet($statuses, $status_list, $users, $mailbox_ids, $has_ticket, $query, $page);
} catch (Exception $e) {
    echo 'Exception when calling LeadApi->leadsGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
statuses string[] Array of statuses. Possible values are &quot;New&quot;, &quot;Lead&quot;, &quot;First Contact&quot;, &quot;Opportunity&quot;, &quot;Prospect&quot;, &quot;Waiting on Client&quot;, &quot;In Negotiation&quot;, &quot;Pending&quot;, &quot;Won&quot;, &quot;Lost&quot;. [optional]
status_list string Comma separated list of statuses. [optional]
users int[] Array of user IDs. [optional]
mailbox_ids int[] Array of Mailbox IDs [optional]
has_ticket bool [optional]
query string Search query [optional]
page int Returns provided page of results, each 'page' contains 25 results [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

leadsIdGet

leadsIdGet($id)

Retrieves a Lead by ID

Required permission: Leads - List/Search

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\LeadApi(
    // 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 | 

try {
    $apiInstance->leadsIdGet($id);
} catch (Exception $e) {
    echo 'Exception when calling LeadApi->leadsIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

leadsIdPut

leadsIdPut($id, $body)

Updates an existing Lead by ID

Required permission: None

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\LeadApi(
    // 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 | 
$body = new \VereTech\SyncroMSP_PHPclient\Client\Model\LeadsIdBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\LeadsIdBody | Lead object that needs to be updated

try {
    $apiInstance->leadsIdPut($id, $body);
} catch (Exception $e) {
    echo 'Exception when calling LeadApi->leadsIdPut: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int
body \VereTech\SyncroMSP_PHPclient\Client\Model\LeadsIdBody Lead object that needs to be updated [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

leadsPost

leadsPost($body)

Creates a Lead

Required permission: None

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\LeadApi(
    // 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
);
$body = new \VereTech\SyncroMSP_PHPclient\Client\Model\LeadsBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\LeadsBody | Lead object that needs to be added

try {
    $apiInstance->leadsPost($body);
} catch (Exception $e) {
    echo 'Exception when calling LeadApi->leadsPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \VereTech\SyncroMSP_PHPclient\Client\Model\LeadsBody Lead object that needs to be added [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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