![]() |
Add The Best Courier Services to Your Website
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 the E-Go calculator.
Example (you can use this if you are an eBay seller)
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.e-go.com.au/calculator2.do?pickup=2000&pickupsuburb=SYDNEY+CITY Finally, add the link to your website and test it to ensure it works as expected. This is how the link should work: E-Go Calculator To pre-fill the calculator with multiple goods, you can specify an array of values for type, weight, items, width, height and depth. The following is an example for multiple goods. <a href="http://www.e-go.com.au/calculator2.do?pickup=2000&pickupsuburb=SYDNEY+CITY Another example link: E-Go Calculator with multiple goods eBay
If you are an eBay seller and want to add the E-Go 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.e-go.com.au/calculatorAPI2?pickuppostcode=2000&pickupsuburb=SYDNEY+CITY&deliverypostcode=4000&deliverysuburb=BRISBANE& If you want a quote for multiple goods, you can specify an array of values for the fields: type, weight, items, width, height and depth. The following is an example for multiple goods. http://www.e-go.com.au/calculatorAPI2?pickuppostcode=2000&pickupsuburb=SYDNEY+CITY&deliverypostcode=4000&deliverysuburb=BRISBANE If you require depot pricing, you must ensure the postcode(s) and suburb(s) issued are valid depot locations (please see available depot locations) and you must include the variable bookingtype. For example: http://www.e-go.com.au/calculatorAPI2?pickuppostcode=2163&pickupsuburb=VILLAWOOD&deliverypostcode=4008&deliverysuburb=PINKENBA The valid values for bookingtype are: depot2depot, depot2door and door2depot If you do not require depot pricing, then do not include the variable bookingtype in your API call. 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.
OUTPUT: The API will output the fields below:
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 Suburb API
You can use our suburb API to search pickup or delivery locations based on a suburb name or a postcode. An example: http://www.e-go.com.au/suburbAPI2?postcode=4000 This will return a list of locations for the postcode 4000: BRISBANE, 4000 Searching by the suburb name is also possible: http://www.e-go.com.au/suburbAPI2?suburb=SYDN This gives you a list of all suburbs starting with 'SYDN':
SYDNEY CITY, 2000 The following piece of code is a simple example of how to access our Calculator API using PHP. <? $calculator_url = "http://www.e-go.com.au/calculatorAPI2"; /* from/to postcodes */ //From Sydney $pickuppostcode = 2000; $pickupsuburb = 'SYDNEY CITY'; //To Brisbane $deliverypostcode = 4000; $deliverysuburb = 'BRISBANE'; /* Dimensions */ $width = 40; $height = 35; $depth = 65; $weight = 2; $ego_params = "?pickuppostcode=$pickuppostcode&pickupsuburb=$pickupsuburb"; $eco_params .= "&deliverypostcode=$deliverypostcode&deliverysuburb=$deliverysuburb"; $ego_params .= "&width=$width"; $ego_params .= "&height=$height&depth=$depth&weight=$weight"; $ego_quote = file($calculator_url . $ego_params); foreach ($ego_quote as $num=>$quote) { $quote = trim($quote); $quote_field = explode("=", $quote); print "Field=" . $quote_field[0] . "\tValue=" . $quote_field[1] . "\n"; } ?> |
||||||||||||||||||||||||||||||||||||||||||||||||||
Courier Services Australia | ||||||||||||||||||||||||||||||||||||||||||||||||||
Courier | Freight | Interstate Courier | Cheap Courier | Courier Services | Freight Services |