[ Whereis® API Home ] [ JSON API Home ] [ Services ] [ Resource Discovery Services ]

Use the region resources to obtain a paginated list of all region, access information about a single region or access attributes: all suburbs with a region or metadata about the region.

List

Access a paginated list of region, optionally filtered by state and region name.

List URL

HTTP GET to <ENDPOINT>/service/resources/regions/?<PARAMETERS>

List Parameters

Parameter

Mandatory?

Description

query

N

A wildcard filter on the name of the region. For example a query of: "g*" will return all regions starting with the letter "g"

state

N

An optional state to restrict the regions to.

Default will show regions from all states.

typeN

Optional region type to restrict the results to.

Default will show all regions types.

sort

N

The sorting order of the results.

This maybe one of the following:

"POPULARITY" = Order by what is defined as the most "popular" regions.

"ALPHABETIC" = Order by alphabetical order of the region name.

Default = "POPULARITY"

detailsN

Either a multiple value parameter or comma separated list of JSON attributes to be shown in the result. This allows showing only the parts of the region information. Handy to keep response sizes smaller for large lists.

Default = "id", "address", "centrePoint", "streetPoint", "bounds", "granularity"

size

N

maximum number of results to return. Min = 1

Default = 20

start

N

First result to return. If "size" is 20 and your request returns a "total" of 30, submit a second request with "start" = 21 to retrieve the remaining results.

Sample List Request

<ENDPOINT>/service/resources/regions/?query=g*&state=VIC&details=id&details=address&size=2

Sample List Response

 

Item

Access an individual region by identifier.

Item URL

HTTP GET to <ENDPOINT>/service/resources/regions/<ID>/?<PARAMETERS>

Item Parameters

Parameter

Mandatory?

Description

idY

Either the real ID as defined in the list result such as "region-50008" or a pseudo identifier made up of the name and optional state such as "greater-melbourne" or "greater-melbourne-vic". If using a pseudo identifier, spaces in the name are replaced with a hyphen "-" character and it is assumed that if a state is given, it is at the end.

detailsN

Either a multiple value parameter or comma separated list of JSON attributes to be shown in the result. This allows showing only the parts of the suburb information. Handy to keep response sizes smaller for large lists.

Default = "id", "address", "centrePoint", "streetPoint", "bounds", "granularity"

Sample Request

<ENDPOINT>/service/resources/regions/greater-melbourne-vic/?details=address,bounds

Sample Response

 

Region Metadata

Return the region counts starting with a given letter. This is optionally filtered by state.

Region Metadata URL

HTTP GET to <ENDPOINT>/service/resources/regions/metadata/?<PARAMETERS>

Region Metadata Parameters

Parameter

Mandatory?

Description

stateN

Optional state to restrict the metadata to.

Default = All states

Sample Region Metadata Request

<ENDPOINT>/service/resources/regions/metadata/?state=NT

Sample Region Metadata Response

 

Region suburbs

Access a paginated list of suburbs for a given region, optionally filtered by suburb name.

Region Suburbs URL

HTTP GET to <ENDPOINT>/service/resources/regions/<ID>/suburbs/?<PARAMETERS>

Region Suburbs Parameters

 

Parameter

Mandatory?

Description

idYEither the real ID as defined in the list result such as "region-50008" or a pseudo identifier made up of the name and optional state such as "greater-melbourne" or "greater-melbourne-vic". If using a pseudo identifier, spaces in the name are replaced with a hyphen "-" character and it is assumed that if a state is given, it is at the end.

query

N

A wildcard filter on the name of the street. For example a query of: "m*" will return all suburbs with in the given region starting with the letter "m"

detailsN

Either a multiple value parameter or comma separated list of JSON attributes to be shown in the result. This allows showing only the parts of the suburb information. Handy to keep response sizes smaller for large lists.

Default = "id", "address", "centrePoint", "streetPoint", "bounds", "granularity"

size

N

maximum number of results to return. Min = 1

Default = 20

start

N

First result to return. If "size" is 20 and your request returns a "total" of 30, submit a second request with "start" = 21 to retrieve the remaining results.

Region Suburbs URL

<ENDPOINT>/service/resources/regions/greater-melbourne/suburbs?size=1details=address

Sample Suburb Streets Response

{
  "results": [
    {
      "address": {
        "suburb": "MELBOURNE",
        "suburbVanities": [
          "MELB"
        ],
        "postcode": "3000",
        "regions": [
          "GREATER MELBOURNE",
          "MELBOURNE - INNER CITY SUBURBS",
          "MELBOURNE CBD",
          "MELBOURNE COUNCIL"
        ],
        "state": "VIC",
        "display": "MELBOURNE, VIC 3000"
      }
    }
  ],
  "pagination": {
    "start": 0,
    "total": 361
  }
}

 

 

NOTES