parcelmonkeygroup/pmuk-sdk-php

PHP SDK for the Parcel Monkey UK API

2.1 2017-10-31 11:42 UTC

This package is not auto-updated.

Last update: 2024-04-14 00:17:55 UTC


README

This package is an SDK to interact with the Parcel Monkey UK API. Using this you can book parcel deliveries from the UK to anywhere in the world.

Parcel Monkey UK gives you access to well known services such as Parcelforce, DHL, DPD, DX and more.

API Documentation & Version

Currently compatible with Version 3.0 of the Parcel Monkey UK API. https://www.parcelmonkey.co.uk/developers/

Installation

You can install this package using composer: composer require parcelmonkeygroup/pmuk-sdk-php

Basic Usage

Examples for each request object are in the /examples directory.

<?PHP

include_once('../vendor/autoload.php');

use parcelmonkeygroup\pmuksdk\client;
use parcelmonkeygroup\pmuksdk\HelloWorld;

// Add your credentials (obtain these from your account on parcelmonkey.co.uk)
$UserId   = 'YOURUSERID';
$ApiKey   = 'YOURAPIKEY';
$Version  = '3.0';

// Initialise the client 
$client = new client($UserId,$ApiKey, $Version);

// Create the request passing in the client
$request = new HelloWorld($client);
$request->setEcho('testing 123');

try {
  
  $response = $request->send();

  echo print_r($response,true);
  
} catch (\Exception $e) {
  
  echo $e->getMessage();
  
}

Support

Support is available at https://www.parcelmonkey.co.uk/help