# Get a sequence by ID Endpoint: GET /v1/tours/{tourId}/sequences/{sequenceId} Version: 1.0.0 Security: ApiKeyAuth ## Path parameters: - `tourId` (string, required) Unique tour identifier (generated by Better Route backend) - `sequenceId` (integer, required) Unique sequence identifier (generated by Better Route backend) ## Response 200 fields (application/json): - `data` (object) Full information about a sequence, including open, closed and unassigned waypoints - `data.sequenceId` (number) - `data.mode` (string) 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" - `data.coords` (object) A pair of coordinates - `data.coords.lat` (number) Latitude - `data.coords.lon` (number) Longitude - `data.startTime` (string,null) - `data.sequenceIdWithPreviousWaypointOrder` (number,null) - `data.created` (string) - `data.sequenceFidelity` (number,null) - `data.destination` (object,null) Destination for a tour / sequence - `data.destination.address` (object,null) An address - `data.destination.address.street` (string,null) Street - `data.destination.address.streetNumber` (string,null) Street number - `data.destination.address.locality` (string,null) City, town, village etc - `data.destination.address.postalCode` (string,null) Postal/zip code - `data.destination.address.country` (string,null) Country as "alpha-2 code" of ISO 3166 (https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) - `data.destination.address.streetCoordinates` (any) - `data.destination.address.rooftopCoordinates` (any) - `data.destination.eta` (string,null) Arrival time to the destination - `data.openWaypoints` (array) Open waypoints, ordered accordingly to their place in the sequence - `data.openWaypoints.waypointId` (string) A unique identifier of this waypoint - `data.openWaypoints.jobIdentifiers` (array) List of job IDs (internal and external) - `data.openWaypoints.jobIdentifiers.internalId` (string) Internal Job ID reference as UUID - `data.openWaypoints.jobIdentifiers.externalId` (string,null) External Job ID reference as string - `data.openWaypoints.status` (string) State of the waypoint Enum: "UNPROCESSED", "PROCESSED", "CONFIRMED" - `data.openWaypoints.closedAtTimestamp` (string,null) Time at which this waypoint was closed - `data.openWaypoints.stopTimeInSeconds` (number) How much time is planned for stopping at the waypoint and delivering / picking up parcels - `data.openWaypoints.timeFrame` (object,null) Time window with earliest and latest possible time - `data.openWaypoints.timeFrame.earliest` (string) Example: "14:00:00" - `data.openWaypoints.timeFrame.latest` (string) Example: "16:00:00" - `data.openWaypoints.timeFrame.timezone` (string) Example: "Europe/Berlin" - `data.openWaypoints.type` (object) - `data.openWaypoints.eta` (string) Estimated time of arrival at this waypoint - `data.openWaypoints.sequenceError` (any) - `data.openWaypoints.jobIds` (array) List of job references as UUIDs. Deprecated use jobIdentifiers instead - `data.closedWaypoints` (array) Waypoints that are already closed (i.e. all jobs are done) - `data.unassignedWaypoints` (array) Waypoints that are not part of the sequence but are still open (e.g. waypoints that could not be added to the sequence due to unreachable timeframes) ## Response 400 fields (application/json): - `error` (object) Error response - `error.status` (integer) HTTP error status Example: 400 - `error.message` (string) Human readable error message Example: "'depot' field can't be null" - `error.errorCode` (string) Machine-friendly error message containing only alphanumeric characters and '.' Example: "tour.list.fetch.failed.bad.request" - `error.details` (array) ## Response 401 fields (application/json): - `error` (object) Error response - `error.status` (integer) HTTP error status Example: 400 - `error.message` (string) Human readable error message Example: "'depot' field can't be null" - `error.errorCode` (string) Machine-friendly error message containing only alphanumeric characters and '.' Example: "tour.list.fetch.failed.bad.request" - `error.details` (array) ## Response 404 fields (application/json): - `error` (object) Error response - `error.status` (integer) HTTP error status Example: 400 - `error.message` (string) Human readable error message Example: "'depot' field can't be null" - `error.errorCode` (string) Machine-friendly error message containing only alphanumeric characters and '.' Example: "tour.list.fetch.failed.bad.request" - `error.details` (array) ## Response 500 fields (application/json): - `error` (object) Error response - `error.status` (integer) HTTP error status Example: 400 - `error.message` (string) Human readable error message Example: "'depot' field can't be null" - `error.errorCode` (string) Machine-friendly error message containing only alphanumeric characters and '.' Example: "tour.list.fetch.failed.bad.request" - `error.details` (array)