Skip to content

Validate a route

POST /api/locations/validate-route

Validates a route and returns, per courier, which rules apply and whether that courier can quote.

Requires API key.

FieldTypeRequiredDescription
fromobjectNoOrigin location (postcode, suburb, state, country, type).
toobjectNoDestination location (same fields).
itemsarrayNoItems with weight/dimensions (cm) and packaging description.
couriersstring[]NoLimit validation to these string_ids; omit for all.
Terminal window
curl -X POST \
-H "Api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": { "postcode": "2000", "suburb": "SYDNEY", "state": "NSW", "country": "AU", "type": "business" },
"to": { "postcode": "3000", "suburb": "MELBOURNE", "state": "VIC", "country": "AU", "type": "residential" },
"items": [
{ "description": "Carton", "weight": 5, "length": 40, "width": 30, "height": 20, "quantity": 1 }
]
}' \
https://www.transdirect.com.au/api/locations/validate-route
{
"couriers": {
"allied": {
"rules": [],
"can_quote": true
},
"couriers_please": {
"rules": [
{
"code": "residential_surcharge",
"severity": "surcharge",
"msg": "Residential delivery surcharge applies"
}
],
"can_quote": true
}
}
}
FieldDescription
couriersMap of string_id → { rules, can_quote }
rules[].severity"block", "surcharge", or "prompt"
can_quotefalse when a blocking rule applies

Use this to warn users before they start a full quote.