Skip to content

mynameisbogdan/urgentcargus-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UrgentCargus PHP API

The API is RESTful JSON over HTTP using GuzzleHttp as a HTTP client.

Usage example

$client = new \MNIB\UrgentCargus\Client($apiKey, $apiUri);
$client->createAccessToken('username', 'password');

$result = $client->get('PickupLocations');

$params = [
    'Sender' => [],
    'Recipient' => [],
    'Parcels' => 1,
    'TotalWeight' => 1,
    'DeclaredValue' => 1000,
    'CashRepayment' => 1000,
    'BankRepayment' => 0,
    'OpenPackage' => true,
    'SaturdayDelivery' => false,
    'PackageContent' => 'awb content',
    'CustomString' => $orderId,
];
$awbId = $client->post('Awbs', $params);

Official UrgentCargus Documentation

https://urgentcargus.portal.azure-api.net