System Shipment Status Updates

advertisement
System Shipment Status Update Methods
In order to gain broad compliance, we have built a very simple electronic data
exchange format for communications with our transportation service providers.
Shipment status updates from carriers, brokers, agents and 3PL’s are
accomplished by posting an XML document to our web service at the following
address:
http://www.lzblive.com/XmlService.asmx
Currently, we can accept 17 types of status updates to the system. Each update
is sent in a very similar format. Each update refers to a route segment, or “Leg”
from an origin Point-A to a destination Point-B.
Status Update Types:
1. ETA ORIGIN : When the shipment is dispatched.
2. ATA ORIGIN : When the driver/pilot arrives at cargo origination.
3. LOADED-ONBOARD : When Loaded
4. ETD ORIGIN : When known, at cargo origination.
5. ATD ORIGIN : When departing cargo origination.
6. ETA DESTINATION : When known en-route to destination
7. ATA DESTINATION : When arriving destination
8. UNLOADED-DISCHARGED : When cargo is unloaded
9. ETD DESTINATION : When known at cargo destination
10. ATD DESTINATION : When departing cargo destination
11. ETA BORDER : When known
12. ARRIVE BORDER : When arriving at International Border
13. DEPART BORDER : When departing International Border
14. CUSTOMS ENTRY : When goods enter customs
15. CUSTOMS RELEASE : When goods released from customs.
16. ONBOARD CONFIRMATION : Ocean – When onboard confirmation has been
received from steamship line.
17. POSITION UPDATE – Sent any time en-route
Data Element Definitions:
LOGIN: Assigned to you by operations.
Alpha Numeric 50 characters max
Example: username
Required for authentication
Occurrence: All Updates
PASSWORD : Assigned to you by operations.
Alpha Numeric12 characters max
Example: password
Required for authentication
Occurrence: All updates
CONTROLID: YOUR unique identifier for the update.
Alpha Numeric 20 characters max
Example: S1234XYZ
Required
Occurrence: All updates
EVENTTYPE: Name of the update type being sent
Alpha Numeric 30 characters max
Example: ETA ORIGIN, ARRIVE BORDER, etc…
Required
Occurrence: All updates
EVENTDATETIME: Date and time of event being reported.
Alpha Numeric 16 characters max including spaces. 24hr. format MM/dd/yyyy HH:mm
Example: 01/01/2005 14:40
Required
Occurrence: All updates
TIMEZONEOFFSET: Integer value indicating offset from GMT/Zulu (UTC) for the event reported.
Numeric
Example: -5 (see table of valid time zone offset values in this document)
Required – Daylight savings time is automatically accounted for in our system.
Occurrence: All updates
SHIPMENTID: OUR unique identifier for the shipment.
Numeric 10 digits max
Preferred, but not required. Our system matches your update to our shipment first by this
shipment ID if available, next by pro number or bill of lading number. Updates that do not
match an active shipment in our system by one of these three identifiers are recorded as
an exception and forwarded to operations.
Occurrence: All updates
PROBOOKINGNO: Carrier PRO number or booking number
Alpha Numeric 20 characters max
Example: PRO12345-12345
Required for ETA ORIGIN update, optional on others if SHIPMENTID is provided.
Occurrence: All updates
BOL: Bill of Lading or Master Bill of Lading for this shipment
Alpha Numeric 20 characters max
Example: BOL12345-12345
Required for LOADED-ONBOARD update, optional on others if SHIPMENTID is
provided.
Occurrence: All updates
Data Element Definitions: (cont)
ORIGCODE: Origin Postal Code or Airport Code
Alpha Numeric 10 characters max.
Example: 48083 (Postal Code) or LAX (IATA or ICAO airport code)
Required
Occurrence: All updates
DESTCODE: Destination Postal Code or Airport Code
Alpha Numeric 10 characters max.
Example: 48083 (Postal Code) or LAX (IATA or ICAO airport code)
Required
Occurrence: All updates
UNIT: Vehicle ID or Aircraft Tail Number assigned
Alpha Numeric 20 characters max
Example: 53102 or N175XY
Optional
Occurrence: ETA ORIGIN update
EQUIPDESC: Vehicle or Aircraft Size, Type, Model
Alpha Numeric 50 characters max
Example: 53ft Trailer – Power Unit 12345
Optional
Occurrence: ETA ORIGIN update
QUANTITY: Pieces / Packages / Passengers Loaded at Origin
Numeric
Example: 19
Optional
Occurrence: LOADED-ONBOARD update
WEIGHT: Weight of cargo Loaded at Origin
Numeric
Example: 10870
Optional
Occurrence: LOADED-ONBOARD update
PACKINGSLIP: Packing Slip Number
Alpha Numeric 20 characters max
Example: PS248561
Optional
Occurrence: LOADED-ONBOARD update
POD: Proof Of Delivery / Signatory
Alpha Numeric 50 characters max
Example: John Johnson
Optional
Occurrence: UNLOADED-DISCHARGED update
COMMENT: Free form text describing any important information regarding the update.
Alpha Numeric 500 characters max
Example: “30 miles south of Indianapolis, IN” (as in POSITION UPDATE)
Optional
Occurrence: All updates
CITY: Name of Most Nearby City to Current Position
Alpha Numeric 30 characters max
Example: Louisville
Optional
Occurrence: POSITION UPDATE
Data Element Definitions: (cont)
STATECODE: State or Province Code of Current Position
Alpha Numeric 3 characters max
Example: NY, ON, JAL
Optional
Occurrence: POSITION UPDATE
POSTALCODE: Most Nearby Postal Code of Current Position
Alpha Numeric 10 characters max
Example: 46514
Optional
Occurrence: POSITION UPDATE
LATITUDE : Coordinate of Current Position
Alpha Numeric 14 Format: ###d ##m ##s H
Example: 041d 12m 22s N
Optional
Occurrence: POSITION UPDATE
LONGITUDE : Coordinate of Current Position
Alpha Numeric 14 Format: ###d ##m ##s H
Example: 089d 13m 28s W
Optional
Occurrence: POSITION UPDATE
IMPORTANT: Use of a Soap Envelope around Data
As a .NET web service, all transmissions require a soap envelope, although we
are not using the soap envelope for any purpose at this time.
The proper soap envelope before and after the <XMLDATA> tak is shown in the
first example ETA ORIGIN.
Update Method One:
Transmission of an XML document.
All XML formats will look very similar with slightly different fields of information
required for each. XML documents are posted to our web service interface in the
following formats. The change in each transmission has been highlighted.
Examples contain sample data.
ETA ORIGIN
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<StatusUpdate xmlns="http://lzblive.com/">
<XMLDATA>
<STATUSUPDATE>
<LOGIN>LOGIN</LOGIN>
<PASSWORD>PASSWORD</PASSWORD>
<CONTROLID>ABC123</CONTROLID>
<SHIPMENTID>15132</SHIPMENTID>
<EVENTTYPE>ETA ORIGIN</EVENTTYPE>
<EVENTDATETIME>09/01/2005 14:15</EVENTDATETIME>
<TIMEZONEOFFSET>-5</TIMEZONEOFFSET>
<PROBOOKINGNO>PRO123ABC</PROBOOKINGNO>
<BOL>BOL123ABC</BOL>
<ORIGCODE>60615</ORIGCODE>
<DESTCODE>48228</DESTCODE>
<COMMENT>Comments up to 500 characters here</COMMENT>
<UNIT>53102</UNIT>
<EQUIPDESC>53ft Tractor Trailer</EQUIPDESC>
</STATUSUPDATE>
</XMLDATA>
</StatusUpdate>
</soap:Body>
</soap:Envelope>
ATA ORIGIN
<?xml version="1.0" encoding="utf-8"?>
<XMLDATA>
<STATUSUPDATE>
<LOGIN>LOGIN</LOGIN>
<PASSWORD>PASSWORD</PASSWORD>
<CONTROLID>ABC123</CONTROLID>
<SHIPMENTID>15132</SHIPMENTID>
<EVENTTYPE>ATA ORIGIN</EVENTTYPE>
<EVENTDATETIME>09/01/2005 14:15</EVENTDATETIME>
<TIMEZONEOFFSET>-5</TIMEZONEOFFSET>
<PROBOOKINGNO>PRO123ABC</PROBOOKINGNO>
<BOL>BOL123ABC</BOL>
<ORIGCODE>60615</ORIGCODE>
<DESTCODE>48228</DESTCODE>
<COMMENT>Comments up to 500 characters here</COMMENT>
</STATUSUPDATE>
</XMLDATA>
ETD ORIGIN, ATD ORIGIN, ETA DESTINATION, ATA DESTINATION,
ETD DESTINATION, ATD DESTINATION, ETA BORDER, ARRIVE BORDER,
DEPART BORDER, CUSTOMS ENTRY, CUSTOMS RELEASE,
ONBOARD CONFIRMATION
All are the same as ATA ORIGIN above except for EVENTTYPE element.
LOADED-ONBOARD
<?xml version="1.0" encoding="utf-8"?>
<XMLDATA>
<STATUSUPDATE>
<LOGIN>LOGIN</LOGIN>
<PASSWORD>PASSWORD</PASSWORD>
<CONTROLID>ABC123</CONTROLID>
<SHIPMENTID>15132</SHIPMENTID>
<EVENTTYPE>ATA ORIGIN</EVENTTYPE>
<EVENTDATETIME>09/01/2005 14:15</EVENTDATETIME>
<TIMEZONEOFFSET>-5</TIMEZONEOFFSET>
<PROBOOKINGNO>PRO123ABC</PROBOOKINGNO>
<BOL>BOL123ABC</BOL>
<ORIGCODE>60615</ORIGCODE>
<DESTCODE>48228</DESTCODE>
<COMMENT>124 Pieces in 12 cartons</COMMENT>
<QUANTITY>124</QUANTITY>
<WEIGHT>12345</WEIGHT>
<PACKINGSLIP>PS12345ABCDE</PACKINGSLIP>
</STATUSUPDATE>
</XMLDATA>
UNLOADED-DISCHARGED
<?xml version="1.0" encoding="utf-8"?>
<XMLDATA>
<STATUSUPDATE>
<LOGIN>LOGIN</LOGIN>
<PASSWORD>PASSWORD</PASSWORD>
<CONTROLID>ABC123</CONTROLID>
<SHIPMENTID>15132</SHIPMENTID>
<EVENTTYPE>UNLOADED-DISCHARGED</EVENTTYPE>
<EVENTDATETIME>09/01/2005 14:15</EVENTDATETIME>
<TIMEZONEOFFSET>-5</TIMEZONEOFFSET>
<PROBOOKINGNO>PRO123ABC</PROBOOKINGNO>
<BOL>BOL123ABC</BOL>
<ORIGCODE>60615</ORIGCODE>
<DESTCODE>48228</DESTCODE>
<COMMENT>124 Pieces in 12 cartons</COMMENT>
<POD>JOHN SMITH</POD>
</STATUSUPDATE>
</XMLDATA>
POSITION UPDATE
<?xml version="1.0" encoding="utf-8"?>
<XMLDATA>
<STATUSUPDATE>
<LOGIN>LOGIN</LOGIN>
<PASSWORD>PASSWORD</PASSWORD>
<CONTROLID>ABC123</CONTROLID>
<SHIPMENTID>15132</SHIPMENTID>
<EVENTTYPE>ATA ORIGIN</EVENTTYPE>
<EVENTDATETIME>09/01/2005 14:15</EVENTDATETIME>
<TIMEZONEOFFSET>-5</TIMEZONEOFFSET>
<PROBOOKINGNO>PRO123ABC</PROBOOKINGNO>
<BOL>BOL123ABC</BOL>
<ORIGCODE>60615</ORIGCODE>
<DESTCODE>48228</DESTCODE>
<COMMENT>Comments up to 500 characters here</COMMENT>
<CITY>SOUTH BEND</CITY>
<STATECODE>IN</STATECODE>
<POSTALCODE>46613</POSTALCODE>
<LATITUDE>041d 42m 26s N</LATITUDE>
<LONGITUDE>086d 18m 59s W</LONGITUDE>
</STATUSUPDATE>
</XMLDATA>
OPTION: SEND ALL DATA ELEMENTS
You may send all elements in the status update document with every transmission. Data that
does not apply to the EVENTTYPE specified is ignored.
<?xml version="1.0" encoding="utf-8"?>
<XMLDATA>
<STATUSUPDATE>
<LOGIN>LOGIN</LOGIN>
<PASSWORD>PASSWORD</PASSWORD>
<CONTROLID>ABC123</CONTROLID>
<SHIPMENTID>15132</SHIPMENTID>
<EVENTTYPE>UNLOADED-DISCHARGED</EVENTTYPE>
<EVENTDATETIME>09/01/2005 14:15</EVENTDATETIME>
<TIMEZONEOFFSET>-5</TIMEZONEOFFSET>
<PROBOOKINGNO>PRO123ABC</PROBOOKINGNO>
<BOL>BOL123ABC</BOL>
<ORIGCODE>60615</ORIGCODE>
<DESTCODE>48228</DESTCODE>
<UNIT></UNIT>
<COMMENT></COMMENT>
<EQUIPDESC></EQUIPDESC>
<QUANTITY></QUANTITY>
<WEIGHT></WEIGHT>
<PACKINGSLIP></PACKINGSLIP>
<POD>JOHN SMITH</POD>
<CITY></CITY>
<STATECODE></STATECODE>
<POSTALCODE></POSTALCODE>
<LATITUDE></LATITUDE>
<LONGITUDE></LONGITUDE>
</STATUSUPDATE>
</XMLDATA>
Valid Time Zone Offset Values
VALUE
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
DESC
GMT-12 Eniwetok
GMT-11 Samoa
GMT-10 Hawaii
GMT-9 Alaska
GMT-8 PST, Pacific US
GMT-7 MST, Mountain US
GMT-6 CST, Central US
GMT-5 EST, Eastern US
GMT-4 Atlantic, Canada
GMT-3 Brazilia, Buenos Aries
GMT-2 Mid-Atlantic
GMT-1 Cape Verdes
GMT Greenwich Mean Time, Dublin
GMT+1 Berlin, Rome
GMT+2 Israel, Cairo
GMT+3 Moscow, Kuwait
GMT+4 Abu Dhabi, Muscat
GMT+5 Islamabad, Karachi
6
7
8
9
10
11
12
GMT+6 Almaty, Dhaka
GMT+7 Bangkok, Jakarta
GMT+8 Hong Kong, Beijing
GMT+9 Tokyo, Osaka
GMT+10 Sydney, Melbourne, Guam
GMT+11 Magadan, Soloman Is.
GMT+12 Fiji, Wellington, Auckland
SAMPLE ASP.NET (VB) TEST CODE FOR SENDING XML DOCUMENT
Of course, there are several ways to do this, but in case you are looking for some
guidance, the following should help get you started.
Imports System.Xml
Imports System.net
Imports System.io
In your Page_Load sub:
Dim sFullPath As String = Server.MapPath("XMLTEST.xml")
Dim sURL As String = "http://www.lzblive.com/xmlservice.asmx"
Dim resp As String = sendXML(sURL, sFullPath)
Response.Write(resp) ‘to display response
Here is a sub that I have used for testing that works:
Public Function sendXML(ByVal strURl As String, ByVal strFullPath As String) As String
Dim request As HttpWebRequest
Dim xmlDoc As System.Xml.XmlDocument
xmlDoc = New System.Xml.XmlDocument
xmlDoc.Load(strFullPath)
Dim strXML As String
Dim strResponse As String
Dim strExep As String
strXML = xmlDoc.InnerXml
Dim myRequest As System.Net.HttpWebRequest = CType(HttpWebRequest.Create(strURl),
System.Net.HttpWebRequest)
myRequest.AllowAutoRedirect = False
myRequest.Method = "POST"
myRequest.ContentType = "text/xml; charset=""UTF-8"""
myRequest.Accept = "True"
myRequest.Timeout = 50000
Dim strRequest As Byte() = System.Text.Encoding.UTF8.GetBytes(strXML)
myRequest.ContentLength = strRequest.Length
Dim temp As String = myRequest.Headers.Item("host")
Dim xmlHTTPResponse As System.Net.HttpWebResponse
Dim xmlResponse As New System.Xml.XmlDocument
Dim RequestStream As System.IO.Stream = myRequest.GetRequestStream()
RequestStream.Write(strRequest, 0, strRequest.Length)
RequestStream.Close()
Try
Dim myResponse As System.Net.HttpWebResponse = CType(myRequest.GetResponse(),
System.Net.HttpWebResponse)
Dim ResponseStream As System.IO.Stream = myResponse.GetResponseStream
xmlResponse.Load(ResponseStream)
strResponse = xmlResponse.InnerXml
myResponse = Nothing
Return strResponse
Catch eException As Exception
strExep = eException.Message
Return strExep
Finally
End Try
End Function
SAMPLE XML DOCUMENT
Copy and paste the text below into a file named :XMLTEST.xml
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<StatusUpdate xmlns="http://lzblive.com/">
<XMLDATA>
<STATUSUPDATE>
<LOGIN>testcarrier@translogix.com</LOGIN>
<PASSWORD>testcarr</PASSWORD>
<CONTROLID>ABC123</CONTROLID>
<SHIPMENTID>15132</SHIPMENTID>
<EVENTTYPE>UNLOADED-DISCHARGED</EVENTTYPE>
<EVENTDATETIME>09/01/2005 14:15</EVENTDATETIME>
<TIMEZONEOFFSET>-5</TIMEZONEOFFSET>
<PROBOOKING>PRO123ABC</PROBOOKING>
<BOL>BOL123ABC</BOL>
<ORIGCODE>60615</ORIGCODE>
<DESTCODE>60660</DESTCODE>
<UNIT>531045</UNIT>
<COMMENT />
<EQUIPDESC>53 FT TRAILER</EQUIPDESC>
<QUANTITY>200</QUANTITY>
<WEIGHT>20000</WEIGHT>
<PACKINGSLIP>PKSLP12345</PACKINGSLIP>
<POD>JOHN SMITH</POD>
<CITY>CHICAGO</CITY>
<STATECODE>IL</STATECODE>
<POSTALCODE>60660</POSTALCODE>
<LATITUDE>041d 42m 26s N</LATITUDE>
<LONGITUDE>086d 18m 59s W</LONGITUDE>
</STATUSUPDATE>
</XMLDATA>
</StatusUpdate>
</soap:Body>
</soap:Envelope>
Download