Youβve built your JSON request body β now letβs send it using Postman or cURL, with the proper headers.
Whether using Postman or cURL, make sure to include these HTTP headers:
| Header Name | Value |
|---|---|
Content-Type | application/json |
accept | application/json |
Authorization | Bearer <your_access_token> |
π‘οΈ You must first authenticate using the
/authenticateendpoint to get a valid token.
See the authentication tutorial.
- Open Postman and create a new
POSTrequest. - Set the URL to:
https://bemap-prod.benomad.com/bgis/service/routing/1.0
- Under the Headers tab, add:
| KEY | VALUE |
|---|---|
| Content-Type | application/json |
| accept | application/json |
| Authorization | Bearer your_access_token |
- Under the Body tab:
- Select
rawand chooseJSON. - Paste your routing request JSON body.
- Select
{
"geoserver": "osm",
"routingMode": "MODE_VIAS",
"outputLanguage": "fr",
"destinations": [
{
"coordinateSat": {
"lon": 2.32158,
"lat": 48.86533
}
},
{
"coordinateSat": {
"lon": 4.35655,
"lat": 50.8447
}
}
],
"options": [
"POLYLINE"
],
"routingVehicleProfile": {
"transportMode": "CAR"
}
}- Click Send. π―
curl -X POST "https://bemap-prod.benomad.com/bgis/service/routing/1.0" \
-H "Content-Type: application/json" \
-H "accept: application/json" \
-H "Authorization: Bearer <your_access_token>" \
-d '{
"destinations": [
{ "coordinateSat": { "lon": 2.3522, "lat": 48.8566 } },
{ "coordinateSat": { "lon": 5.0415, "lat": 47.3220 } }
],
"routingVehicleProfile": {
"transportMode": "CAR"
},
"routingCriterias": ["AVOID_MOTORWAYS"],
"options": ["POLYLINE"]
}'π Make sure to replace <your_access_token> with a valid token retrieved from the /authenticate endpoint.