Skip to content

Latest commit

 

History

History
326 lines (228 loc) · 13 KB

File metadata and controls

326 lines (228 loc) · 13 KB

Keap\Core\V2\LeadSourceExpensesApi

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()

createLeadSourceExpense($lead_source_id, $create_lead_source_expense_request): \Keap\Core\V2\Model\LeadSourceExpense

Create a Lead Source Expense

Creates a new Lead Source Expense

Example

<?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;
}

Parameters

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

Return type

\Keap\Core\V2\Model\LeadSourceExpense

Authorization

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]

deleteLeadSourceExpense()

deleteLeadSourceExpense($lead_source_expense_id, $lead_source_id)

Delete a lead source expense

Deletes a lead source expense by ID

Example

<?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;
}

Parameters

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

Return type

void (empty response body)

Authorization

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]

getLeadSourceExpense()

getLeadSourceExpense($lead_source_expense_id, $lead_source_id): \Keap\Core\V2\Model\LeadSourceExpense

Retrieve a Lead Source Expense

Retrieves a single Lead Source Expense for a given ID

Example

<?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;
}

Parameters

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

Return type

\Keap\Core\V2\Model\LeadSourceExpense

Authorization

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]

listLeadSourceExpenses()

listLeadSourceExpenses($lead_source_id, $filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListLeadSourceExpensesResponse

List Lead Source Expenses

Retrieves a list of lead source expenses

Example

<?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;
}

Parameters

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]

Return type

\Keap\Core\V2\Model\ListLeadSourceExpensesResponse

Authorization

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]

updateLeadSourceExpense()

updateLeadSourceExpense($lead_source_expense_id, $lead_source_id, $update_lead_source_expense_request, $update_mask): \Keap\Core\V2\Model\LeadSourceExpense

Update a Lead Source Expense

Updates a new Lead Source Expense

Example

<?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;
}

Parameters

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]

Return type

\Keap\Core\V2\Model\LeadSourceExpense

Authorization

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]