Example: JSON GET Request & Response

The following is an example of a JSON GET request for the Reverse Geocode service. Note that a value that is associated with more than one key query parameter can be assigned to the parameters by using the following syntax: parameter1&parameter2=value.

GET http://myserver:8080/Geocode/rest/GeocodeService/reverseGeocode.json?
x=57.70716&y=12.025594&coordSysName=EPSG:4326&
distance=1&distanceUnits=METERS HTTP/1.1
GET http://myserver:8080/rest/GlobalGeocode/reverseGeocode.json?
x=57.70716&y=12.025594&coordSysName=EPSG:4326&
distance=1&distanceUnits=METERS HTTP/1.1

The following shows the JSON response returned by the previous request.

{
   "totalPossibleCandidates": 1,
   "totalMatches": 1,
   "candidates": [
      {
         "precisionLevel": 1,
         "formattedStreetAddress": "KALLKÄLLEGATAN 34",
         "formattedLocationAddress": "416 54 GÖTEBORG",
         "identifier": null,
         "precisionCode": "RS5A",
         "sourceDictionary": "0",
         "matching": null,
         "geometry": {
            "type": "Point",
            "coordinates": [
               57.712566, 12.025625
            ],
            "crs": {
               "type": "name",
               "properties": {
                  "name": "epsg:4326"
               }
            }
         },
         "address": {
            "mainAddressLine": "KALLKÄLLEGATAN 34",
            "addressLastLine": "416 54 GÖTEBORG",
            "placeName": "",
            "areaName1": "VÄSTRA GÖTALANDS LÄN",
            "areaName2": "GÖTEBORG",
            "areaName3": "GÖTEBORG",
            "areaName4": "",
            "postCode1": "416 54",
            "postCode2": "",
            "country": "SWE",
            "addressNumber": "34",
            "streetName": "KALLKÄLLE",
            "unitType": null,
            "unitValue": null,
            "customFields": {
               "REVERSE_GEOCODE_DISTANCE_UNIT": "METER",
               "REVERSE_GEOCODE_DISTANCE": "0.9420000000000001"
            }
         },
         "ranges": [
            {
               "placeName": null,
               "lowHouse": "34",
               "highHouse": "34",
               "side": "UNKNOWN",
               "oddEvenIndicator": "EVEN",
               "units": [],
               "customValues": {}
            }
         ]
      }
   ]
}