Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.8 KB

ItineraryApi.md

File metadata and controls

75 lines (52 loc) · 2.8 KB

MagDv\Cargomart\ItineraryApi

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

Method HTTP request Description
apiV2ItineraryByKladrGet() GET /api/v2/itinerary/by-kladr Метод возвращает данные маршрута, по точкам кладра.

apiV2ItineraryByKladrGet()

apiV2ItineraryByKladrGet($departure, $destination): \MagDv\Cargomart\Dto\ItineraryListResponse

Метод возвращает данные маршрута, по точкам кладра.

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\ItineraryApi(
    // 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
);
$departure = 'departure_example'; // string | Начало маршрута.
$destination = 56; // int | Окончание маршрута.

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

Parameters

Name Type Description Notes
departure string Начало маршрута. [optional]
destination int Окончание маршрута. [optional]

Return type

\MagDv\Cargomart\Dto\ItineraryListResponse

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]