Skip to content

Request creation of a new tour

Request

Security
ApiKeyAuth
Bodyapplication/jsonrequired
datestring, (date)required

Date on which the tour is / will be driven. Must not be in the past

Example:"2026-08-03"
assignmentstring, [ 1 .. 128 ] charactersrequired

Vehicle / route / driver identifier. This value is used to look up jobs in Data Gateway

Example:"876-042"
depotstring, [ 1 .. 128 ] charactersrequired

Depot identifier

Example:"DEPOT-BERLIN-01"
depotIsDestinationboolean

Whether to use depot address as the destination for the tour.

Default:false
Example:true
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": "2026-08-03",
    "assignment": "876-042",
    "depot": "DEPOT-BERLIN-01",
    "depotIsDestination": true
  }'

Responses

Tour has been successfully created

Bodyapplication/json
dataobject(TourCreated)

Output from tour creation

Example:
{ "tourId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
Response
{ "data": { "tourId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } }