Geocoding API: Capabilities Service JSON Request & Response
JSON Request
The following is an example of a JSON request for the Capabilities service. In this example, the request is for the capabilities for Great Britain.
GET http://myserver:8080/rest/GlobalGeocode/capabilities.json?
country=GBR HTTP/1.1
JSON Response
The following shows the JSON response returned by the previous request. This response is an abbreviated view.
{
"serviceName": "GeocodeService",
"serviceDescription": "Provides a method to geocode and reverse geocode",
"coreVersion": "5.1.0.59",
"geocodingEngines": [
"World"
],
"supportedCountries": [
"XWG"
],
"supportedOperations": [
{
"name": "geocode",
"requiredInputs": [
{
"name": "address",
"description": "The input address",
"type": "Address",
"defaultValue": null,
"lowBoundary": null,
"highBoundary": null,
"allowedValuesWithDescriptions": {}
}
],
"optionalInputs": [
{
"name": "type",
"description": "Indicates what kind of geocode
to perform",
"type": "ONEOF",
"defaultValue": "address",
"lowBoundary": null,
"highBoundary": null,
"allowedValuesWithDescriptions": {
"geographic": "geographic",
"postal": "postal",
"address": "address",
"custom": "custom"
}
},
{
"name": "preferences",
"description": "Contains preferences and constraints",
"type": "Preferences",
"defaultValue": null,
"lowBoundary": null,
"highBoundary": null,
"allowedValuesWithDescriptions": {}
}
],
"outputs": [
{
"name": "responses",
"description": "The geocoded address information",
"type": "Response"
}
],
"supportLevels": [
{
"supportedDataLevel": 3,
"countries": [
"XWG"
],
"updatedRequiredInputs": [],
"updatedOptionalInputs": [],
"updatedOptionalOutputs": [
{
"name": "CITYRANK",
"description": "City ranking from 1 (highest)
to 10 (lowest). 0 means no rank available",
"type": "KEY"
}
]
}
]
},
.
.
.
{
"name": "responses",
"description": "Holds results from a geocode
or reverse geocode operation",
"properties": [
{
"name": "totalPossibleCandidates",
"input": null,
"output": {
"name": "totalPossibleCandidates",
"description": "Number of candidate that could
have been returned from this query",
"type": "int"
}
},
{
"name": "totalMatches",
"input": null,
"output": {
"name": "totalMatches",
"description": "Number of candidates that could
have been returned from this query",
"type": "int"
}
},
{
"name": "candidates",
"input": null,
"output": {
"name": "candidates",
"description": "ordered list of matching candidates",
"type": "LIST<Candidate>"
}
}
]
}
],
"geocoderVersions": {
"World": "4.5"
}
}