[ Whereis® API Home ] [ JSON API Home ] [ Services ] [ Get Detail Services ]
Use this service to obtain location data at the requested level of detail, based on a postcode, or its ID
URL
HTTP POST to <ENDPOINT>/service/detail/postcode
Request format
{
"postcode":<string>,
"levelOfDetail":[<string>, <string>, ...],
"tolerance":<int>
}
Rules
Parameter | Mandatory? | Description |
postcode | Y | A postcode may return multiple suburbs, e.g. 3185. |
levelOfDetail | N | Array containing one or more of "ADJACENT" = list of <adjacentPostcodes> "BOUNDING_BOX" = rectangular area that entirely contains this postcode "BOUNDING_POLYGON" = geometry of points which plot the boundary of this postcode "SUBURBS" = all suburbs that use this postcode "REGIONS" = all suburbs whose centrePoint falls within postcode "GEOMETRY" = boundary multipolygon, as well as BOUNDING_BOX and BOUNDING_POLYGON "SUBDIVISIONS" = REGIONS + SUBURBS If levelOfDetail is not entered, returns centrePoint and address as state, and postcode only |
| tolerance | N | Optionally reduce level of detail in boundary polygon geometry by setting tolerance in metres |
Alternative URLs
Alternatively you can request detail by postcode ID (e.g. "postcode-3000"), using either of these GET methods, optionally including levelOfDetail and tolerance as request parameters:
HTTP GET to <ENDPOINT>/service/detail/postcode/<id>
HTTP GET to <ENDPOINT>/service/detail/postcode/?id=<id>&levelOfDetail=<levels_of_detail>
Sample POST request
{
"postcode":"3450"
}
Sample GET Requests
GET /service/detail/postcode/postcode-3450?levelOfDetail=ADJACENT
GET /service/detail/postcode?id=postcode-3121&levelOfDetail=ADJACENT&levelOfDetail=GEOMETRY
Sample response
{
"postcode": {
"id": "postcode-3450",
"centrePoint": {
"lat": -37.063975,
"lon": 144.217108
},
"address": {
"state": "VIC",
"postcode": "3450"
}
}
}
GEOMETRY detail allows for geometry simplification via the tolerance property. The tolerance property accepts a number, which represents the minimum distance in metres that a point on a route can deviate from a baseline. The Whereis JSON API uses the Douglas-Peucker algorithm for geometry simplification.