Dispatch Xml

Introduction

Mobile devices like pda's and on-board computers are able to request dispatch data from the server simply by calling a URL like this:
http://demotrans.cargooffice.com/fc_rpc/dispatchdata.php?CID=7267.0001
The exact format of the URL is differs with each carrier.
The return message contains an xml message described below.

dispatch xml message version 1.0

The returned xml contains two sections:
  1. a "dispatch" section
  2. a "data" section
General structure of the xml:
<?xml version="1.0" ?> 
  <messages>
    <message id="dispatch" />
    <message id="data" />
  </messages>

The "dispatch" section

Resembles cargooffice's "dispatch form" (see: DispatchDocumentation) and contains the trips and the stops for this driver.
Example:
    <message id="dispatch">
      <trip id="GEOFF0714">
        <ts sid="122" c="CCCCCC" type="d" dc="Osbo" /> 
        <ts sid="123" c="CCCCCC" type="d" dc="Osbo" /> 
      </trip>
      <trip id="GEOFF0715">
        <ts sid="127" c="CCCCCC" type="d" dc="Madd" /> 
      </trip>
  </message>
Elements:
  • ts : tripstop
  • sid : shipmentID
  • c : color of the dispatch symbol
  • type : p = pickup, d = delivery
  • dc : display city (short code)

The "data" section

Contains the trip- and shipment data fields.
Not all data fields are exported, the exact content can be changed in cargooffice's dispatch settings.
For an example see tag <message id="data"> in the example below.

Example xml

<?xml version="1.0" ?> 
  <result code="100" /> 
  <messages>
    <message id="dispatch">
      <trip id="GEOFF0714">
        <ts sid="122" c="CCCCCC" type="d" dc="Osbo" /> 
        <ts sid="123" c="CCCCCC" type="d" dc="Osbo" /> 
      </trip>
      <trip id="GEOFF0715">
        <ts sid="127" c="CCCCCC" type="d" dc="Madd" /> 
      </trip>
    </message>
    <message id="data">
      <trips>
        <trip id="GEOFF0714">
          <vehicleID /> 
          <shipments>
            <shipment id="122">
              <consignmentNumber>208</consignmentNumber> 
              <pickupName>P eamp; O BERTH 4 eamp; 5</pickupName> 
              <pickupCity>NORTH FREMANTLE</pickupCity> 
              <pickupDate>07-07-06</pickupDate> 
              <chargeTo>STOCKWELL INTERNATIONAL WA</chargeTo> 
              <deliveryName>EDWARDS DUNLOP PAPER</deliveryName> 
              <deliveryAddress>26 SANGIORGIO CRT</deliveryAddress> 
              <deliveryPostcode /> 
              <deliveryCity>OSBORNE PARK</deliveryCity> 
              <deliveryState>WA</deliveryState> 
              <deliveryDate>14-07-06</deliveryDate> 
              <containerNbr>ECMU1177512</containerNbr> 
              <containerSize>20</containerSize> 
              <containerWeight>0.000</containerWeight> 
              <bookingNbr>08I353815</bookingNbr> 
              <remarks>DOORS REAR ENTRY DRIVE IN</remarks> 
            </shipment>
            <shipment id="123">
              <consignmentNumber>209</consignmentNumber> 
              <pickupName>P eamp; O BERTH 4 eamp; 5</pickupName> 
              <pickupCity>NORTH FREMANTLE</pickupCity> 
              <pickupDate>07-07-06</pickupDate> 
              <chargeTo>STOCKWELL INTERNATIONAL WA</chargeTo> 
              <deliveryName>EDWARDS DUNLOP PAPER</deliveryName> 
              <deliveryAddress>26 SANGIORGIO CRT</deliveryAddress> 
              <deliveryPostcode>6105</deliveryPostcode> 
              <deliveryCity>OSBORNE PARK</deliveryCity> 
              <deliveryState>WA</deliveryState> 
              <deliveryDate>14-07-06</deliveryDate> 
              <containerNbr>TGHU2791612</containerNbr> 
              <containerSize>20</containerSize> 
              <containerWeight>0.000</containerWeight> 
              <bookingNbr>10I132486</bookingNbr> 
              <remarks>DOORS REAR ENTRY DRIVE IN</remarks> 
            </shipment>
          </shipments>
        </trip>
        <trip id="GEOFF0715">
          <vehicleID /> 
          <shipments>
            <shipment id="127">
              <consignmentNumber>213</consignmentNumber> 
              <pickupName>P eamp; O BERTH 4 eamp; 5</pickupName> 
              <pickupCity>NORTH FREMANTLE</pickupCity> 
              <pickupDate>07-07-06</pickupDate> 
              <chargeTo>STOCKWELL INTERNATIONAL WA</chargeTo> 
              <deliveryName>JNS CORPORATION</deliveryName> 
              <deliveryAddress>99 MADDINGTON RD</deliveryAddress> 
              <deliveryPostcode /> 
              <deliveryCity>MADDINGTON</deliveryCity> 
              <deliveryState>WA</deliveryState> 
              <deliveryDate>14-07-06</deliveryDate> 
              <containerNbr>NYKU5551113</containerNbr> 
              <containerSize>40</containerSize> 
              <containerWeight>0.000</containerWeight> 
              <bookingNbr>12I485713</bookingNbr> 
              <remarks>DOORS REAR ENTRY DRIVE IN</remarks> 
            </shipment>
          </shipments>
        </trip>
      </trips>
    </message>
  </messages>



-- HenkRoelofs - 02 Aug 2006

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2006-08-02 - HenkRoelofs
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback