Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 761 Bytes

tracking.md

File metadata and controls

24 lines (21 loc) · 761 Bytes

Example request:

$tracking = new KnownTrackingRequest();
$tracking->SiteID = 'ACCOUNT_NUIMBER';
$tracking->Password = 'PASSWORD';
$tracking->MessageReference = 'reference_28_to_32_chars';
$tracking->MessageTime = Carbon::now()->format(Carbon::ATOM);
$tracking->LanguageCode = 'en';
$tracking->AWBNumber = $tracking_number;
$tracking->LevelOfDetails = 'ALL_CHECK_POINTS';
$tracking->PiecesEnabled = 'S';

$client = new Web($this->getEnvironment());
$xml_response = $client->call($tracking);

$result = new TrackingResponse();
$result->initFromXML($xml_response);
echo $result->AWBInfo->Status->ActionStatus;

If you need XML request for the DHL certification you can obtain by calling the following code

$request_xml = $tracking->toXml();