Gateway XML Tracking examples

Example files for the Viya Gateway Tracking XML format for communicating status events form carrier towards shipper.

Schema

Schema for tracking message

This schema includes:

  • All fields that can be included in a tracking message
  • Mandatory vs optional indicators
  • Enumerations
  • Data types

It does not include:

  • Field lengths
  • Documentation

Schema in github

Examples

Full: All available fields present in the xml
<?xml version="1.0" encoding="UTF-8" ?>
<tracking>
<carrier>
<name>United Parcel Services</name>
<reference>UPS</reference>
</carrier>
<milestones>
<milestone>
<trackingReference>
<shipper>TR124251</shipper>
<carrier>1Z3546338832</carrier>
</trackingReference>
<trackingUrl>https://www.carrier.com/tracking?reference=1Z3546338832</trackingUrl>
<equipment>
<licencePlate>LK-12-BB</licencePlate>
</equipment>
<events>
<event>
<eventDatetime>2024-09-24T14:15:22Z</eventDatetime>
<eventDescription>Arrived at UPS Hub</eventDescription>
<scannedBy>J. Smith</scannedBy>
<eventMessage>SCANNED AT TERMINAL</eventMessage>
<eventType>
<code>HUBIN</code>
<description>ARRIVAL AT THE HUB</description>
</eventType>
<eventReason>
<code>101</code>
<description>PARCEL REACHED PARCEL CENTER</description>
</eventReason>
<eventLocation>
<companyName>UPS New York Depot</companyName>
<address>
<addressline1>79 West Carson Street</addressline1>
<addressline2>Dock 12</addressline2>
<addressline3>BLOCK 13</addressline3>
<city>New York</city>
<postCode>10002</postCode>
<stateCode>NY</stateCode>
<countryCode>US</countryCode>
</address>
<airportCode>JFK</airportCode>
<seaportCode>USNYC</seaportCode>
<depotCode>NY010</depotCode>
</eventLocation>
<documents>
<type>EXP</type>
<content>base64 content</content>
</documents>
</event>
<event>
<eventDatetime>2024-09-24T16:15:22Z</eventDatetime>
<eventDescription>OUT FOR DELIVERY</eventDescription>
<scannedBy>B. Ferdinand</scannedBy>
<eventMessage>OUT FOR DELIVERY</eventMessage>
<eventType>
<code>OFD</code>
<description>OUT FOR DELIVERY</description>
</eventType>
<eventReason>
<code>903</code>
<description>DELIVER DAMAGED</description>
</eventReason>
<eventLocation>
<companyName>UPS New York Depot</companyName>
<address>
<addressline1>79 West Carson Street</addressline1>
<addressline2>Dock 12</addressline2>
<addressline3>Block 12</addressline3>
<city>New York</city>
<postCode>10002</postCode>
<stateCode>NY</stateCode>
<countryCode>US</countryCode>
</address>
<airportCode>JFK</airportCode>
<seaportCode>USNYC</seaportCode>
<depotCode>NY010</depotCode>
</eventLocation>
<documents>
<type>PictureOfDamage</type>
<content>base64 content</content>
</documents>
</event>
</events>
</milestone>
<milestone>
<trackingReference>
<shipper>ATP2435</shipper>
<carrier>1Z999999</carrier>
</trackingReference>
<trackingUrl>https://www.carrier.com/tracking?reference=1Z999999</trackingUrl>
<equipment>
<licencePlate>PH-124-LL</licencePlate>
</equipment>
<events>
<event>
<eventDatetime>2024-09-24T11:21:243Z</eventDatetime>
<eventDescription>Out for delivery</eventDescription>
<scannedBy>Wim Janssen</scannedBy>
<eventMessage>Exit depot</eventMessage>
<eventType>
<code>OFD</code>
<description>OUT FOR DELIVERY</description>
</eventType>
<eventReason>
<code>202</code>
<description>SHIPMENT COMPLETE</description>
</eventReason>
<eventLocation>
<companyName>UPS New York Depot</companyName>
<address>
<addressline1>79 West Carson Street</addressline1>
<addressline2>Dock 12</addressline2>
<city>New York</city>
<postCode>10002</postCode>
<stateCode>NY</stateCode>
<countryCode>US</countryCode>
</address>
<airportCode>JFK</airportCode>
<seaportCode>USNYC</seaportCode>
<depotCode>NY010</depotCode>
</eventLocation>
<documents>
<document>
<type>PODSignature</type>
<content>base64 content</content>
</document>
<document>
<type>CMR</type>
<content>base64 content</content>
</document>
</documents>
</event>
</events>
</milestone>
</milestones>
</tracking>
Minimal: Only populate mandatory fields in the xml
<?xml version="1.0" encoding="UTF-8" ?>
<tracking>
<carrier>
<reference>UPS</reference>
</carrier>
<milestones>
<milestone>
<trackingReference>
<carrier>1Z3546338832</carrier>
</trackingReference>
<events>
<event>
<eventDatetime>2024-09-24T14:15:22Z</eventDatetime>
<eventType>
<code>HUBIN</code>
</eventType>
</event>
</events>
</milestone>
<milestone>
</milestones>
</tracking>