The Shipping-Quote.net API provides access to some Shipping-Quote features which may be of use to 3rd parties. As of January 2011, the API is publicly accessible for unlimited use. In the future the API will be rate-limited with higher-rate access enabled by use of a paid API key.
Check your WAN IP address with these methods. The HTTP methods return an IP address and a guess at country of origin. The socket method returns only the IP address of the remote socket. The IP address check API is available in the following formats:
The raw socket method is most suitable for use with a scripting tool such as netcat. For example:
echo "My IP Address is `nc www.shipping-quote.net 4447` at the moment"
You can use slightly heavier-weight tools to do the same thing, for example cURL:
echo "My IP Address is `curl -s http://www.shipping-quote.net/api/my-ip-address.csv | head -2 | tail -1 | cut -d"," -f1` at the moment"
This API method gives you the ISO 3166 2-character codes and the names of the countries known to the JVM's java.util.Locale.getISOCountries(). It may not be as up to date as the official list of ISO countries at the International Standards Organisation, but it is available in English(en), Chinese(zh) and Malay(ms). Simply set your browser's preferred language (or set your Accept-Language header) accordingly. ISO Countries:
Shipping-quote.net combines some publicly-available feeds from reserve banks around the world. It is currently kept automatically up-to-date but unchecked. DO NOT use for anything that might involve real money!The exchange rate API is available in the following formats:
Shipping-quote.net can only provide shipping quotations from origins for which 3rd party quotes are available. Because the availability of quotes depends only on whether a 3rd party's rates are available from Shipping-Quote, no arguments are needed for these API URLs.
Shipping-quote.net can only provide shipping quotations for destinations for which there exists a 3rd party quote. The range of destinations is determined by the origin of the shipment. Use the following API access URLs to obtain a list of available destinations for a given origin:
The 'from' argument is your shipment origin ISO 3166-1 country code or ISO 3166-2 area code.
Shipping-quote.net can only provide shipping quotations for shipping methods configured for a given origin. Use the following API access URLs to obtain a list of available methods for a given origin:
The 'from' argument is your shipment origin ISO 3166-1 country code or ISO 3166-2 area code.
Shipping quotes are available from origin countries by postal methods for which data has been obtained and coded for the API. Some basic shipping modules are available for free open-source e-commerce projects such as osCommerce and Zen Cart. An idea of what is available can be got by trying out a rudimentary Shipping widget or more visually by looking at the Shipping Quote World Map.
The shipping quote API is available in the following formats:
The 'from' argument is your shipment origin ISO 3166-1 country code or ISO 3166-2 area code. The 'to' argument is its ISO 3166 destination. The weight can be specified without units and defaults to kg. Some other common units can also be specified - they'll be automatically converted by the API method.
You may not want all shipping methods that are available. You may be shipping bulky objects which don't qualify for document shipping, for example. You may not have a contract with some services and can't use their service on an ad-hoc basis. If you want to display only one or a few postal methods, use the 'only' argument to specify a comma-separated list of only the names of those shipping methods you wish to quote:
Provide two strings, a choice of edit distance method and optional parameters and receive a response containing the result of the string comparison:
The JSON API access URLs can deliver JSONP responses. Simply add a 'jsonp' query argument to the URL specifying the name of the javascript method you wish to invoke and the response will be padded appropriately. For example, here is a JSONP URL that will cause the specified exchange rate to be passed to the method 'myUpdateMethod':
Most problems with API calls that are caught by server-side validation will usually throw a 404 (Not Found) response. If the API method causes an unexpected error at the server, you should mostly receive a 500 (Internal Server Error). Most times there should be some useful information in the visible text of the error response. Abnormal responses do also currently contain a Java stack trace as a comment. If you think a stack trace might help, try 'View Page Source' on the error response page to see it.
Just in case they help, feel free to use the IP Adress check page, the User agent (browser) HTTP headers check page, the HTTP Server headers service and should the urge take you, the Hex Dump utility.
No comments - be the first to add a comment.

