All URIs are relative to https://demo.troi.software/api/v2/rest, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
contactCategoriesGet() | GET /contactCategories | Fetch all contact categories |
contactCategoriesIdDelete() | DELETE /contactCategories/{id} | Delete contact categorie |
contactCategoriesIdGet() | GET /contactCategories/{id} | Fetch contact categorie by ID |
contactCategoriesIdPut() | PUT /contactCategories/{id} | Update contact categorie |
contactCategoriesPost() | POST /contactCategories | Save contact category |
miscCategoriesGet() | GET /misc/categories | Fetch all Categories |
contactCategoriesGet($contact_id, $category_id, $size, $from): \Troi\Model\ApiContactCategory[]
Fetch all contact categories
Fetch all contact categories
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\CategoriesApi(
// 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
);
$contact_id = 1; // int | Fetch all contact categories for the given contact ID
$category_id = 1; // int | Fetch all contact categories for the given category ID
$size = 50; // int | Fetch contact categories for the given size use together with \"from\"
$from = 100; // int | Fetch contact category from the given ID use together with \"size\"
try {
$result = $apiInstance->contactCategoriesGet($contact_id, $category_id, $size, $from);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->contactCategoriesGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
contact_id | int | Fetch all contact categories for the given contact ID | [optional] |
category_id | int | Fetch all contact categories for the given category ID | [optional] |
size | int | Fetch contact categories for the given size use together with "from" | [optional] |
from | int | Fetch contact category from the given ID use together with "size" | [optional] |
\Troi\Model\ApiContactCategory[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
contactCategoriesIdDelete($id): int
Delete contact categorie
Delete contact categorie
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\CategoriesApi(
// 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 = 1; // int | Contact categorie ID
try {
$result = $apiInstance->contactCategoriesIdDelete($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->contactCategoriesIdDelete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | Contact categorie ID |
int
- Content-Type: Not defined
- Accept:
text/html
,application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
contactCategoriesIdGet($id): \Troi\Model\ApiContactCategory
Fetch contact categorie by ID
Fetch contact categorie by ID
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\CategoriesApi(
// 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 = 1; // int | Fetch contact categorie by ID
try {
$result = $apiInstance->contactCategoriesIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->contactCategoriesIdGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | Fetch contact categorie by ID |
\Troi\Model\ApiContactCategory
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
contactCategoriesIdPut($id, $api_contact_category): \Troi\Model\ApiSyncItem[]
Update contact categorie
Update contact categorie
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\CategoriesApi(
// 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 = 1; // int | Contact categorie ID
$api_contact_category = new \Troi\Model\ApiContactCategory(); // \Troi\Model\ApiContactCategory
try {
$result = $apiInstance->contactCategoriesIdPut($id, $api_contact_category);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->contactCategoriesIdPut: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | Contact categorie ID | |
api_contact_category | \Troi\Model\ApiContactCategory |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
contactCategoriesPost($contact_categories_post_request): \Troi\Model\ApiSyncItem[]
Save contact category
Save contact category
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\CategoriesApi(
// 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
);
$contact_categories_post_request = new \Troi\Model\ContactCategoriesPostRequest(); // \Troi\Model\ContactCategoriesPostRequest
try {
$result = $apiInstance->contactCategoriesPost($contact_categories_post_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->contactCategoriesPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
contact_categories_post_request | \Troi\Model\ContactCategoriesPostRequest |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
miscCategoriesGet(): \Troi\Model\ApiListItem[]
Fetch all Categories
Fetch all Categories
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\CategoriesApi(
// 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
);
try {
$result = $apiInstance->miscCategoriesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoriesApi->miscCategoriesGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]