G-NAF Addresses

Retrieve one address by its id

The pid a search or a resolve returned. This is the endpoint that makes storing a pid worthwhile: the address can be read back a year later without knowing how it was originally typed.

A 404 means G-NAF retired the id between releases, which does happen. Search for the address again to get its current one.

get/v1/addresses/{id}

Request

  • Base URL: https://api.locio.com.au
  • URL: https://api.locio.com.au/v1/addresses/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The id from a result you stored. In Australia that is G-NAF's ADDRESS_DETAIL_PID, which a result also carries under address_detail_pid.

Query parameters

countrystring

Which country's addresses to search, as a two letter ISO 3166-1 code. Defaults to AU.

Only a secret key may send it. A public key is scoped to the country the request came from, which Cloudflare resolves from the browser's address, and this parameter is ignored on one: a key that sits in a page cannot choose what it may see.

A country no address data is loaded for answers 200 with an empty data, a country_code and a note saying so. That is not an error: it is the right answer for somebody typing from a country you do not hold.

Response

The address.

country_codestring

The country these results were searched in. AU today. Distinct from an address's own country, which is the country's name.

notestring

Why the answer is empty when empty is correct: no address data is loaded for this country, or the country could not be determined. Absent on an ordinary answer.

Example response

{
  "data": {
    "id": "GATAS717990791",
    "address_detail_pid": "GAVIC411711441",
    "gnaf_pid": "GAVIC411711441",
    "formatted": "Shop 3, 145 Sydney Road, Coburg VIC 3058",
    "components": {
      "building_name": "Piermont Resort",
      "flat_type": "Shop",
      "flat_number": "3",
      "level_type": "Level",
      "level_number": "3",
      "number_first": "145",
      "number_first_suffix": "A",
      "number_last": "437",
      "street_name": "Sydney",
      "street_type": "Road",
      "street_suffix": "West",
      "locality_name": "Coburg",
      "state": "VIC",
      "postcode": "3058",
      "lot_number": "3"
    },
    "lat": -37.7409,
    "lng": 144.9654,
    "mesh_block": "60049060000",
    "gnaf": {
      "date_created": "2004-04-29",
      "legal_parcel_id": "3\\RP4791",
      "alias_principal": "PRINCIPAL",
      "primary_secondary": "SECONDARY",
      "primary_pid": "GAVIC422078857",
      "geocode_type": "FRONTAGE CENTRE SETBACK"
    },
    "country_code": "AU"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.