EMS : Appendix 9 - v1 JSON to v2 JSON Data Types

[ Whereis® API Home ] [ Appendices ]

The following table shows changes to data types between v1 JSON and v2 JSON

Type

v1 JSON API

v2 JSON API

Notes

Structured Address

{
  "number":<string>,
  "street":<street>,
  "intersection":{
      "type":<string>,
      "size":<string>,
      "commonName":<string>,
      "streets":[<street>,...]
  },
  "suburb":<string>,
  "regionName":<string>,
  "state":<string>,
  "postcode":<string>,
  "addressID":<string>,
  "title":<string>
}

 

 

{
     "display":<string>,
     "number":<string>,
     "street":<street>,
     "property":<string>,
     "intersection":[<street>],
     "suburb":<string>,
     "region":<string>,
     "type":<string>,
     "postcode":<string>,
     "state":<string>,
     "regions":[<string>]
}

 

 

 

 

“regionName” changed to “region”

“Intersection” changed

“address ID” removed

“title” removed

“display” added

 

 

 

Geocoded address

{
    "address":<structuredAddress>,
    "centrePoint":<lonlat>,
    "streetPoint":<lonlat>,
    "granularity":<string>,  
    "approximated":<boolean>
}

 

 

 

{
  "id": <string>,
  "centrePoint":<point>,
  "streetPoint":<point>,
  "approximated": <Boolean>,
  "granularity": <string>,
  "address": <address>
}

 

 

 

“id” added

Reverse geocode request

{
  "point":<lonlat>,
  "granularity":<string>,     
  "radius":<int> 
  "maxResults":<int> 
}

 

 

{
    "location":<point>,
    "granularity":[<string>],
    "radius":<int>
}

 

 
 

 

“point” changed to “location”

Now accepts list of granularities

Now only returns one result

Reverse geocode response

[
  {
    “geocodedAddress”:
       <geocodedAddress>,
    “distance”:<int>
   },
   ...
]

 

 

 

{
   “results”: [{
      "id": <string>,
      "centrePoint":<point>,
      "streetPoint":<point>,
      "approximated": <Boolean>,
      "granularity": <string>,
      "address": <address>
      “distance”:<int>
   },
   ...
]
}

 

 

 

Returns “results” containing list of one element

Distance property moved into geocoded address object

 

Rank request

{
  "referencePoint":<lonlat>,
  "allowTolls":<boolean>,
  "rankMethod":<string>,
  "points":[<lonlat>,...]
}

 

 

{
    "startPoint":<point>,
    "tolls":<Boolean>,
    "method":<string>,
    "mode":<string>,
    "endPoints":[{<point>}]
}

 

Changed property names