Skip to main content

OptimizedRouteRequest

stops object[]required

Ordered list of stops. The first and last stops are fixed anchors; only intermediate stops are reordered. Minimum 4 stops.

Possible values: >= 4

  • Array [
  • hexstring

    AfriHex code at resolution 7

    Example: AF-GH-7-0GXTJJB0ZZZZZ
    point object

    Raw coordinate

    lngnumber<double>
    Example: -0.1867
    latnumber<double>
    Example: 5.604
    headinginteger

    Device compass bearing in degrees (0 = north). On dual-carriageway roads it disambiguates which carriageway the endpoint snaps to, so routes don't begin with a phantom U-turn. Omit when unknown.

    Possible values: >= 0 and <= 359

    Example: 270
  • ]
  • modestring

    Travel mode.

    Possible values: [driving, foot, bicycle, motor_scooter]

    Default value: driving
    narrationstring

    If set, includes turn-by-turn steps with the specified narration style.

    Possible values: [landmark, street, both]

    languagestring

    BCP-47 language tag for step instructions (e.g. en-US). Defaults to en-US.

    Example: en-US
    OptimizedRouteRequest
    {
    "stops": [
    {
    "hex": "AF-GH-7-0GXTJJB0ZZZZZ",
    "point": {
    "lng": -0.1867,
    "lat": 5.604
    },
    "heading": 270
    }
    ],
    "mode": "driving",
    "narration": "landmark",
    "language": "en-US"
    }