[ 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 suburb's name and postcode, or by its ID.
URL
HTTP POST to <ENDPOINT>/service/detail/suburb
Request format
{
"suburb":<string>,
"postcode":<string>,
"levelOfDetail":[<string>, <string>, ...],
"tolerance":<int>
}
Rules
Parameter | Mandatory? | Description |
suburb | Y | Suburb name. |
postcode | Y | Postcode, as a string. |
levelOfDetail | N | Array containing one or more of "ADJACENT" = list of <adjacentSuburbs> "BOUNDING_BOX" = rectangular area that entirely contains this suburb "BOUNDING_POLYGON" = geometry of points which plot the boundary of this suburb "SUBURBS" = all suburbs that share this postcode "REGIONS" = all regions this suburb falls within "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, postcode, regionName and suburb. |
| tolerance | N | Optionally reduce level of detail in boundary geometry by setting tolerance in metres |
Alternative URLs
Alternatively if you already know the ID of the suburb you can request detail by suburb ID, using either of these GET methods, optionally including levelOfDetail and tolerance as request parameters:
HTTP GET to <ENDPOINT>/service/detail/suburb/<id>
HTTP GET to <ENDPOINT>/service/detail/suburb/?id=<id>&levelOfDetail=<level_of_detail>
Sample POST request
{
"suburb":"caulfield",
"postcode":"3162",
"levelOfDetail":["ADJACENT"]
}
Sample GET requests
GET /service/detail/suburb/suburb-28244?levelOfDetail=ADJACENT
GET /service/detail/suburb?id=suburb-28244&levelOfDetail=ADJACENT&levelOfDetail=GEOMETRY
Sample response
{
"suburb": {
"id": "suburb-28244",
"centrePoint": {
"lat": -37.884812,
"lon": 145.029337
},
"address": {
"state": "VIC",
"postcode": "3162",
"regionName": "GLEN EIRA COUNCIL",
"suburb": "CAULFIELD"
}
},
"adjacentSuburbs": [
{
"id": "suburb-28251",
"centrePoint": {
"lat": -37.882318,
"lon": 145.043855
},
"address": {
"state": "VIC",
"postcode": "3145",
"regionName": "GLEN EIRA COUNCIL",
"suburb": "CAULFIELD EAST"
}
},
{
"id": "suburb-28243",
"centrePoint": {
"lat": -37.872214,
"lon": 145.021118
},
"address": {
"state": "VIC",
"postcode": "3161",
"regionName": "GLEN EIRA COUNCIL",
"suburb": "CAULFIELD NORTH"
}
},
{
"id": "suburb-28227",
"centrePoint": {
"lat": -37.895549,
"lon": 145.02472
},
"address": {
"state": "VIC",
"postcode": "3162",
"regionName": "BAYSIDE COUNCIL",
"suburb": "CAULFIELD SOUTH"
}
},
{
"id": "suburb-28246",
"centrePoint": {
"lat": -37.885119,
"lon": 145.007345
},
"address": {
"state": "VIC",
"postcode": "3185",
"regionName": "BAYSIDE COUNCIL",
"suburb": "ELSTERNWICK"
}
},
{
"id": "suburb-28252",
"centrePoint": {
"lat": -37.891972,
"lon": 145.041981
},
"address": {
"state": "VIC",
"postcode": "3163",
"regionName": "GLEN EIRA COUNCIL",
"suburb": "GLEN HUNTLY"
}
}
]
}