Routing API Developer's Guide

JSON Representation

The jsonAttributes parameter controls the JSON response representation. Combine different values by adding the respective values.

Value Description
1 Lower case first character of identifiers, this is default behaviour.
8 Include _type element in JSON output for classes with abstract parent classes, this is default behaviour.
16 Use plural naming for collections. The default is to use singular naming.
32 Flatten list of shape strings to double arrays containing lat/lon pairs. Potentially available altitude values are not returned. By default shapes are returned as lists of strings.
64 Flatten list of shape strings to double arrays containing lat/lon/alt triplets. Altitude values are returned if available. By default shapes are returned as lists of strings.
128 Suppress JSON response object wrapper.

For example, to specify JSON output with lowercased identifiers (1), including _type attributes (8) and a double representation of shape points (32) use jsonAttributes=41:

https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apikey={YOUR_APIKEY}
&waypoint0=geo!37.7914050,-122.3987030
&waypoint1=geo!37.7866569,-122.4026513
&jsonAttributes=41
&mode=fastest;car;
Note: This example uses a HERE API Key to authenticate your request. For information on other possible options, see https://developer.here.com/documentation/authentication. For examples of how to use the other authentication options with the Routing API, see Authentication Examples.