Part of Bettermile Route API responsible for tour management
https://dev.routes.bettermile.com/
Vehicle / route / driver identifier. This value is used to look up jobs in Data Gateway
https://dev.routes.bettermile.com/v1/tours
curl -i -X POST \
https://dev.routes.bettermile.com/v1/tours \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"date": "2019-08-24",
"assignment": "string",
"depot": "string"
}'
{ "data": { "tourId": "eb2f92e7-0760-4174-a0f6-c120b0ef2ec8" } }
https://dev.routes.bettermile.com/v1/tours
curl -i -X GET \
'https://dev.routes.bettermile.com/v1/tours?date=2019-08-24' \
-H 'x-api-key: YOUR_API_KEY_HERE'
{ "data": [ { … } ] }
https://dev.routes.bettermile.com/v1/tours/{tourId}
curl -i -X GET \
'https://dev.routes.bettermile.com/v1/tours/{tourId}' \
-H 'x-api-key: YOUR_API_KEY_HERE'
{ "data": { "tourId": "eb2f92e7-0760-4174-a0f6-c120b0ef2ec8", "date": "2019-08-24", "assignment": "string", "depot": "string", "created": "2019-08-24T14:15:22Z", "jobs": [ … ], "waypoints": [ … ], "rttCategory": "GOOD", "destination": { … }, "unassignedJobIdentifiers": [ … ] } }
https://dev.routes.bettermile.com/v1/tours/{tourId}/destination
curl -i -X PUT \
'https://dev.routes.bettermile.com/v1/tours/{tourId}/destination' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"lat": -90,
"lon": -180
}'
{ "data": {} }
https://dev.routes.bettermile.com/v1/tours/{tourId}/potential-recalc-gain
curl -i -X GET \
'https://dev.routes.bettermile.com/v1/tours/{tourId}/potential-recalc-gain?lat=0.1&lon=0.1' \
-H 'x-api-key: YOUR_API_KEY_HERE'
{ "data": { "potentialGainInSeconds": 0 } }