[ 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 state's name, or ID
URL
HTTP Post to <ENDPOINT> /service/detail/state
Request format
{
"state":<string>,
"levelOfDetail":[<string>, <string>, ...]
}
Rules
Parameter | Mandatory? | Description |
state | Y | State names may be submitted in full or as abbreviations and are not case sensitive. |
levelOfDetail | N | Array containing one or more of "ADJACENT" = list of <adjacentStates> "BOUNDING_BOX" = rectangular area that entirely contains this state "BOUNDING_POLYGON" = geometry of points which plot the boundary of this state "SUBURBS" = all suburbs within this state "REGIONS" = all regions within this state "GEOMETRY" = BOUNDING_BOX and BOUNDING_POLYGON "SUBDIVISIONS" = REGIONS + SUBURBS If levelOfDetail is not entered, returns centrePoint and address as state name only |
Alternative URLs
Alternatively if you already know the ID of the state you can request detail by state ID, using either of these GET methods, optionally including levelOfDetail and tolerance as request parameters:
HTTP GET to <ENDPOINT>/service/detail/state/<id>
HTTP GET to <ENDPOINT>/service/detail/state/?id=<id>&levelOfDetail=<level_of_detail>
Sample POST request
{
"state":"VIC",
"levelOfDetail": ["SUBURBS"]
}
Sample GET requests
GET /service/detail/state/state-7
GET /service/detail.state?id=state-7&levelOfDetail=BOUNDING_BOX
Sample response (truncated)
{
"state": {
"id": "state-7",
"centrePoint": {
"lat": -37.81353,
"lon": 144.9627
},
"address": {
"state": "VIC"
}
},
"suburbs": [
{
"id": "suburb-18371",
"centrePoint": {
"lat": -36.92175,
"lon": 146.70126
},
"address": {
"state": "VIC",
"postcode": "3737",
"regionName": "ALPINE COUNCIL",
"suburb": "ABBEYARD"
}
},
{
"id": "suburb-28300",
"centrePoint": {
"lat": -37.804729,
"lon": 144.996855
},
"address": {
"state": "VIC",
"postcode": "3067",
"regionName": "BOROONDARA COUNCIL",
"suburb": "ABBOTSFORD"
}
},
// cont...