Add the Best Courier Service to your Website

To add our calculator to your website, copy the following code into your page:

<a>href="http://www.realtimeexpress.com.au/quote/calculator" target="_blank">Calculator</a>

Pre-filling calculator values

You can also pre-fill some values adding a query string to the calculator URL. You must start the query with a question mark(?) and then enter some parameters. Use equal sign (=) to assign values and ampersand (&) to delimit the parameters.

The following table summarizes the list of parameters accepted by our calculator:

pickup The postcode to pick the goods from
height Height in centimetres
width Width in centimetres
depth Depth in centimetres
weight Weight in kilograms
type The type of goods to be sent. The possible values are:
Carton, Pallet, Skid, Parcel, Satchel/Bag, Crate,
Tube, Large Carton, Heavy Carton, Wheel/Tyre,
Flat Pack Small, Flat Pack Large, Length/Roll under 1m,
Length/Roll 1-2m, Length/Roll 2-3m, Bulky Item,
Bulky Item VeryLarge
items or pieces Number of items (pieces) you want a quote for.
If not specified, 1 (one) is assumed.
pieces Number of items (pieces). If not specified, 1 (one) is assumed.

Example:
To pre-fill our calculator, first take note of all parameters involved in your case. If you are located in Sydney (postcode 2000) and you want to offer a freight service for a carton like the one in the picture, the parameters involved are:

Width = 40 cm
Height = 35 cm
Depth = 65 cm
Weight = 2 kg
Type = Carton
Pickup = 2000

Then create a link to our calculator adding a query which contains all parameters. The following is a link to our calculator for the example above.

<a>href="http://www.realtimeexpress.com.au/quote/calculator?pickup=2000& width=40&height=35&depth=65&weight=2& type=Carton" target="_blank">Calculator</a>

Finally, add the link to your website and test it to ensure it works as expected.

To pre-fill the calculator with multiple goods, you can specify an array of values for weight, items, width, height and depth. The following is an example for multiple goods.

<a>href="http://www.realtimeexpress.com.au/quote/calculator?pickup=2000& type=Carton&width=40&height=35&depth=65& weight=2&items=2&type=Carton&width=50& height=45&depth=25&weight=3&items=3" target="_blank">Calculator</a>

eBay

If you are an eBay seller and want to add our Calculator to your eBay page, you can create a link as described above and add it to the 'Item Description' section.

API

If you have a merchant website and want to offer on-line quote of delivery charges to your customers, you can use our Calculator API. Our API can be accessed by any programming language that can perform HTTP requests such as PHP, Cold Fusion, Java and many others.

INPUT: The input consists of a URL pointing to our Calculator API. An example is:

http://www.realtimeexpress.com.au/quote/calculatorAPI?pickup=2000& delivery=4000&width=40&height=35&depth=65&weight=2&items=3

If you want a quote for multiple goods, you can specify an array of values for the fields: weight, items, width, height and depth. The following is an example for multiple goods.

http://www.realtimeexpress.com.au/quote/calculatorAPI?pickup=2000&delivery=4000&width=40&height=35&depth=65& weight=2&items=2&width=50&height=45&depth=25&weight=3&items=3

In order to prevent the URL from becoming too long, the array of fields can also be specified using HTTP POST requests.

The following table summarizes the data you must pass to our API in order to get a quote.

pickup The postcode to pick the goods from
delivery The postcode to deliver the goods to
height Height in centimetres
width Width in centimetres
depth Depth in centimetres
weight Weight in kilograms
items or pieces Number of items (pieces) you want a quote for.

OUTPUT:The API will output the fields below:

error If any error occurs while processing your request, this field will contain an error message.
Otherwise, 'OK' will be returned.
eta It's a string containing the Estimated Time of Arrival
price The price charged to deliver the goods. GST is already included.

Note that in the output, fields will be line-separated (character '\n') and each line will contain a field name and respective value separated by '='. See example below.

error=OK
eta=Overnight
price=14.52

The following piece of code is a simple example of how to access our Calculator API using PHP.

< ?
$calculator_url = "http://www.realtimeexpress.com.au/quote/calculatorAPI";

/* from/to postcodes */
$pickup = 2000; //From Sydney
$delivery = 4000; //From Brisbane

/* Dimensions */
$width = 40;
$height = 35;
$depth = 65;
$weight = 2;

$params = "?pickup=$pickup&delivery=$delivery";
$params .= "&width=$width";
$params .= "&height=$height&depth=$depth&weight=$weight";
$quote = file($calculator_url . $params);

foreach ($quote as $num=>$quote) {
$quote = trim($quote);
$quote_field = explode("=", $quote);
print "Field=" . $quote_field . "\tValue=" . $quote_field . "\n";
}
?>