NBAI Map API (0.1.0)
Download OpenAPI specification:Download
Directions Json Handler
query Parameters
altcount | integer <int32> number of alternative routes to return. Default: |
alternatives | boolean enable to return alternative routes. Note: Default: |
annotations | boolean
|
approaches | string |
avoid | string Indicates that the calculated route(s) should avoid the indicated features. Format: |
context | string
|
debug | boolean enable to show debug information. Default: |
departure_time | integer <int64> departure time. Format: Unit: Default: |
destination required | string location of destination. Format: Regex: ^[\d.-]+,[\d.-]+$ |
geometry | string Enum: "polyline" "polyline6" "geojson" output format of geometry. Default: |
key | string apikey for authentication. Default: |
mode | string mode of service. Values: Default: |
origin required | string {{location_of_origin}} Format: Regex: ^[\d.-]+,[\d.-]+$ |
overview | string Enum: "full" "simplified" "false" output verbosity of overview (whole trip) geometry. Default: |
session | string unique session id for trip identification. Note: Help to reuse cached trip characteritics when set. Default: |
special_object_types | string special geospatial objects to include in response. Format: Default: |
steps | boolean enable to include Default: |
truck_size | string Indicates the truck size in CM, only valid when mode=6w. Format: |
truck_weight | integer <int32> Indicates the truck weight including trailers and shipped goods in KG, only valid when mode=6w. |
waypoints | string location(s) of waypoint(s) along the trip. Format: Regex: (^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$) |
Responses
Response samples
- 200
{- "errorMessage": "string",
- "global_special_objects": { },
- "mode": "string",
- "routes": [
- {
- "distance": 0,
- "distance_full": 0,
- "duration": 0,
- "end_location": {
- "latitude": 0,
- "longitude": 0
}, - "geojson": {
- "coordinates": [
- [
- 0
]
]
}, - "geometry": "string",
- "geometry_full": "string",
- "legs": [
- {
- "annotation": {
- "datasources": [
- 0
], - "distance": [
- 0
], - "duration": [
- 0
], - "metadata": {
- "datasource_names": [
- "string"
]
}, - "nodes": [
- 0
], - "speed": [
- 0
], - "weight": [
- 0
]
}, - "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "end_location": {
- "latitude": 0,
- "longitude": 0
}, - "raw_duration": {
- "value": 0
}, - "start_location": {
- "latitude": 0,
- "longitude": 0
}, - "steps": [
- {
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "end_location": {
- "latitude": 0,
- "longitude": 0
}, - "geojson": {
- "coordinates": [
- [
- null
]
]
}, - "geometry": "string",
- "intersections": [
- {
- "bearings": [
- null
], - "classes": [
- null
], - "entry": [
- null
], - "intersection_in": 0,
- "intersection_out": 0,
- "lanes": [
- { }
], - "location": {
- "latitude": null,
- "longitude": null,
- "name": null
}
}
], - "maneuver": {
- "bearing_after": 0,
- "bearing_before": 0,
- "coordinate": {
- "latitude": 0,
- "longitude": 0,
- "name": "string"
}, - "instruction": "string",
- "maneuver_type": "string",
- "modifier": "string"
}, - "name": "string",
- "start_location": {
- "latitude": 0,
- "longitude": 0
}
}
]
}
], - "predicted_duration": 0,
- "raw_duration": 0,
- "special_objects": { },
- "start_location": {
- "latitude": 0,
- "longitude": 0
}
}
], - "status": "string"
}
DistanceMatrix JSON Handler
query Parameters
approaches | string |
avoid | string |
context | string
|
debug | boolean enable to show debug information. Default: |
departure_time | integer <int64> departure time. Format: Unit: Default: |
destinations required | string locations of destinations Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
key | string apikey for authentication. Default: |
mode | string mode of service. Values: Default: |
origins required | string locations of origins Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
Responses
Response samples
- 200
{- "rows": [
- {
- "elements": [
- {
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "predicted_duration": {
- "value": 0
}, - "raw_duration": {
- "value": 0
}
}
]
}
], - "status": "string"
}
DistanceMatrix JSON POST Handler
query Parameters
key | string |
Request Body schema: application/json
approaches | string |
avoid | string |
context | string
|
debug | boolean enable to show debug information. Default: |
departure_time | integer <int64> departure time. Format: Unit: Default: |
destinations required | string locations of destinations Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
key | string apikey for authentication. Default: |
mode | string mode of service. Values: Default: |
origins required | string locations of origins Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
Responses
Request samples
- Payload
{- "approaches": "string",
- "avoid": "string",
- "context": "string",
- "debug": true,
- "departure_time": 0,
- "destinations": "string",
- "key": "string",
- "mode": "string",
- "origins": "string"
}
Response samples
- 200
{- "rows": [
- {
- "elements": [
- {
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "predicted_duration": {
- "value": 0
}, - "raw_duration": {
- "value": 0
}
}
]
}
], - "status": "string"
}
DistanceMatrix JSON Handler
query Parameters
approaches | string |
avoid | string |
context | string
|
debug | boolean enable to show debug information. Default: |
departure_time | integer <int64> departure time. Format: Unit: Default: |
destinations required | string locations of destinations Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
key | string apikey for authentication. Default: |
mode | string mode of service. Values: Default: |
origins required | string locations of origins Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
Responses
Response samples
- 200
{- "rows": [
- [
- [
- 0
]
]
], - "status": "string"
}
DistanceMatrixConcise JSON POST Handler
query Parameters
key | string |
Request Body schema: application/json
approaches | string |
avoid | string |
context | string
|
debug | boolean enable to show debug information. Default: |
departure_time | integer <int64> departure time. Format: Unit: Default: |
destinations required | string locations of destinations Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
key | string apikey for authentication. Default: |
mode | string mode of service. Values: Default: |
origins required | string locations of origins Format: lat0,lng0|lat1,lng1|... Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
Responses
Request samples
- Payload
{- "approaches": "string",
- "avoid": "string",
- "context": "string",
- "debug": true,
- "departure_time": 0,
- "destinations": "string",
- "key": "string",
- "mode": "string",
- "origins": "string"
}
Response samples
- 200
{- "rows": [
- [
- [
- 0
]
]
], - "status": "string"
}
Isochrone JSON Handler
query Parameters
center required | string |
departure_time | integer <int64> |
distances | string |
key | string |
mode | string |
opacities | string |
resolution | integer <int32> |
strokes | string |
times | string |
Responses
Response samples
- 200
{- "distances": [
- 0
], - "opacities": [
- 0
], - "polylines": [
- "string"
], - "status": "string",
- "strokes": [
- "string"
], - "times": [
- 0
]
}
Optimization Json Handler
query Parameters
approaches | string |
coordinates required | string A semicolon-separated list of {lat},{lng}. Format: Regex: (^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$) |
destination | string Specify the destination coordinate of the returned route. Values: Default: |
geometries | string output format of geometry. Value: Default: |
key | string apikey for authentication. Default: |
mode | string mode of service. Values: Default: |
roundtrip | boolean Indicates whether the returned route is roundtrip. Default: |
source | string The coordinate at which to start the returned route. Values: Default: |
with_geometry | boolean Indicates whether the return geometry. Default: |
Responses
Response samples
- 200
{- "code": "string",
- "trips": [
- {
- "distance": 0,
- "duration": 0,
- "geometry": "string",
- "legs": [
- {
- "distance": 0,
- "duration": 0,
- "steps": [
- {
- "distance": 0,
- "duration": 0,
- "geometry": "string"
}
], - "summary": "string"
}
]
}
], - "waypoints": [
- {
- "location": {
- "latitude": 0,
- "longitude": 0
}, - "name": "string",
- "trips_index": 0,
- "waypoint_index": 0
}
]
}
Post Trip Route Json Handler
Request Body schema: application/json
context | string
|
debug | boolean enable to show debug information. Default: |
key | string apikey for authentication. Default: |
mode | string mode of service. Values: Default: "" |
special_object_types | Array of strings special geospatial objects to include in response. Default: |
timestamps | string unix timestamp of each Unit: Format: Regex: ^[\d]+(|[\d]+)*$ |
tolerate_outlier | boolean enable to ignore location not found in service boundary. Note: enable this to ignore outliers, otherwise an error will be thrown. Default: |
waypoints required | string location(s) of waypoint(s) along the trip. Format: Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
Responses
Request samples
- Payload
{- "context": "string",
- "debug": true,
- "key": "string",
- "mode": "string",
- "special_object_types": [
- "string"
], - "timestamps": "string",
- "tolerate_outlier": true,
- "waypoints": "string"
}
Response samples
- 200
{- "errorMessage": "string",
- "mode": "string",
- "route": {
- "distance": 0,
- "geometry": "string",
- "special_objects": { }
}, - "status": "string"
}
SnapToRoads Json Handler
query Parameters
approaches | string |
avoid | string |
context | string
|
interpolate | boolean enable to interpolate the path. Note: might return more points Default: |
key | string apikey for authentication. Default: |
mode | string |
path required | string
Format: Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
radiuses | string radiuses of each Unit: Format: Regex: ^[\d]+(|[\d]+)*$ |
timestamps | string (unix timestamps for each Unit: Format: ts0|ts1|... Regex: ^[\d]+(|[\d]+)*$ |
tolerate_outlier | boolean enable to ignore location not found in service boundary. Note: enable this to ignore outliers, otherwise an error will be thrown. Default: |
Responses
Response samples
- 200
{- "distance": 0,
- "geometry": [
- "string"
], - "snappedPoints": [
- {
- "bearing": 0,
- "distance": 0,
- "location": {
- "latitude": 0,
- "longitude": 0
}, - "name": "string",
- "originalIndex": 0
}
], - "status": "string"
}
SnapToRoads JSON POST Handler
query Parameters
key | string |
Request Body schema: application/json
approaches | string |
avoid | string |
context | string
|
interpolate | boolean enable to interpolate the path. Note: might return more points Default: |
key | string apikey for authentication. Default: |
mode | string |
path required | string
Format: Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$ |
radiuses | string radiuses of each Unit: Format: Regex: ^[\d]+(|[\d]+)*$ |
timestamps | string (unix timestamps for each Unit: Format: ts0|ts1|... Regex: ^[\d]+(|[\d]+)*$ |
tolerate_outlier | boolean enable to ignore location not found in service boundary. Note: enable this to ignore outliers, otherwise an error will be thrown. Default: |
Responses
Request samples
- Payload
{- "approaches": "string",
- "avoid": "string",
- "context": "string",
- "interpolate": true,
- "key": "string",
- "mode": "string",
- "path": "string",
- "radiuses": "string",
- "timestamps": "string",
- "tolerate_outlier": true
}
Response samples
- 200
{- "distance": 0,
- "geometry": [
- "string"
], - "snappedPoints": [
- {
- "bearing": 0,
- "distance": 0,
- "location": {
- "latitude": 0,
- "longitude": 0
}, - "name": "string",
- "originalIndex": 0
}
], - "status": "string"
}