All URIs are relative to https://api.keap.com/crm, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| createLeadSourceExpense() | POST /rest/v2/leadSources/{lead_source_id}/expenses | Create a Lead Source Expense |
| deleteLeadSourceExpense() | DELETE /rest/v2/leadSources/{lead_source_id}/expenses/{lead_source_expense_id} | Delete a lead source expense |
| getLeadSourceExpense() | GET /rest/v2/leadSources/{lead_source_id}/expenses/{lead_source_expense_id} | Retrieve a Lead Source Expense |
| listLeadSourceExpenses() | GET /rest/v2/leadSources/{lead_source_id}/expenses | List Lead Source Expenses |
| updateLeadSourceExpense() | PATCH /rest/v2/leadSources/{lead_source_id}/expenses/{lead_source_expense_id} | Update a Lead Source Expense |
createLeadSourceExpense($lead_source_id, $create_lead_source_expense_request): \Keap\Core\V2\Model\LeadSourceExpenseCreate a Lead Source Expense
Creates a new Lead Source Expense
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\LeadSourceExpensesApi(
// 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
);
$lead_source_id = 'lead_source_id_example'; // string | The ID of the lead source this expense belongs to
$create_lead_source_expense_request = new \Keap\Core\V2\Model\CreateLeadSourceExpenseRequest(); // \Keap\Core\V2\Model\CreateLeadSourceExpenseRequest
try {
$result = $apiInstance->createLeadSourceExpense($lead_source_id, $create_lead_source_expense_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadSourceExpensesApi->createLeadSourceExpense: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| lead_source_id | string | The ID of the lead source this expense belongs to | |
| create_lead_source_expense_request | \Keap\Core\V2\Model\CreateLeadSourceExpenseRequest |
\Keap\Core\V2\Model\LeadSourceExpense
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteLeadSourceExpense($lead_source_expense_id, $lead_source_id)Delete a lead source expense
Deletes a lead source expense by ID
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\LeadSourceExpensesApi(
// 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
);
$lead_source_expense_id = 'lead_source_expense_id_example'; // string | The ID of a lead source expense
$lead_source_id = 'lead_source_id_example'; // string | The ID of the lead source this expense belongs to
try {
$apiInstance->deleteLeadSourceExpense($lead_source_expense_id, $lead_source_id);
} catch (Exception $e) {
echo 'Exception when calling LeadSourceExpensesApi->deleteLeadSourceExpense: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| lead_source_expense_id | string | The ID of a lead source expense | |
| lead_source_id | string | The ID of the lead source this expense belongs to |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getLeadSourceExpense($lead_source_expense_id, $lead_source_id): \Keap\Core\V2\Model\LeadSourceExpenseRetrieve a Lead Source Expense
Retrieves a single Lead Source Expense for a given ID
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\LeadSourceExpensesApi(
// 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
);
$lead_source_expense_id = 'lead_source_expense_id_example'; // string | The ID of a lead source expense
$lead_source_id = 'lead_source_id_example'; // string | The ID of the lead source this expense belongs to
try {
$result = $apiInstance->getLeadSourceExpense($lead_source_expense_id, $lead_source_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadSourceExpensesApi->getLeadSourceExpense: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| lead_source_expense_id | string | The ID of a lead source expense | |
| lead_source_id | string | The ID of the lead source this expense belongs to |
\Keap\Core\V2\Model\LeadSourceExpense
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listLeadSourceExpenses($lead_source_id, $filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListLeadSourceExpensesResponseList Lead Source Expenses
Retrieves a list of lead source expenses
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\LeadSourceExpensesApi(
// 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
);
$lead_source_id = 'lead_source_id_example'; // string | The ID of the lead source this expense belongs to. Use '-' as a wildcard (e.g. /v2/leadSources/-/expenses).
$filter = 'filter_example'; // string | Filter to apply, allowed fields are: - (String) `title` - (Long) `amount` - (String) `incurred_time` - (String) `create_time` - (String) `update_time` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=amount%3D%3D2500` - `filter=incurred_time%3D%3D2024-12-22T01:00:00.000Z`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `title` - `amount` - `incurred_time` - `create_time` - `update_time` One of the following directions: - `asc` - `desc`
$page_size = 0; // int | Total number of items to return per page
$page_token = 'page_token_example'; // string | Page token
try {
$result = $apiInstance->listLeadSourceExpenses($lead_source_id, $filter, $order_by, $page_size, $page_token);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadSourceExpensesApi->listLeadSourceExpenses: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| lead_source_id | string | The ID of the lead source this expense belongs to. Use '-' as a wildcard (e.g. /v2/leadSources/-/expenses). | |
| filter | string | Filter to apply, allowed fields are: - (String) `title` - (Long) `amount` - (String) `incurred_time` - (String) `create_time` - (String) `update_time` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=amount%3D%3D2500` - `filter=incurred_time%3D%3D2024-12-22T01:00:00.000Z` | [optional] |
| order_by | string | Attribute and direction to order items. One of the following fields: - `title` - `amount` - `incurred_time` - `create_time` - `update_time` One of the following directions: - `asc` - `desc` | [optional] |
| page_size | int | Total number of items to return per page | [optional] |
| page_token | string | Page token | [optional] |
\Keap\Core\V2\Model\ListLeadSourceExpensesResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateLeadSourceExpense($lead_source_expense_id, $lead_source_id, $update_lead_source_expense_request, $update_mask): \Keap\Core\V2\Model\LeadSourceExpenseUpdate a Lead Source Expense
Updates a new Lead Source Expense
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\LeadSourceExpensesApi(
// 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
);
$lead_source_expense_id = 'lead_source_expense_id_example'; // string | The ID of a lead source expense
$lead_source_id = 'lead_source_id_example'; // string | The ID of the lead source this expense belongs to
$update_lead_source_expense_request = new \Keap\Core\V2\Model\UpdateLeadSourceExpenseRequest(); // \Keap\Core\V2\Model\UpdateLeadSourceExpenseRequest
$update_mask = NULL; // mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped.
try {
$result = $apiInstance->updateLeadSourceExpense($lead_source_expense_id, $lead_source_id, $update_lead_source_expense_request, $update_mask);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadSourceExpensesApi->updateLeadSourceExpense: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| lead_source_expense_id | string | The ID of a lead source expense | |
| lead_source_id | string | The ID of the lead source this expense belongs to | |
| update_lead_source_expense_request | \Keap\Core\V2\Model\UpdateLeadSourceExpenseRequest | ||
| update_mask | mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. | [optional] |
\Keap\Core\V2\Model\LeadSourceExpense
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]