All URIs are relative to https://api.insightly.com/v3.0
Method | HTTP request | Description |
---|---|---|
addLeadSource | POST /LeadSources | Adds a Lead Source |
deleteLeadSource | DELETE /LeadSources | Deletes a Lead Source |
getLeadSources | GET /LeadSources | Gets a list of Lead Sources |
updateLeadSource | PUT /LeadSources | Updates a Lead Source |
\Swagger\Client\Model\LeadSource addLeadSource($lead_source, $authorization)
Adds a Lead Source
This endpoint is used to define a new lead source. This endpoint is only accessible to users with administrator access.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\LeadSourcesApi(
// 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()
);
$lead_source = new \Swagger\Client\Model\APILeadSource(); // \Swagger\Client\Model\APILeadSource | The Lead Source to add
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->addLeadSource($lead_source, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadSourcesApi->addLeadSource: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
lead_source | \Swagger\Client\Model\APILeadSource | The Lead Source to add | |
authorization | string | Authorization | [default to {{Authorization}}] |
\Swagger\Client\Model\LeadSource
No authorization required
- Content-Type: application/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteLeadSource($id, $authorization)
Deletes a Lead Source
This endpoint is used to delete an existing lead source.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\LeadSourcesApi(
// 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()
);
$id = 789; // int | A Lead Source's ID
$authorization = "{{Authorization}}"; // string | Authorization
try {
$apiInstance->deleteLeadSource($id, $authorization);
} catch (Exception $e) {
echo 'Exception when calling LeadSourcesApi->deleteLeadSource: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | A Lead Source's ID | |
authorization | string | Authorization | [default to {{Authorization}}] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object[] getLeadSources($authorization, $skip, $top, $count_total)
Gets a list of Lead Sources
This endpoint returns a list of the lead sources that have been defined on the Insightly instance.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\LeadSourcesApi(
// 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()
);
$authorization = "{{Authorization}}"; // string | Authorization
$skip = 56; // int | Optional, number of lead sources to skip.
$top = 56; // int | Optional, maximum number of lead sources to return in the response.
$count_total = false; // bool | Optional, true if total number of records should be returned in the response headers.
try {
$result = $apiInstance->getLeadSources($authorization, $skip, $top, $count_total);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadSourcesApi->getLeadSources: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Authorization | [default to {{Authorization}}] |
skip | int | Optional, number of lead sources to skip. | [optional] |
top | int | Optional, maximum number of lead sources to return in the response. | [optional] |
count_total | bool | Optional, true if total number of records should be returned in the response headers. | [optional] [default to false] |
object[]
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\LeadSource updateLeadSource($lead_source, $authorization)
Updates a Lead Source
This endpoint is used to update an existing lead source.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\LeadSourcesApi(
// 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()
);
$lead_source = new \Swagger\Client\Model\APILeadSource(); // \Swagger\Client\Model\APILeadSource | A Lead Source
$authorization = "{{Authorization}}"; // string | Authorization
try {
$result = $apiInstance->updateLeadSource($lead_source, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadSourcesApi->updateLeadSource: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
lead_source | \Swagger\Client\Model\APILeadSource | A Lead Source | |
authorization | string | Authorization | [default to {{Authorization}}] |
\Swagger\Client\Model\LeadSource
No authorization required
- Content-Type: application/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]