Sequence

Operations on the sequence level

Request creation of a new sequence

SecurityApiKeyAuth
Request
path Parameters
tourId
required
string <uuid>

Unique tour identifier (generated by Better Route backend)

Request Body schema: application/json
mode
required
string (SequenceCreationMode)

Mode which is used to create a sequence:

  • FIXED_OPTIMIZATION instructs that ETAs of waypoints are to be re-calculated, while the order of the waypoints is mostly kept intact (waypoint may only be moved in certain special cases, like when the time frame changes for a waypoint)
  • FULL_OPTIMIZATION instructs the backend to create an entirely new sequence, without attempts to maintain the previous order of waypoints
  • RETURN_TO_PREVIOUS_WAYPOINT_ORDER can be used to return to a previously used order of waypoints, in a situation when results of running FULL_OPTIMIZATION need to be "undone"
  • USE_PROVIDED instructs the backend to keep the order of the provided waypoint ids (time frames will be ignored)
Enum: "FIXED_OPTIMIZATION" "FULL_OPTIMIZATION" "RETURN_TO_PREVIOUS_WAYPOINT_ORDER" "USE_PROVIDED"
required
object (Coordinates)

A pair of coordinates

startTime
required
string <time>
waypointIds
Array of strings <uuid>

List of waypoints IDs representing expected order of waypoints in the generated sequence. When provided, sequence creation mode must be 'USE_PROVIDED'.

firstWaypointId
string <uuid>

ID of the waypoint which must become first in the generated sequence. When provided, sequence creation mode must be 'FULL_OPTIMIZATION'.

Responses
200

Sequence creation has been successfully initiated

400

Error response returned when the request is invalid. In most cases this implies that some data in the request is either missing or has incorrect format.

401

Error response returned when the provided API key is missing or invalid

404

Error response returned in cases the requested endpoint or data can't be found

500

Error response returned whenever the server fails to process the request

post/v1/tours/{tourId}/sequences
Request samples
application/json
{
  • "mode": "FIXED_OPTIMIZATION",
  • "coords": {
    },
  • "startTime": "08:00:00",
  • "waypointIds": [
    ],
  • "firstWaypointId": "e166c0ac-984c-45e8-bb99-c28140b1a29b"
}
Response samples
application/json
{
  • "data": {
    }
}

Get sequences for a given tour, ordered from newest to oldest

SecurityApiKeyAuth
Request
path Parameters
tourId
required
string <uuid>

Unique tour identifier (generated by Better Route backend)

Responses
200

List of sequences, created for a given tour

400

Error response returned when the request is invalid. In most cases this implies that some data in the request is either missing or has incorrect format.

401

Error response returned when the provided API key is missing or invalid

404

Error response returned in cases the requested endpoint or data can't be found

500

Error response returned whenever the server fails to process the request

get/v1/tours/{tourId}/sequences
Request samples
Response samples
application/json
{
  • "data": [
    ]
}

Get latest generated sequence for a given tour

SecurityApiKeyAuth
Request
path Parameters
tourId
required
string <uuid>

Unique tour identifier (generated by Better Route backend)

Responses
200

Full sequence information, including open, closed and unassigned waypoints

400

Error response returned when the request is invalid. In most cases this implies that some data in the request is either missing or has incorrect format.

401

Error response returned when the provided API key is missing or invalid

404

Error response returned in cases the requested endpoint or data can't be found

500

Error response returned whenever the server fails to process the request

get/v1/tours/{tourId}/sequences/latest
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Get a sequence by ID

SecurityApiKeyAuth
Request
path Parameters
tourId
required
string <uuid>

Unique tour identifier (generated by Better Route backend)

sequenceId
required
integer <int64>

Unique sequence identifier (generated by Better Route backend)

Responses
200

Full sequence information, including open, closed and unassigned waypoints

400

Error response returned when the request is invalid. In most cases this implies that some data in the request is either missing or has incorrect format.

401

Error response returned when the provided API key is missing or invalid

404

Error response returned in cases the requested endpoint or data can't be found

500

Error response returned whenever the server fails to process the request

get/v1/tours/{tourId}/sequences/{sequenceId}
Request samples
Response samples
application/json
{
  • "data": {
    }
}