All URIs are relative to https://cargomart.ru.
Method | HTTP request | Description |
---|---|---|
apiV2OrderOrderIdChatGet() | GET /api/v2/order/{orderId}/chat | Получение списка комнат по заказу. |
apiV2OrderOrderIdChatTypePost() | POST /api/v2/order/{orderId}/chat/{type} | создание комнаты по типу. |
apiV2OrderOrderIdChatGet($order_id): \MagDv\Cargomart\Dto\ChatListResponse
Получение списка комнат по заказу.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');
// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new MagDv\Cargomart\Api\OrderChatApi(
// If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
// This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
new GuzzleHttp\Client(),
$config
);
$order_id = 'order_id_example'; // string | Идентификатор заказа.
try {
$result = $apiInstance->apiV2OrderOrderIdChatGet($order_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderChatApi->apiV2OrderOrderIdChatGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
order_id | string | Идентификатор заказа. |
\MagDv\Cargomart\Dto\ChatListResponse
CookieTokenAuth, HeaderAuthorizationAuth
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV2OrderOrderIdChatTypePost($order_id, $type): \MagDv\Cargomart\Dto\ChatResponse
создание комнаты по типу.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: CookieTokenAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');
// Configure API key authorization: HeaderAuthorizationAuth
$config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MagDv\Cargomart\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new MagDv\Cargomart\Api\OrderChatApi(
// If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
// This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
new GuzzleHttp\Client(),
$config
);
$order_id = 'order_id_example'; // string | Идентификатор заказа.
$type = new \MagDv\Cargomart\Dto\\MagDv\Cargomart\Dto\OrderChatTypeEnum(); // \MagDv\Cargomart\Dto\OrderChatTypeEnum | Тип открываемого чата.
try {
$result = $apiInstance->apiV2OrderOrderIdChatTypePost($order_id, $type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderChatApi->apiV2OrderOrderIdChatTypePost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
order_id | string | Идентификатор заказа. | |
type | \MagDv\Cargomart\Dto\OrderChatTypeEnum | Тип открываемого чата. |
\MagDv\Cargomart\Dto\ChatResponse
CookieTokenAuth, HeaderAuthorizationAuth
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]