Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 2.25 KB

WsApi.md

File metadata and controls

70 lines (47 loc) · 2.25 KB

MagDv\Cargomart\WsApi

All URIs are relative to https://cargomart.ru.

Method HTTP request Description
apiV2WsConfigPost() POST /api/v2/ws/config Возвращает конфигурацию для WS.

apiV2WsConfigPost()

apiV2WsConfigPost(): \MagDv\Cargomart\Dto\WsConfigResponse

Возвращает конфигурацию для WS.

Example

<?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\WsApi(
    // 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
);

try {
    $result = $apiInstance->apiV2WsConfigPost();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WsApi->apiV2WsConfigPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\MagDv\Cargomart\Dto\WsConfigResponse

Authorization

CookieTokenAuth, HeaderAuthorizationAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]