Dataloy Distance Table XML Queries (xmlDDT)

This service is designed so you can import distances directly into your own shipping application.

All DDT subscribers can use this function without any additional cost. The only limitation is a total number of 4000 distances/year/license.

NOTE: To be implemented by someone having basic XML knowledge.

These are the XML queries to be used:

  1. XmlPort to retrieve Dataloy Port_ID.
  2. XmlDistance to retrieve distance based on 2 PortID's.

XmlPort

Query Example URL: http://dataloy.com/ddt-server/XmlPort?port=TOKYO&username=USERNAME&password=PASSWORD

Parameters:

  1. port, Port name e.g. TOKYO. You can also provide a search such as TOK, and the query will return first 10 ports that match this search criteria.
  2. username - same as your DDT login user name.
  3. password - same as your DDT login user name.

This XML returns information about the port including its port_id to be included as parameter to XmlDistance.

Query output:

                        <PORTS>
                        <PORT>
                        <PORT_ID>100430</PORT_ID>
                        <PORT_NAME>TOKYO</PORT_NAME>
                        <LATITUDE>35.637</LATITUDE>
                        <LONGITUDE>139.773</LONGITUDE>
                        <LOCATION_CODE>TYO</LOCATION_CODE>
                        <COUNTRY_NAME>JAPAN</COUNTRY_NAME>
                        </PORT>
                        </PORTS>
                        
                    

XmlPort UN Locode

Query Example URL: http://dataloy.com/ddt-server/XmlPortUNLocode?port=NOOSL&username=USERNAME&password=PASSWORD

Parameters:

  1. port, Port code (UN Locode) e.g. NOOSL.
  2. username - same as your DDT login user name.
  3. password - same as your DDT login user name.

This XML returns information about the port including its port_id to be included as parameter to XmlDistance.

Query output:

                        <PORTS>
                        <PORT>
                        <PORT_ID>100430</PORT_ID>
                        <PORT_NAME>TOKYO</PORT_NAME>
                        <LATITUDE>35.637</LATITUDE>
                        <LONGITUDE>139.773</LONGITUDE>
                        <LOCATION_CODE>TYO</LOCATION_CODE>
                        <COUNTRY_NAME>JAPAN</COUNTRY_NAME>
                        <UN_LOCODE>JPTYO</UN_LOCODE>
                        </PORT>
                        </PORTS>
                        
                    

XmlDistance

Query Example URL: http://dataloy.com/ddt-server/XmlDistance?from=104146&to=100430&username=USERNAME&password=PASSWORD

Parameters:

  1. from, PortID (retrieved by XmlPort).
  2. to, PortID (retrieved by XmlPort).
  3. username, - same as your DDT login user name.
  4. password, - same as your DDT login user name.

The XML this query returns the distance between the ports, and the main routing point it used when calculating the distance.

Query output:

                        <PORT_DISTANCE>
                        <DISTANCE>11718.0</DISTANCE>
                        <VIA>SUEZ CANAL</VIA>
                        </PORT_DISTANCE>
                    
All parameters must be written with lowercase letters. (See example URLs)