Web service for getting DHL Service Points
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Build package: org.openapitools.codegen.languages.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/spysystem/dhl-gspl.git"
}
],
"require": {
"spysystem/dhl-gspl": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new DHL\GSPL\Api\GetServicePointInformationApi(
// 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()
);
$country_code = 'country_code_example'; // string |
$language_code = 'eng'; // string |
$id = 'id_example'; // string | required if address not present
$address = 'address_example'; // string | required if id not present
$service_point_results = 56; // int | required if address is present
try {
$result = $apiInstance->getServicePointInfo($country_code, $language_code, $id, $address, $service_point_results);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GetServicePointInformationApi->getServicePointInfo: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://locator.dhl.com/ServicePointLocator/restV2
Class | Method | HTTP request | Description |
---|---|---|---|
GetServicePointInformationApi | getServicePointInfo | GET /servicepoints |
- Address
- ContactDetails
- Dimensions
- GeoLocation
- Holidays
- Language
- Map
- MaxNumberOfPieces
- MaxShipmentWeight
- OpeningHours
- OpeningHoursDayOfWeek
- Period
- Response
- SearchLocation
- ServicePoint
- ServicePointCapabilities
- ShipmentLimitations
- ShipmentLimitationsByPiece
- Status
- Suggestion
- Translations
All endpoints do not require authorization.