All URIs are relative to /v1
Method | HTTP request | Description |
---|---|---|
createReseller | POST /reseller | Create a new reseller |
deleteReseller | DELETE /reseller/{resellerId} | Delete reseller |
getReseller | GET /reseller/{resellerId} | Get reseller details |
listResellers | GET /reseller | Search resellers |
updateReseller | PUT /reseller/{resellerId} | Update reseller |
\TCR\Client\Model\Reseller createReseller($body)
Create a new reseller
Create a reseller/large account which helps csp to identify campaigns that belong to this reseller.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: myBasicAuthSecurity
$config = TCR\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new TCR\Client\Api\ResellerApi(
// 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 \TCR\Client\Model\Reseller(); // \TCR\Client\Model\Reseller | Reseller to be created
try {
$result = $apiInstance->createReseller($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResellerApi->createReseller: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \TCR\Client\Model\Reseller | Reseller to be created |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteReseller($reseller_id)
Delete reseller
Delete reseller profile from TCR by the unique identifier assigned to it. Reseller can not be deleted if the profile is associated with one or more campaigns.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: myBasicAuthSecurity
$config = TCR\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new TCR\Client\Api\ResellerApi(
// 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
);
$reseller_id = "reseller_id_example"; // string | Alphanumeric identifier (prefixed with letter 'R') returned from the reseller creation operation.
try {
$apiInstance->deleteReseller($reseller_id);
} catch (Exception $e) {
echo 'Exception when calling ResellerApi->deleteReseller: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
reseller_id | string | Alphanumeric identifier (prefixed with letter 'R') returned from the reseller creation operation. |
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]
\TCR\Client\Model\Reseller getReseller($reseller_id)
Get reseller details
Retrieve reseller record from TCR by the unique identifier assigned to it.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: myBasicAuthSecurity
$config = TCR\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new TCR\Client\Api\ResellerApi(
// 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
);
$reseller_id = "reseller_id_example"; // string | Alphanumeric identifier (prefixed with letter 'R') returned from the reseller creation operation.
try {
$result = $apiInstance->getReseller($reseller_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResellerApi->getReseller: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
reseller_id | string | Alphanumeric identifier (prefixed with letter 'R') returned from the reseller creation operation. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\TCR\Client\Model\ResellerRecordSet listResellers($company_name, $page, $records_per_page)
Search resellers
Search for existing reseller by an optional 'companyName'. This operation supports pagination with a maximum of 500 records per fetch.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: myBasicAuthSecurity
$config = TCR\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new TCR\Client\Api\ResellerApi(
// 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
);
$company_name = "company_name_example"; // string | Business name of the reseller or DBA. Partial spelling accepted.
$page = 1; // int |
$records_per_page = 10; // int | Number of records per page. Max size is 500
try {
$result = $apiInstance->listResellers($company_name, $page, $records_per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResellerApi->listResellers: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
company_name | string | Business name of the reseller or DBA. Partial spelling accepted. | [optional] |
page | int | [optional] [default to 1] | |
records_per_page | int | Number of records per page. Max size is 500 | [optional] [default to 10] |
\TCR\Client\Model\ResellerRecordSet
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\TCR\Client\Model\Reseller updateReseller($body, $reseller_id)
Update reseller
Update reseller contact information.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: myBasicAuthSecurity
$config = TCR\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new TCR\Client\Api\ResellerApi(
// 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 \TCR\Client\Model\UpdateReseller(); // \TCR\Client\Model\UpdateReseller | Reseller properties to be updated
$reseller_id = "reseller_id_example"; // string | Alphanumeric identifier (prefixed with letter 'R') returned from reseller creation operation.
try {
$result = $apiInstance->updateReseller($body, $reseller_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResellerApi->updateReseller: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \TCR\Client\Model\UpdateReseller | Reseller properties to be updated | |
reseller_id | string | Alphanumeric identifier (prefixed with letter 'R') returned from reseller creation operation. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]