API documentation

Base URL: https://freight.eflowsoft.com.au/api/v1. All responses are JSON. Prices are in AUD and include GST.

Authentication

Create a key on the API keys page and send it in the Authorization header. Keys are never accepted in the URL. Call the API from your server, not from a browser, so the key stays private.

curl https://freight.eflowsoft.com.au/api/v1/balance \
  -H "Authorization: Bearer efk_live_your_key_here"

List services for a parcel

GET /api/v1/services returns every service available between two postcodes for a carton, cheapest first. Costs 1 credit.

ParameterRequiredDescription
from_postcodeYes4-digit origin postcode
to_postcodeYes4-digit destination postcode
length, width, heightYesCentimetres, up to 105 each and 0.25 m³ in total
weightYesKilograms, up to 22
curl -G https://freight.eflowsoft.com.au/api/v1/services \
  -H "Authorization: Bearer $KEY" \
  -d from_postcode=2000 -d to_postcode=3000 \
  -d length=30 -d width=20 -d height=15 -d weight=2
{
  "services": [
    { "service": "standard", "name": "Standard Parcel", "speed": "standard", "price": 16.15,
      "currency": "AUD", "gst_included": true, "max_extra_cover": 5000,
      "options": [ { "option": "signature", "name": "Signature on delivery", "price": 3.95 } ] },
    { "service": "express", "name": "Express Parcel", "speed": "express", "price": 21.85, ... }
  ],
  "credits": { "charged": 1, "remaining": 4998 }
}

Get a quote for one service

GET /api/v1/quote takes the same parameters plus a service. Costs 1 credit.

ParameterRequiredDescription
serviceYesA service code, such as standard or express
signatureNo1 to add signature on delivery
extra_coverNoWhole dollars of cover, 1 to 5000. Adds signature on delivery automatically.
curl -G https://freight.eflowsoft.com.au/api/v1/quote \
  -H "Authorization: Bearer $KEY" \
  -d service=express -d from_postcode=2000 -d to_postcode=3000 \
  -d length=30 -d width=20 -d height=15 -d weight=2
{
  "quote": {
    "service": "express", "name": "Express Parcel", "speed": "express",
    "total": 21.85, "currency": "AUD", "gst_included": true,
    "delivery_estimate": "Delivered in up to 2 business days",
    "breakdown": [ { "item": "Express Parcel", "cost": 21.85 } ]
  },
  "credits": { "charged": 1, "remaining": 4997 }
}

PHP example:

$ch = curl_init('https://freight.eflowsoft.com.au/api/v1/quote?' . http_build_query([
    'service' => 'standard', 'from_postcode' => '2000', 'to_postcode' => '3000',
    'length' => 30, 'width' => 20, 'height' => 15, 'weight' => 2,
]));
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('FREIGHT_API_KEY')],
    CURLOPT_TIMEOUT => 15,
]);
$quote = json_decode(curl_exec($ch), true);

Check your balance

GET /api/v1/balance is free. Every billable response also carries an X-Credits-Remaining header.

{ "balance": 4997, "account_status": "active" }

Service codes

Use these in service. /services tells you which ones are available for a given parcel and route. A service without a friendly name yet appears with a svc_ prefix and can be used exactly as returned.

CodeNameSpeed
standardStandard Parcelstandard
expressExpress Parcelexpress
courierPriority Courierpriority
standard_satchel_sStandard Satchel - Smallstandard
standard_satchel_mStandard Satchel - Mediumstandard
standard_satchel_lStandard Satchel - Largestandard
standard_satchel_xlStandard Satchel - Extra Largestandard
express_satchel_sExpress Satchel - Smallexpress
express_satchel_mExpress Satchel - Mediumexpress
express_satchel_lExpress Satchel - Largeexpress
express_satchel_xlExpress Satchel - Extra Largeexpress
standard_satchel_500gStandard Satchel - 500 gstandard
standard_satchel_3kgStandard Satchel - 3 kgstandard
standard_satchel_5kgStandard Satchel - 5 kgstandard
express_satchel_500gExpress Satchel - 500 gexpress
express_satchel_3kgExpress Satchel - 3 kgexpress
express_satchel_5kgExpress Satchel - 5 kgexpress

Errors

Errors look like {"error": {"code": "...", "message": "..."}}. Only a successful quote uses a credit.

StatusCodeMeaning
401invalid_api_keyMissing, unknown or revoked key
402insufficient_creditsNo credits left. Buy a bundle.
403account_suspendedThe account is suspended
422validation_failedA parameter is missing or out of range. fields lists which.
422not_availableThat service isn't offered for this parcel or route
429rate_limitedMore than 60 requests per minute on one key
502upstream_unavailableRates are temporarily unavailable. Retry shortly.

Billing

Each successful /services or /quote response costs 1 credit. Identical requests may be answered from a short cache; they still count as a call. Account admins get an email when 75% of the latest top-up has been used, and another if credits run out.