Skip to content

spysystem/dhl-gspl

Repository files navigation

OpenAPIClient-php

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

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

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;
}

?>

Documentation for API Endpoints

All URIs are relative to https://locator.dhl.com/ServicePointLocator/restV2

Class Method HTTP request Description
GetServicePointInformationApi getServicePointInfo GET /servicepoints

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

info@spysystem.dk

About

DHL Global Service Point Locator REST API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages