Download OpenAPI specification:
Welcome to the Optibus Operations API documentation!
Optibus Operations is a cloud-based software solution that enables public transport providers to optimize their operations, planning, and scheduling. Our API provides programmatic access to Optibus Operations' functionality, allowing you to integrate it with your own applications and systems.
The Optibus Operations API requires authentication via a stable API_KEY sent in the HTTP request Authorization header in the form of Authorization: API_KEY.
Additionally requests against our API expect the X-Optibus-Api-Client header to be set using your ACCOUNT_NAME.
If you are considering programmatic access the Optibus Operations platform, please contact your Optibus Customer Success Manager who can provide the API_KEY and ACCOUNT_NAME above, as well as your account-specific BASE_URL for the API endpoints documented below.
Example:
CURL -H "Authorization:API_KEY" -H 'X-Optibus-Api-Client: API_USER' https://BASE_URL/driver
We may in the future make changes to the Optibus Operations API described on this page. This could be to fix bugs, enhance the richness of information made available in existing endpoints, or to introduce new API functionality via new endpoints.
The Optibus Operations team treats API changes in the following way:
/v{version}/{endpoint}. These endpoint specific numbers may lag behind the major version of the overall API, but will never exceed it.In case we do introduce breaking changes to existing endpoints, this will happen in the following way:
{baseURL}/v1/driver, we would introduce a new endpoint {baseURL}/v2/driver with adjusted behaviorThis section gives step-by-step guides for common integration scenarios with external HR systems. For help with your particular integration scenario, please contact your Optibus Customer Success Manager.
This use case details how to create and update driver information in Optibus when changes are made in your external HR system.
Process:
Driver Creation in External HR System:
When a new driver is created in your HR system, make a POST request to the /v2/drivers API endpoint.
Example Request:
POST /v2/drivers
Authorization: <YOUR_API_TOKEN>
Content-Type: application/json
{
"drivers": [
{
"id": "driver-id-001",
"firstName": "John",
"lastName": "Smith",
"regionName": "North Region",
"startDate": "2024-01-15",
"emailAddress": "john.smith@example.com"
}
]
}
Notes:
startDate is provided, an initial employment period will be created automatically.id field in the request, so that the driver has the same identifier in both of your systems.Driver Modification in External HR System:
When an existing driver is edited in your HR system, make a PUT request to the /v2/drivers API endpoint.
Example Request:
PUT /v2/drivers
Authorization: <YOUR_API_TOKEN>
Content-Type: application/json
{
"drivers": [
{
"id": "driver-id-001",
"firstName": "John",
"lastName": "Smith-Jones",
"emailAddress": "john.smithjones@example.com",
"customAttributes": {
"licenseNumber": "DL123456"
}
}
]
}
Notes:
startDate, regionName, depotName, or groupName fields.This use case describes how to regularly update an external HR system with driver information from Optibus using a recurring job (e.g., a cron job).
Process:
Fetch Drivers from Optibus:
Make a GET request to the /v2/drivers API endpoint. The response is paginated.
Example Request:
GET /v2/drivers?page=1&isEmployed=true
Authorization: <YOUR_API_TOKEN>
Example Response:
{
"drivers": [
{
"id": "driver-id-001",
"firstName": "John",
"lastName": "Smith",
"emailAddress": "john.smith@example.com",
"mainRegionPeriod": {
"regionName": "North Region",
"depotName": "Main Depot"
},
"customAttributes": {
"licenseNumber": "DL123456"
}
}
],
"pagination": {
"currentPage": 1,
"totalPages": 5
}
}
Process Drivers:
drivers array, create or update the corresponding record in your HR system using the driver's id as the identifier.pagination.currentPage < pagination.totalPages, increment the page parameter and repeat until all pages are processed.This use case details how to reflect changes made to driver absences in an external HR system within Optibus.
Process:
Absence Creation in External HR System:
POST request to the /v1/absences API endpoint.absenceId, code (absence type), driverId, startDate, startTime, endDate, and endTime. Refer to the API documentation for the full list of required and optional parameters per absence object.Example POST Request Body for Creating an Absence:
[
{
"absenceId": "your-new-unique-uuid-string",
"driverId": "driver-id-789",
"code": "PERSONAL",
"startDate": "2024-02-01",
"startTime": 600, // 10:00
"endDate": "2024-02-01",
"endTime": 720, // 12:00
"notes": "Personal appointment"
}
]
API Call:
POST /v1/absences
Authorization: <YOUR_API_TOKEN>
Content-Type: application/json
// Request body from above (array containing the absence object)
Absence Modification in External HR System:
POST request to the /v1/absences endpoint in the Optibus API. This endpoint handles updates (upserts) for absences.absenceId as the original absence.code, startDate, startTime, endDate, and endTime, as needed.Example POST Request Body for Updating an Absence:
(Note the absenceId is the same as an existing absence in Optibus)
[
{
"absenceId": "your-existing-unique-uuid-string",
"driverId": "driver-id-789",
"code": "SICK",
"startDate": "2024-02-01",
"startTime": 600, // 10:00
"endDate": "2024-02-02",
"endTime": 720, // 12:00
"notes": "Updated: Doctor's appointment, extended"
}
]
API Call:
POST /v1/absences
Authorization: <YOUR_API_TOKEN>
Content-Type: application/json
// Request body from above (array containing the updated absence object)
Note on Changing Assigned Driver: The Optibus API does not currently support changing the driverId for an existing absence directly through an update. If a driver assignment needs to be changed for an absence:
absenceId and the correct driverId using the creation process described above (sent in an array).Balance Validation: When the entitlementBanksEffectiveDate feature flag is enabled, the API validates that absences do not cause negative balance violations for entitlement banks that do not allow negative balances. If violations are detected, the API returns HTTP 422 with details about which drivers have violations and which banks are affected.
skipBalanceValidation=true to your request (e.g., POST /v1/absences?skipBalanceValidation=true).entitlementBanksEffectiveDate feature flag is enabledskipBalanceValidation query parameter is NOT set to "true" (validation is enabled by default)Example HTTP 422 Error Response:
{
"error": {
"type": "negativeBalanceViolation",
"message": "One or more absences would cause negative balance violations",
"details": {
"drivers": [
{
"driverId": "driver-id-123",
"violatedBanks": ["Vacation", "Sick"]
},
{
"driverId": "driver-id-456",
"violatedBanks": ["Vacation"]
}
],
"summary": {
"affectedDrivers": 2
}
}
}
}
Absence Deletion in External HR System:
This use case describes how to regularly update an external HR system with driver absence data from Optibus. This is typically achieved by setting up a recurring job (e.g., a cron job).
Process:
Schedule a Recurring Job:
Fetch Driver Absences from Optibus:
GET request to the /v2/drivers/absences API endpoint.Example GET Request:
(The specific endpoint and any necessary query parameters, like date ranges, should be used as per the Optibus API specification. Example below uses /v2/drivers/absences with date filtering.)
GET /v2/drivers/absences?fromDate=2024-01-01&toDate=2024-01-31&page=1
Authorization: <YOUR_API_TOKEN>
Query Parameters:
driverIds: Comma-separated list of driver IDs to filter for (optional)absenceCode: Comma-separated list of absence type codes to filter for (optional)fromDate: Returns only absences that end on or after this date (YYYY-MM-DD) (optional)toDate: Returns only absences that start on or before this date (YYYY-MM-DD) (optional)page: 1-indexed page number (defaults to 1)Example JSON Response:
{
"absences": [
{
"absenceId": "uuid-string-for-absence-1",
"absenceCode": "SICK",
"driverId": "driver-id-123",
"startDate": "2024-01-10",
"endDate": "2024-01-11",
"startTime": 540,
"endTime": 1020,
"note": "Flu symptoms"
},
{
"absenceId": "uuid-string-for-absence-2",
"absenceCode": "VACATION",
"driverId": "driver-id-456",
"startDate": "2024-01-15",
"endDate": "2024-01-20"
},
{
"absenceId": "uuid-string-for-absence-3",
"absenceCode": "PERSONAL",
"driverId": "driver-id-456",
"startDate": "2024-01-25",
"endDate": "2024-01-25",
"startTime": 600,
"endTime": 840,
"note": "Appointment"
}
],
"pagination": {
"currentPage": 1,
"totalPages": 3,
"nextPage": 2
}
}
Process Absences:
pagination property in the response to determine if there are more pages to fetch.absences array.absenceId already exists in your external HR system, update the corresponding record with the latest information.absenceId does not exist in your external HR system, create a new absence record using the data provided.startTime and endTime are optional and represent minutes from midnight. Convert these to time strings if needed (e.g., 540 minutes = 09:00).page parameter until all pages have been processed.This section gives step-by-step guides for common integration scenarios with external fleet management systems. For help with your particular integration scenario, please contact your Optibus Customer Success Manager.
This use case details how to create and update vehicle information in Optibus when changes are made in your external fleet management system.
Process:
Vehicle Creation in External Fleet Management System:
When a new vehicle is created in your fleet management system, make a POST request to the /v1/vehicles API endpoint.
Example Request:
POST /v1/vehicles
Authorization: <YOUR_API_TOKEN>
Content-Type: application/json
{
"vehicles": [
{
"id": "vehicle-001",
"licensePlate": "ABC-123",
"regionName": "North Region",
"depotName": "Main Depot",
"type": "Double Decker",
"model": "Routemaster"
}
]
}
Notes:
id field in the request, so that the vehicle has the same identifier in both of your systems.Vehicle Modification in External Fleet Management System:
When an existing vehicle is edited in your fleet management system, make a PUT request to the /v1/vehicles API endpoint.
Example Request:
PUT /v1/vehicles
Authorization: <YOUR_API_TOKEN>
Content-Type: application/json
{
"vehicles": [
{
"id": "vehicle-001",
"licensePlate": "ABC-456",
"parkingLocation": "Bay 15",
"type": "Double Decker",
"model": "Routemaster",
"decommissioned": false
}
]
}
Notes:
regionName or depotName fields.This use case describes how to regularly update an external fleet management system with vehicle information from Optibus using a recurring job (e.g., a cron job).
Process:
Fetch Vehicles from Optibus:
Make a GET request to the /v1/vehicles API endpoint. The response is paginated.
Example Request:
GET /v1/vehicles?page=1&isDecommissioned=false
Authorization: <YOUR_API_TOKEN>
Example Response:
{
"vehicles": [
{
"id": "vehicle-001",
"licensePlate": "ABC-123",
"parkingLocation": "Bay 15",
"mainRegionPeriod": {
"regionName": "North Region",
"depotName": "Main Depot"
},
"type": "Double Decker",
"model": "Routemaster",
"decommissioned": false,
"customAttributes": {
"capacity": 42
}
}
],
"pagination": {
"currentPage": 1,
"totalPages": 5
}
}
Process Vehicles:
vehicles array, create or update the corresponding record in your fleet management system using the vehicle's id as the identifier.pagination.currentPage < pagination.totalPages, increment the page parameter and repeat until all pages are processed.This use case details how to create and update vehicle downtime information in Optibus when changes are made in your external fleet management system.
Process:
Downtime Creation or Update in External Fleet Management System:
When a vehicle downtime is created or updated in your fleet management system, make a PUT request to the /v1/vehicles/downtimes API endpoint.
Example Request:
PUT /v1/vehicles/downtimes
Authorization: <YOUR_API_TOKEN>
Content-Type: application/json
{
"downtimes": [
{
"downtimeId": "downtime-001",
"vehicleId": "vehicle-001",
"startDate": "2024-02-01",
"endDate": "2024-02-03",
"note": "Scheduled maintenance"
}
]
}
Notes:
downtimeId is provided and exists, the downtime will be updated; otherwise, a new downtime is created.downtimeId is omitted, a new downtime with an auto-generated ID will be created.startTime and endTime are omitted, the downtime covers entire day(s).endDate is omitted, the downtime is ongoing indefinitely.This use case describes how to regularly update an external fleet management system with vehicle downtime data from Optibus using a recurring job (e.g., a cron job).
Process:
Fetch Vehicle Downtimes from Optibus:
Make a GET request to the /v1/vehicles/downtimes API endpoint. The response is paginated.
Example Request:
GET /v1/vehicles/downtimes?fromDate=2024-01-01&toDate=2024-01-31&page=1
Authorization: <YOUR_API_TOKEN>
Example Response:
{
"downtimes": [
{
"downtimeId": "downtime-001",
"vehicleId": "vehicle-001",
"startDate": "2024-01-10",
"endDate": "2024-01-12",
"startTime": 540,
"endTime": 1020,
"note": "Scheduled maintenance"
},
{
"downtimeId": "downtime-002",
"vehicleId": "vehicle-002",
"startDate": "2024-01-15",
"note": "Out of service indefinitely"
}
],
"pagination": {
"currentPage": 1,
"totalPages": 2
}
}
Process Downtimes:
downtimes array, create or update the corresponding record in your fleet management system using the downtimeId as the identifier.pagination.currentPage < pagination.totalPages, increment the page parameter and repeat until all pages are processed.This section gives step-by-step guides for common query scenarios with Optibus Operations for retrieving operational plan data. For help with your particular query scenario, please contact your Optibus Customer Success Manager.
This section utilizes the /v2/operational-plan endpoint for all operational plan data requests.
This use case details how to fetch a list of duties assigned to specific drivers within a given date range and extract associated block and vehicle information. This is useful for synchronizing driver schedules, auditing assignments, or building custom reports.
Process:
Prepare Your Request:
fromDate and toDate parameters) for which you want to retrieve duties.driverUuids of the drivers whose duties you want to retrieve. These should be provided as a comma-separated string. If omitted, information for all drivers is returned.depotUuids to filter the operational plan by specific depots. This parameter expects one or more depot UUIDs as a comma-separated string. Note: The UUIDs for depots can be obtained from the /v1/regions endpoint, where they correspond to the regionUuid property.includeUnassigned=true (in conjunction with driverUuids) to also include unassigned tasks for context around those drivers.Make a GET Request to the Operational Plan Endpoint:
/v2/operational-plan API endpoint.fromDate, toDate, and any desired optional parameters (driverUuids, depotUuids, etc.) as query parameters.Example GET Request:
GET /v2/operational-plan?fromDate=2024-06-01&toDate=2024-06-07&driverUuids=driver-uuid-123&depotUuids=depot-uuid-abc
Authorization: <YOUR_API_TOKEN>
Example JSON Response Snippet (Relevant sections):
The response is an array of depot plans. The following example highlights the properties crucial for linking drivers to duties, blocks, and vehicles, showing how to derive the necessary IDs for your table.
[
{
"depotUuid": "depot-uuid-abc",
"depotName": "Main Depot",
"assignments": [
{
"date": "2024-06-01",
"driverAssignments": [
{
"driver": "driver-uuid-123",
"assignments": ["task-uuid-A"]
}
],
"vehicleAssignments": [
{
"vehicle": "vehicle-id-XYZ",
"assignments": ["block-id-1"]
}
],
"properties": []
}
],
"blocks": [
{
"id": "block-id-1",
"displayId": "block-display-id-B1",
"type": "block",
"disabled": false,
"summary": { "type": "Standard Bus" },
"events": [
{
"dutyId": "task-uuid-A",
"eventId": "event-uuid-X"
}
]
}
],
"tasks": [
{
"id": "task-uuid-A",
"type": "duty",
"displayId": "Duty 501",
"summary": {
"type": "duty",
"startTime": 480,
"endTime": 1020
},
"events": [
{
"uuid": "event-uuid-X",
"eventType": "deadhead",
"subType": "depot_pull_out",
"startTime": "08:00:00",
"endTime": "08:30:00",
"blockId": "block-id-1"
}
]
},
{
"id": "task-uuid-SPARE",
"type": "spare",
"displayId": "Morning Spare",
"dutyType": "spare",
"spareType": "SPARE1",
"summary": {
"type": "spare",
"startTime": 360,
"endTime": 720
},
"events": []
}
],
"drivers": [
{
"id": "driver-ext-123",
"uuid": "driver-uuid-123",
"firstName": "John",
"lastName": "Doe",
"archived": false
}
],
"vehicles": [
{
"id": "vehicle-id-XYZ",
"licensePlate": "AB123CD",
"make": "Mercedes",
"model": "Citaro"
}
]
}
]
How to extract duties for a specific driver and build the desired table:
To create a table with columns driverUuid, driverName, dutyId, blockId, vehicleId, follow these steps:
Note on Spare Types: When the spare types feature flag is enabled, spare tasks will include additional properties (spareType, dutyType: "spare") and the displayId will show the configured spare type name instead of the original display ID.
Iterate through the Depot Plans and Daily Assignments:
assignments array. For each assignment object (representing a specific date), iterate through its driverAssignments array.Populate Driver and Duty Information:
driverUuid: Directly available from driverAssignment.driver.driverName: Look up the driverUuid in the root drivers array (e.g., drivers.find(d => d.uuid === driverAssignment.driver)) to retrieve firstName and lastName.dutyId: The driverAssignment.assignments array contains one or more task IDs assigned to that driver. Each of these is a dutyId.Identify Block(s) and Vehicle(s) for the Duty:
dutyId (task ID), find the corresponding object in the root tasks array.events array of that task. An event within the duty will contain a blockId.assignments object for the current date.vehicleAssignments array.vehicleAssignment object where its assignments array includes your blockId.vehicle property of that vehicleAssignment object is the vehicleId you need for the table row.This use case demonstrates how to retrieve duties and a detailed list of all service trips within each duty. This provides a granular view of an operational day.
Process:
Prepare Your Request:
fromDate and toDate parameters.includeStops=true if you need detailed stop information for each trip. Be aware that enabling this can significantly increase response time and payload size.Make a GET Request to the Operational Plan Endpoint:
/v2/operational-plan API endpoint, including the date range query parameters.Example GET Request:
GET /v2/operational-plan?fromDate=2024-06-15&toDate=2024-06-15&includeStops=true
Authorization: <YOUR_API_TOKEN>
Example JSON Response Snippet (Relevant sections):
The tasks array contains the duty objects. The overall duty start/end times can be found in the summary object (as minutes from midnight). Each duty contains an events array detailing the activities within it.
[
{
"assignments": [
{
"date": "2024-06-15",
"driverAssignments": [
{
"driver": "driver-uuid-456",
"assignments": ["task-uuid-B"]
}
]
}
],
"tasks": [
{
"id": "task-uuid-B",
"type": "duty",
"displayId": "Duty 700",
"summary": {
"type": "duty",
"startTime": 420,
"endTime": 960
},
"events": [
{
"uuid": "event-uuid-E",
"eventType": "deadhead",
"subType": "depot_pull_out",
"startTime": "07:00:00",
"endTime": "07:30:00"
},
{
"uuid": "event-uuid-F",
"eventType": "service_trip",
"startTime": "07:30:00",
"endTime": "08:15:00",
"tripId": "service-trip-201",
"optibusRouteId": "route-R2",
"direction": 1,
"stops": [
{ "id": "stop-1", "name": "Main St.", "time": "07:30:00" },
{ "id": "stop-2", "name": "Oak Ave.", "time": "07:45:00" }
]
},
{
"uuid": "event-uuid-G",
"eventType": "service_trip",
"startTime": "08:30:00",
"endTime": "09:15:00",
"tripId": "service-trip-202",
"optibusRouteId": "route-R2",
"direction": 2
}
]
}
]
}
]
How to extract duties with service trips:
Identify Duties:
tasks array in the API response.task object with "type": "duty" represents a duty.task.id with the assignments array to find the corresponding date.Extract Service Trips within each Duty:
task object), access its events array.eventType is "service_trip" represents a service trip. You can extract startTime, endTime, tripId, optibusRouteId, direction, and any other relevant details available directly on the event object.eventType: "deadhead" represent non-service movements. You can filter these out or process them separately as needed.This use case explains how to identify duties (tasks) that have been explicitly cancelled for a given day. This is essential for managing daily operations and reporting on changes.
Process:
Prepare Your Request:
fromDate and toDate parameters to cover the specific day you are interested in. For a single day, fromDate and toDate will be the same.Make a GET Request to the Operational Plan Endpoint:
/v2/operational-plan API endpoint with the desired date range.Example GET Request:
GET /v2/operational-plan?fromDate=2024-06-10&toDate=2024-06-10
Authorization: <YOUR_API_TOKEN>
Example JSON Response Snippet (Relevant sections):
The assignments array contains a properties sub-array. An entry with disabled: true directly indicates a cancelled task.
[
{
"assignments": [
{
"date": "2024-06-10",
"driverAssignments": [],
"vehicleAssignments": [],
"properties": [
{
"taskId": "task-uuid-cancelled-A",
"disabled": true,
"cancellationReason": {
"reason": "Vehicle Breakdown",
"reasonCode": "VEHICLE_BREAKDOWN"
},
"assignmentType": "driverAssignment"
},
{
"taskId": "task-uuid-active-B",
"disabled": false,
"assignmentType": "driverAssignment"
}
]
}
],
"tasks": [
{
"id": "task-uuid-cancelled-A",
"type": "duty",
"displayId": "Duty 900 C",
"summary": { "type": "duty", "startTime": 540, "endTime": 1080 },
"events": []
},
{
"id": "task-uuid-active-B",
"type": "duty",
"displayId": "Duty 700 A",
"summary": { "type": "duty", "startTime": 420, "endTime": 900 },
"events": []
}
]
}
]
How to get a list of duties for a certain day which were cancelled:
GET request to the /v2/operational-plan endpoint for your desired fromDate and toDate.assignments array. For each daily assignment object, navigate to its properties array.properties array. Check the value of the disabled property: If property.disabled is true, the taskId associated with this property represents a cancelled duty.taskId identified as disabled: true, you can find the corresponding full duty object in the top-level tasks array (e.g., tasks.find(t => t.id === property.taskId)).cancellationReason object from the properties entry for more context.This guide provides technical instructions for integrating with the Optibus Driver App's "custom notification actions" feature.
Custom actions allow you to configure interactive buttons that appear on specific notifications sent to drivers. When a driver taps a button, it opens a web page that you host. This enables a variety of integrations, such as:
optibusPayload and optibusSignature.This feature is configured via the Limit notifications visibility preference in Optibus Operations. To enable and set up the custom action buttons, please contact your Optibus Customer Success Manager for assistance. They will help you configure the button text, target URL, and other parameters to suit your specific use case.
When a driver activates a custom action, your web page will receive a URL containing two critical query parameters. Any query parameters you originally included in the URL will also be preserved.
| Parameter | Description |
|---|---|
optibusPayload |
A URL-encoded, JSON-stringified object containing contextual data about the notification and action. |
optibusSignature |
A Base64-encoded digital signature of the optibusPayload string. Use this to verify the request's authenticity. |
optibusPayload ParameterThe optibusPayload contains all the contextual information for your web page. To use it, you must first URL-decode the string and then parse it as a JSON object.
JavaScript Example:
// The URL of the page opened by the Driver App.
const url = new URL(window.location.href);
// 1. Get the raw payload string from the URL's search parameters.
const rawPayload = url.searchParams.get("optibusPayload");
// 2. Parse the URL-encoded JSON string.
const payload = JSON.parse(rawPayload);
console.log(payload);
The parsed payload object will conform to the following schema:
{
"customAction": {
"key": "<string>"
},
"notification": {
"id": "<uuid>",
"driverId": "<string>",
"type": "<string>",
"params": {
// Schema is dependent on the notification 'type'
}
},
"payloadGeneratedAt": "2024-10-11T13:46:56.610Z"
}
Field Descriptions:
notification.id: The unique UUID of the notification that triggered the action.notification.driverId: The ID of the driver who received the notification.notification.type: The type of notification (e.g., assignTask). The schema of the params object depends on this value.notification.params: An object containing data specific to the notification type. Contact your Customer Success Manager for the exact schema for a given notification type.customAction.key: A custom string identifier you specify during the URL configuration.payloadGeneratedAt: An ISO 8601 timestamp indicating when the driver tapped the button.optibusSignature (Recommended)The optibusSignature parameter allows you to verify that the request was genuinely initiated by the Optibus system and has not been tampered with. Verification is optional but highly recommended for any security-sensitive application.
The signature is created by signing the raw optibusPayload string (before JSON parsing) using the RSA-SHA256 algorithm. You can verify it using a public key provided by Optibus.
Public Key: You can obtain the required public key from the Optibus public key API endpoint.
This example demonstrates how to verify the signature and check the payload's timestamp to prevent replay attacks.
const crypto = require("node:crypto");
// Use the public key fetched from the aforementioned Optibus API endpoint.
const publicKey = "";
// Extract the parameters from the URL.
// In a real application, you would get this from the incoming request.
const url = new URL("https://your-service.com/action?...");
const rawPayload = url.searchParams.get("optibusPayload");
const signature = url.searchParams.get("optibusSignature");
// 1. Verify the signature's authenticity.
const verifier = crypto.createVerify("RSA-SHA256");
verifier.update(rawPayload);
verifier.end();
const isVerified = verifier.verify(publicKey, signature, "base64");
if (!isVerified) {
throw new Error("Invalid signature. The request is not authentic.");
}
// 2. (Optional but Recommended) Check if the payload is recent to prevent replay attacks.
const maxPayloadAge = 5 * 60 * 1000; // 5 minutes in milliseconds
const parsedPayload = JSON.parse(rawPayload);
const payloadTimestamp = new Date(parsedPayload.payloadGeneratedAt).getTime();
if (Date.now() - payloadTimestamp > maxPayloadAge) {
throw new Error("Payload is too old. Possible replay attack.");
}
// If verification passes, you can proceed with your logic here.
console.log("Signature and timestamp are valid.");
The following is an example of a complete URL your service might receive after a custom action is triggered.
https://www.optibus.com/?optibusPayload=%7B%22notification%22%3A%7B%22id%22%3A%22b82df1ce-6420-47a6-be06-52b97c9965c5%22%2C%22driverId%22%3A%2233774450%22%2C%22type%22%3A%22assignTask%22%2C%22params%22%3A%7B%22calendarDate%22%3A%222024-10-11%22%2C%22taskName%22%3A%5B%7B%22name%22%3A%224%22%2C%22type%22%3A%22duty%22%2C%22endTime%22%3A1476%2C%22startTime%22%3A920%7D%5D%7D%7D%2C%22customAction%22%3A%7B%22key%22%3A%22OPEN%22%7D%2C%22payloadGeneratedAt%22%3A%222024-10-11T14%3A57%3A49.872Z%22%7D&optibusSignature=arML2T%2B4zu345r1xT78wYbjMZf8VUAmWXylOQUNkGf7isj7KppV75JQURiYufQxwlKmp9qVbk8SMIO3iKHs2FcU0XylBhzpa9QhK4ewyE6SfEhEuZKF7IzkwuL%2B6hJS13Hkqli5IzJKIt0pewVZaBBEREzuqtgm7KQZCCvwoT4nvFnt9kPcSDhJ0jui4IKXfsmBIpdo6XrVgxz72Rgc5ugHlJB9ZmtZ95r%2FBN5ZbBqS%2FThxyaogkLbfcpuFAGuewN2VWFoMVDUU38k0UT3S%2Bb1ZG9bqaeaXRe9tyNJv9JurRCistIAuD%2F4ThgseoLuopb8scJqst8Dp%2FM1XlP0rMYA%3D%3D
Returns the configured holidays (as in bank holidays).
This is distinct from individual driver absences.
If startDate and endDate are provided, the response will include only holidays within that date range.
If neither is provided, all configured holidays are returned.
startDate and endDate must be provided together.YYYY-MM-DD.[- {
- "groupName": "string",
- "name": "string",
- "timeDefinition": {
- "to": "2019-08-24",
- "from": "2019-08-24"
}
}
]Returns the configured organizational Regions including the corresponding Units for each Region.
[- {
- "name": "string",
- "isArchived": true,
- "units": [
- {
- "name": "string",
- "isArchived": true,
- "code": "string",
- "uuid": "string"
}
], - "uuid": "string"
}
]List existing drivers in the system, with optional filtering capability.
Notes:
pagination property in the response to see the total number of pages and the current page number.| driverIds | Array of strings
|
| onDate | string <date> (StringifyDate)
|
| regionNames | Array of strings
|
| isEmployed | boolean
|
| page | integer <int32> (PageNumber)
|
{- "pagination": {
- "currentPage": 1,
- "nextPage": 2,
- "totalPages": 10
}, - "drivers": [
- {
- "id": "ad681aa0-b99c-42db-912e-94ddef5f1387",
- "firstName": "John",
- "middleName": "Michael",
- "lastName": "Doe",
- "mainRegionPeriod": {
- "regionName": "North",
- "depotName": "North Depot",
- "groupName": "Full-Time Drivers"
}, - "loanedRegionPeriods": [
- {
- "regionName": "South",
- "depotName": "South Depot",
- "groupName": "Part-Time Drivers"
}
], - "mobileNumber": "1234567890",
- "homeNumber": "0987654321",
- "description": "Driver description",
- "emailAddress": "john.doe@example.com",
- "type": "Full-Time",
- "grade": "A",
- "union": "Union A",
- "customAttributes": {
- "key": "value"
}
}
]
}Add new drivers to the system.
Notes:
PUT /v2/drivers API endpoint instead.startDate is an optional field, but if provided, an initial employment period will be automatically created with this start date.customAttributes field and whether they are mandatory or not is determined by the attribute definitions in the "Driver attributes" preference in your Ops instance.STRING expect a string to be set for customAttributes[attributeId].NUMBER expect a number to be set for customAttributes[attributeId].BOOLEAN expect a boolean to be set for customAttributes[attributeId].DATE expect a date string formatted as YYYY-MM-dd to be set for customAttributes[attributeId].SINGLE_SELECT expect the value of one of the available select options to be set for customAttributes[attributeId].MULTI_SELECT expect an array of strings (each one being the value of one of the available select options) to be set for customAttributes[attributeId].DURATION expect a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59) to be set for customAttributes[attributeId].required | Array of objects (NewDriver) List of drivers to create. | ||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||
{- "drivers": [
- {
- "id": "driver-123",
- "firstName": "John",
- "middleName": "Michael",
- "lastName": "Doe",
- "startDate": "2026-01-01",
- "regionName": "North",
- "depotName": "North Depot",
- "groupName": "Full-Time Drivers",
- "mobileNumber": "1234567890",
- "homeNumber": "0987654321",
- "description": "Driver description",
- "emailAddress": "john.doe@example.com",
- "type": "Full-Time",
- "grade": "A",
- "union": "Union A",
- "customAttributes": {
- "key": "value"
}
}
]
}{- "createdDriverIds": [
- "string"
]
}Update existing drivers in the system.
Notes:
POST /v2/drivers API endpoint instead.customAttributes field and whether they are mandatory or not is determined by the attribute definitions in the "Driver attributes" preference in your Ops instance.STRING expect a string to be set for customAttributes[attributeId].NUMBER expect a number to be set for customAttributes[attributeId].BOOLEAN expect a boolean to be set for customAttributes[attributeId].DATE expect a date string formatted as YYYY-MM-dd to be set for customAttributes[attributeId].SINGLE_SELECT expect the value of one of the available select options to be set for customAttributes[attributeId].MULTI_SELECT expect an array of strings (each one being the value of one of the available select options) to be set for customAttributes[attributeId].DURATION expect a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59) to be set for customAttributes[attributeId].warnings property of the response.required | Array of objects (EditedDriver) List of drivers to update. | ||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||
{- "drivers": [
- {
- "id": "driver-123",
- "firstName": "John",
- "middleName": "Michael",
- "lastName": "Doe",
- "mobileNumber": "1234567890",
- "homeNumber": "0987654321",
- "description": "Driver description",
- "emailAddress": "john.doe@example.com",
- "type": "Full-Time",
- "grade": "A",
- "union": "Union A",
- "customAttributes": {
- "key": "value"
}
}
]
}{- "warnings": [
- {
- "details": [
- {
- "attributeIds": [
- "string"
], - "driverId": "string"
}
], - "message": "string",
- "type": "overwriteCustomAttributeEntry"
}
], - "updatedDriverIds": [
- "string"
]
}Returns information about which regions and depots drivers are assigned to during different time periods. The response is a map between the driver ID and an array of that driver's region periods.
Notes:
depotId is actually regionUuid. This inconsistency
will be improved in a future API version.periodId: A unique identifier for the period.type: The type of period (is it the driver's main region/depot, or were they just loaned there temporarily?)driverUUID: The ID of the driver.depotId: The ID of the region the driver is assigned to during the period.opUnitId: The ID of the depot (operational unit) within the region the driver is assigned to during the period.groupId: The ID of the driver group that the driver is assigned to during the period.startDate: The start date of the period.endDate: The end date of the period. If unspecified, the period is ongoing indefinitely.startTime: The start time of the period. If unspecified, the period starts at the beginning of the day.endTime: The end time of the period. If unspecified, the period ends at the end of the day.| driver | Array of strings (UUID)
|
{- "property1": [
- {
- "opUnitId": "string",
- "endTime": 0,
- "startTime": 0,
- "endDate": "2019-08-24",
- "startDate": "2019-08-24",
- "depotId": "string",
- "type": "MAIN",
- "periodId": "string",
- "groupId": "string",
- "driverUUID": "string"
}
], - "property2": [
- {
- "opUnitId": "string",
- "endTime": 0,
- "startTime": 0,
- "endDate": "2019-08-24",
- "startDate": "2019-08-24",
- "depotId": "string",
- "type": "MAIN",
- "periodId": "string",
- "groupId": "string",
- "driverUUID": "string"
}
]
}API endpoints for managing absences for drivers - i.e. periods where they are unavailable for work.
List existing driver absences in the system, with optional filtering capability.
Notes:
pagination property in the response to see the total number of pages and the current page number.startDate is mandatoryendDate is optional - if omitted, the absence will be ongoing indefinitelystartTime and endTime are optional - if omitted, the absence will be for the entire day(s) specified by startDate and endDate| driverIds | Array of strings
|
| absenceCode | Array of strings
|
| fromDate | string <date> (StringifyDate)
|
| toDate | string <date> (StringifyDate)
|
| page | integer <int32> (PageNumber)
|
{- "pagination": {
- "totalPages": 0,
- "nextPage": 0,
- "currentPage": 0
}, - "absences": [
- {
- "note": "string",
- "endTime": 0,
- "startTime": 0,
- "endDate": "2019-08-24",
- "startDate": "2019-08-24",
- "absenceRequestId": "string",
- "updatedOn": "2019-08-24T14:15:22Z",
- "createdOn": "2019-08-24T14:15:22Z",
- "driverId": "string",
- "absenceCode": "string",
- "absenceId": "string"
}
]
}Creates or updates absences for drivers. As input, provide a list of absence entries to create or update.
Notes:
absenceId field:absenceId is specified that already exists, the existing absence will be updated.absenceId is specified that does not already exist, a new absence will be created with the specified ID.absenceId to a corresponding fixed identifier from your external system that you are synchronizing with.startDate is mandatoryendDate is optional - if omitted, the downtime will be ongoing indefinitelystartTime and endTime are optional - if omitted, the downtime will be for the entire day(s) specified by startDate and endDateentitlementBanksEffectiveDate feature active (you can ask your Optibus contact about this), then the API will perform additional validations:entitlementBanksEffectiveDate feature flag is enabledskipBalanceValidation query parameter is NOT set to true (validation is enabled by default when the parameter is not provided)| skipBalanceValidation | boolean
|
| endTimeNextDay | boolean Deprecated |
| startTimeNextDay | boolean Deprecated |
| endTime | integer <int32> (MinutesFromMidnightTime) Wall clock time, represented as minutes since midnight. For example, |
| endDate | string <date> (StringifyDate) Stringified ISO8601 date in the form of |
| startTime | integer <int32> (MinutesFromMidnightTime) Wall clock time, represented as minutes since midnight. For example, |
| startDate required | string <date> (StringifyDate) Stringified ISO8601 date in the form of |
| absenceRequestId | string (UUID) Stringified ID for a resource. Cannot exceed 36 characters. |
| updatedOn | string <date-time> (StringifyDateTime) Stringified date-time. date-time notation as defined by RFC 3339, section 5.6, for example,2017-07-21T17:32:28Z |
| createdOn | string <date-time> (StringifyDateTime) Stringified date-time. date-time notation as defined by RFC 3339, section 5.6, for example,2017-07-21T17:32:28Z |
| metadata | object Additional data about the absence |
| note | string The note provided by the user. Cannot exceed 255 characters. |
| absenceCode required | string The absence code provided by the user |
| absenceId required | string (UUID) Stringified ID for a resource. Cannot exceed 36 characters. |
| driver required | string (UUID) Stringified ID for a resource. Cannot exceed 36 characters. |
[- {
- "endTimeNextDay": true,
- "startTimeNextDay": true,
- "endTime": 0,
- "endDate": "2019-08-24",
- "startTime": 0,
- "startDate": "2019-08-24",
- "absenceRequestId": "string",
- "updatedOn": "2019-08-24T14:15:22Z",
- "createdOn": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": null,
- "property2": null
}, - "note": "string",
- "absenceCode": "string",
- "absenceId": "string",
- "driver": "string"
}
]{ }Returns time off (entitlement) balances for drivers grouped by driver and bank. Numeric fields can be null when data is unavailable.
| driverIds required | Array of strings (UUID)
|
| bankNames | Array of strings
|
| onDate | string <date> (StringifyDate)
|
[- {
- "banks": [
- {
- "payoutDates": {
- "property1": {
- "type": "remainingBalance",
- "effectiveDate": "2019-08-24",
- "amount": 0.1
}, - "property2": {
- "type": "remainingBalance",
- "effectiveDate": "2019-08-24",
- "amount": 0.1
}
}, - "balances": [
- {
- "totalBalance": 0.1,
- "effectiveDate": "2019-08-24"
}
], - "remainingBalance": 0.1,
- "plannedBalance": 0.1,
- "usedBalance": 0.1,
- "totalBalance": 0.1,
- "unit": "days",
- "bankName": "string"
}
], - "driverId": "string"
}
]API endpoints for managing employment periods for drivers - i.e. periods where they are employed, hired, terminated, etc.
List existing driver employment periods in the system, with optional filtering capability.
Notes:
pagination property in the response to see the total number of pages and the current page number.startDate is mandatoryendDate is optional - if omitted, the employment period will be ongoing indefinitely| driverIds | Array of strings
|
| fromDate | string <date> (StringifyDate)
|
| toDate | string <date> (StringifyDate)
|
| page | integer <int32> (PageNumber)
|
{- "pagination": {
- "currentPage": 1,
- "nextPage": 2,
- "totalPages": 10
}, - "employmentPeriods": [
- {
- "driverId": "driver-334",
- "periodId": "period-123",
- "startDate": "2026-01-03",
- "endDate": "2026-01-03"
}, - {
- "driverId": "driver-334",
- "periodId": "period-456",
- "startDate": "2027-01-01"
}
]
}Creates a single driver employment period.
Notes:
periodId field:periodId is specified that already exists, you will receive an error (this endpoint does not support updating existing employment
periods - use the PUT /v1/drivers/employment-periods/{periodId} endpoint instead)periodId is specified that does not already exist, a new employment period will be created with the specified ID.periodId is not specified, a new employment period will be created with an automatically generated ID.periodId to a corresponding fixed identifier from your external system that you are synchronizing with, if such an identifier exists.| endDate | string <date> (StringifyDate) Stringified ISO8601 date in the form of |
| startDate required | string <date> (StringifyDate) Stringified ISO8601 date in the form of |
| driverId required | string ID of the driver this employment period belongs to. |
| periodId | string The ID of the employment period to create or update. If omitted, a new period will be created. Cannot exceed 36 characters. |
{- "periodId": "period-123",
- "driverId": "driver-123",
- "startDate": "2026-01-01",
- "endDate": "2027-05-17"
}{- "periodId": "period-123",
- "driverId": "driver-123",
- "startDate": "2026-01-01",
- "endDate": "2027-05-17"
}Updates a single driver employment period by ID.
Notes:
startDate and endDate fields of an employment period, not the driverId.shouldAutoUnassignFromEndDate to true, the system will auto-unassign duties from the day after the endDate if
this is the last employment period chronologically for the driver.| periodId required | string
|
| shouldAutoUnassignFromEndDate required | boolean When true, auto-unassign duties from the day after endDate if this is the last employment period. |
| endDate | string <date> (StringifyDate) Stringified ISO8601 date in the form of |
| startDate required | string <date> (StringifyDate) Stringified ISO8601 date in the form of |
| driverId required | string ID of the driver this employment period belongs to. |
{- "driverId": "driver-123",
- "startDate": "2026-01-01",
- "endDate": "2027-05-17",
- "shouldAutoUnassignFromEndDate": true
}{- "warnings": [ ]
}API endpoints for managing custom attributes for drivers - i.e. additional properties that can be set for drivers - including querying and updating their historical values.
List custom attribute entries for drivers, with filters. Although the GET /v2/drivers API endpoint also returns custom attribute values for
each driver, it is more limited, as it only returns attribute values for the specified date. This API endpoint allows you to query the full history
of attribute values for drivers, and see the date range in which those values applied.
Notes:
pagination property in the response to see the total number of pages and the current page number.type, union and grade fields are also queryable through this endpoint. These entries appear under attribute ID driverType, driverUnion and driverGrade.STRING will have value set to a stringNUMBER will have value set to a numberBOOLEAN will have value set to a booleanDATE will have value set to a date string formatted as YYYY-MM-ddSINGLE_SELECT will have value set to the value of one of the available select optionsMULTI_SELECT will have value set to an array of strings (each one being the value of one of the available select options)DURATION will have value set to a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59)"isMandatory": false may possibly have periods where the value is not set - in that case, the value will be omitted from the responsestartDate is mandatoryendDate is optional - if omitted, the entry value will be ongoing indefinitely into the future| driverIds | Array of strings (DriverId)
|
| attributeIds | Array of strings
|
| fromDate | string <date> (StringifyDate)
|
| toDate | string <date> (StringifyDate)
|
| page | integer <int32> (PageNumber)
|
{- "entries": [
- {
- "entryId": "entry-123",
- "driverId": "driver-123",
- "attributeId": "color",
- "value": "red",
- "startDate": "2026-01-01",
- "endDate": "2026-01-02"
}, - {
- "entryId": "entry-456",
- "driverId": "driver-456",
- "attributeId": "color",
- "value": "green",
- "startDate": "2026-01-03"
}
], - "pagination": {
- "currentPage": 1,
- "nextPage": 2,
- "totalPages": 10
}
}Creates or updates custom attribute entries for drivers. Although the POST /v2/drivers and PUT /v2/drivers API endpoints also allow you to create and update custom attribute values,
they are more limited in that they only allow you to create and update custom attribute values as of the current date. This API endpoint allows you to manage the full history of
custom attribute values for drivers.
Notes:
STRING expect a string to be set for value.NUMBER expect a number to be set for value.BOOLEAN expect a boolean to be set for value.DATE expect a date string formatted as YYYY-MM-dd to be set for value.SINGLE_SELECT expect the value of one of the available select options to be set for value.MULTI_SELECT expect an array of strings (each one being the value of one of the available select options) to be set for value.DURATION expect a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59) to be set for value."isMandatory": false allow the value to be 'unset' - simply omit the value field for that entry to unset it.entryId field:entryId is specified and an entry with that ID already exists, the existing entry will be updated.entryId is specified and an entry with that ID does not already exist, a new entry will be created with the specified ID.entryId is not specified, a new entry will be created with an automatically generated ID.2024-01-01, the next entry should start on 2024-01-02)value field for that date period.required | Array of objects (PutDriversCustomAttributesEntry) | ||||||||||||||
Array
| |||||||||||||||
{- "entries": [
- {
- "endDate": "2019-08-24",
- "startDate": "2019-08-24",
- "value": [
- 0.1
], - "attributeId": "string",
- "driverId": "string",
- "entryId": "string"
}
]
}{- "createdEntryIds": [
- "item-123",
- "item-456",
- "item-789"
], - "modifiedEntryIds": [
- "item-123",
- "item-456",
- "item-789"
]
}List driver groups that exist in the system.
| regionUuids | Array of strings (UUID)
|
| depotsIds | Array of strings (UUID) Deprecated
|
[- {
- "id": "ad681aa0-b99c-42db-912e-94ddef5f1387",
- "name": "Full-Time Drivers",
- "regionUuid": "c808109c-7c99-4038-9266-f3d241c53f5b",
- "regionName": "North",
- "depot": "c808109c-7c99-4038-9266-f3d241c53f5b",
- "meta": { }
}, - {
- "id": "ad681aa0-b99c-42db-912e-94ddef5f1387",
- "name": "Part-Time Drivers",
- "regionUuid": "c808109c-7c99-4038-9266-f3d241c53f5b",
- "regionName": "North",
- "depot": "c808109c-7c99-4038-9266-f3d241c53f5b",
- "meta": { }
}
]List existing vehicles in the system, with optional filtering capability.
Notes:
pagination property in the response to see the total number of pages and the current page number.| vehicleIds | string
|
| onDate | string
|
| regionNames | string
|
| isDecommissioned | boolean
|
| page | integer <int32> (PageNumber)
|
{- "pagination": {
- "totalPages": 0,
- "nextPage": 0,
- "currentPage": 0
}, - "vehicles": [
- {
- "customAttributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "decommissionedOnDate": "2019-08-24",
- "decommissioned": true,
- "model": "string",
- "type": "string",
- "note": "string",
- "loanedRegionPeriods": [
- {
- "depotName": "string",
- "regionName": "string"
}
], - "mainRegionPeriod": {
- "depotName": "string",
- "regionName": "string"
}, - "parkingLocation": "string",
- "licensePlate": "string",
- "id": "string"
}
]
}Add new vehicles to the system.
Notes:
PUT /v1/vehicles API endpoint instead.customAttributes field and whether they are mandatory or not is determined by the attribute definitions in the "Vehicle attributes" preference in your Ops instance.STRING expect a string to be set for customAttributes[attributeId].NUMBER expect a number to be set for customAttributes[attributeId].BOOLEAN expect a boolean to be set for customAttributes[attributeId].DATE expect a date string formatted as YYYY-MM-dd to be set for customAttributes[attributeId].SINGLE_SELECT expect the value of one of the available select options to be set for customAttributes[attributeId].MULTI_SELECT expect an array of strings (each one being the value of one of the available select options) to be set for customAttributes[attributeId].DURATION expect a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59) to be set for customAttributes[attributeId].required | Array of objects (NewVehicle) | ||||||||||||||||||||||
Array
| |||||||||||||||||||||||
{- "vehicles": [
- {
- "id": "abc-123",
- "regionName": "North",
- "depotName": "Main",
- "licensePlate": "XYZ 999",
- "parkingLocation": "Bay 30",
- "description": "A note about the vehicle",
- "type": "Double Decker",
- "model": "Routemaster",
- "decommissioned": false,
- "customAttributes": {
- "color": "red",
- "capacity": 42
}
}, - {
- "id": "def-456",
- "regionName": "South",
- "depotName": "Substation",
- "licensePlate": "XYZ 999",
- "parkingLocation": "Bay 31",
- "description": "Another note about a vehicle",
- "type": "Single Deck",
- "model": "Metrodecker",
- "decommissioned": true,
- "decommissionedOnDate": "2024-01-01",
- "customAttributes": {
- "color": "blue",
- "capacity": 36
}
}
]
}{- "createdVehicleIds": [
- "item-123",
- "item-456",
- "item-789"
]
}Update existing vehicles in the system.
Notes:
POST /v1/vehicles API endpoint instead.customAttributes field and whether they are mandatory or not is determined by the attribute definitions in the "Vehicle attributes" preference in your Ops instance.STRING expect a string to be set for customAttributes[attributeId].NUMBER expect a number to be set for customAttributes[attributeId].BOOLEAN expect a boolean to be set for customAttributes[attributeId].DATE expect a date string formatted as YYYY-MM-dd to be set for customAttributes[attributeId].SINGLE_SELECT expect the value of one of the available select options to be set for customAttributes[attributeId].MULTI_SELECT expect an array of strings (each one being the value of one of the available select options) to be set for customAttributes[attributeId].DURATION expect a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59) to be set for customAttributes[attributeId].required | Array of objects (EditedVehicle) | ||||||||||||||||||
Array
| |||||||||||||||||||
{- "vehicles": [
- {
- "id": "abc-123",
- "licensePlate": "XYZ 999",
- "parkingLocation": "Bay 30",
- "description": "A note about the vehicle",
- "type": "Double Decker",
- "model": "Routemaster",
- "decommissioned": false,
- "customAttributes": {
- "color": "red",
- "capacity": 42
}
}, - {
- "id": "def-456",
- "licensePlate": "XYZ 999",
- "parkingLocation": "Bay 31",
- "description": "Another note about a vehicle",
- "type": "Single Deck",
- "model": "Metrodecker",
- "decommissioned": true,
- "decommissionedOnDate": "2024-01-01",
- "customAttributes": {
- "color": "blue",
- "capacity": 36
}
}
]
}{- "updatedVehicleIds": [
- "item-123",
- "item-456",
- "item-789"
]
}Returns the information about the vehicles depot periods by vehicle ID.
| vehicleId | Array of strings
|
{- "property1": [
- {
- "opUnitId": "string",
- "endTime": 0,
- "startTime": 0,
- "endDate": "2019-08-24",
- "startDate": "2019-08-24",
- "depotId": "string",
- "type": "MAIN",
- "periodId": "string",
- "vehicleId": "string"
}
], - "property2": [
- {
- "opUnitId": "string",
- "endTime": 0,
- "startTime": 0,
- "endDate": "2019-08-24",
- "startDate": "2019-08-24",
- "depotId": "string",
- "type": "MAIN",
- "periodId": "string",
- "vehicleId": "string"
}
]
}API endpoints for managing downtimes for vehicles - i.e. periods where they are unavailable for service.
List existing vehicle downtimes in the system, with optional filtering capability.
Notes:
pagination property in the response to see the total number of pages and the current page number.startDate is mandatoryendDate is optional - if omitted, the downtime will be ongoing indefinitelystartTime and endTime are optional - if omitted, the downtime will be for the entire day(s) specified by startDate and endDate| vehicleIds | string
|
| fromDate | string
|
| toDate | string
|
| page | integer <int32> (PageNumber)
|
{- "downtimes": [
- {
- "downtimeId": "downtime-1",
- "vehicleId": "vehicle-1",
- "startDate": "2024-01-01",
- "endDate": "2024-01-02",
- "startTime": 120,
- "endTime": 180,
- "note": "Vehicle is being serviced for a discrete time period (02:00 on 1st January until 02:30 on 2nd January)"
}, - {
- "downtimeId": "downtime-2",
- "vehicleId": "vehicle-2",
- "startDate": "2024-01-03",
- "startTime": 360,
- "note": "Vehicle is being serviced starting at 06:00 on 3rd January, and the downtime is ongoing indefinitely"
}, - {
- "downtimeId": "downtime-3",
- "vehicleId": "vehicle-3",
- "startDate": "2024-01-04",
- "endDate": "2024-01-05",
- "note": "Vehicle is being serviced all day on the 4th and 5th January"
}
], - "pagination": {
- "currentPage": 1,
- "nextPage": 2,
- "totalPages": 2
}
}Creates or updates downtimes for vehicles. As input, provide a list of downtime entries to create or update.
Notes:
downtimeId field:downtimeId is specified and a downtime with that ID already exists, the existing downtime will be updated.downtimeId is specified and a downtime with that ID does not already exist, a new downtime will be created with the specified ID.downtimeId is not specified, a new downtime will be created with an automatically generated ID.startDate is mandatoryendDate is optional - if omitted, the downtime will be ongoing indefinitelystartTime and endTime are optional - if omitted, the downtime will be for the entire day(s) specified by startDate and endDaterequired | Array of objects (PutVehicleDowntimeEntry) | ||||||||||||||
Array
| |||||||||||||||
{- "downtimes": [
- {
- "downtimeId": "downtime-1",
- "vehicleId": "vehicle-1",
- "startDate": "2024-01-01",
- "endDate": "2024-01-02",
- "startTime": 120,
- "endTime": 180,
- "note": "Vehicle is being serviced for a discrete time period (02:00 on 1st January until 02:30 on 2nd January)"
}, - {
- "downtimeId": "downtime-2",
- "vehicleId": "vehicle-2",
- "startDate": "2024-01-03",
- "startTime": 360,
- "note": "Vehicle is being serviced starting at 06:00 on 3rd January, and the downtime is ongoing indefinitely"
}, - {
- "downtimeId": "downtime-3",
- "vehicleId": "vehicle-3",
- "startDate": "2024-01-04",
- "endDate": "2024-01-05",
- "note": "Vehicle is being serviced all day on the 4th and 5th January"
}
]
}{- "createDowntimeIds": [
- "item-123",
- "item-456",
- "item-789"
], - "modifiedDowntimeIds": [
- "item-123",
- "item-456",
- "item-789"
]
}API endpoints for managing custom attributes for vehicles - i.e. additional properties that can be set for vehicles - including querying and updating their historical values.
List custom attribute entries for vehicles, with filters. Although the GET /v1/vehicles API endpoint also returns custom attribute values for
each vehicle, it is more limited, as it only returns attribute values for the specified date. This API endpoint allows you to query the full history
of attribute values for vehicles, and see the date range in which those values applied.
Notes:
pagination property in the response to see the total number of pages and the current page number.type field is also queryable through this endpoint. These entries appear under attribute ID vehicleType.STRING will have value set to a stringNUMBER will have value set to a numberBOOLEAN will have value set to a booleanDATE will have value set to a date string formatted as YYYY-MM-ddSINGLE_SELECT will have value set to the value of one of the available select optionsMULTI_SELECT will have value set to an array of strings (each one being the value of one of the available select options)DURATION will have value set to a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59)"isMandatory": false may possibly have periods where the value is not set - in that case, the value will be omitted from the responsestartDate is mandatoryendDate is optional - if omitted, the entry value will be ongoing indefinitely into the future| vehicleIds | string
|
| attributeIds | string
|
| fromDate | string <date> (StringifyDate)
|
| toDate | string <date> (StringifyDate)
|
| page | integer <int32> (PageNumber)
|
{- "entries": [
- {
- "entryId": "entry-123",
- "vehicleId": "vehicle-1",
- "value": "red",
- "startDate": "2024-01-01",
- "endDate": "2024-01-02",
- "attributeId": "color"
}, - {
- "entryId": "entry-456",
- "vehicleId": "vehicle-1",
- "value": "green",
- "startDate": "2024-01-03",
- "attributeId": "color"
}
], - "pagination": {
- "currentPage": 1,
- "nextPage": 2,
- "totalPages": 2
}
}Creates or updates custom attribute entries for vehicles. Although the POST /v1/vehicles and PUT /v1/vehicles API endpoints also allow you to create and update custom attribute values,
they are more limited in that they only allow you to create and update custom attribute values as of the current date. This API endpoint allows you to manage the full history of
custom attribute values for vehicles.
Notes:
STRING expect a string to be set for value.NUMBER expect a number to be set for value.BOOLEAN expect a boolean to be set for value.DATE expect a date string formatted as YYYY-MM-dd to be set for value.SINGLE_SELECT expect the value of one of the available select options to be set for value.MULTI_SELECT expect an array of strings (each one being the value of one of the available select options) to be set for value.DURATION expect a duration string formatted as HH:mm (where HH is an integer between 0 and 999, and mm is an integer between 0 and 59) to be set for value."isMandatory": false allow the value to be 'unset' - simply omit the value field for that entry to unset it.entryId field:entryId is specified and an entry with that ID already exists, the existing entry will be updated.entryId is specified and an entry with that ID does not already exist, a new entry will be created with the specified ID.entryId is not specified, a new entry will be created with an automatically generated ID.2024-01-01, the next entry should start on 2024-01-02)value field for that date period.required | Array of objects (PutVehiclesCustomAttributesEntry) | ||||||||||||||
Array
| |||||||||||||||
{- "entries": [
- {
- "entryId": "entry-123",
- "vehicleId": "vehicle-1",
- "attributeId": "color",
- "value": "red",
- "startDate": "2024-01-01",
- "endDate": "2024-01-02"
}, - {
- "vehicleId": "vehicle-1",
- "attributeId": "color",
- "value": "green",
- "startDate": "2024-01-03"
}
]
}{- "createdEntryIds": [
- "item-123",
- "item-456",
- "item-789"
], - "modifiedEntryIds": [
- "item-123",
- "item-456",
- "item-789"
]
}A roster describes the daily operator runs grouped into packages of (repeating) weekly work assignments.
Returns the roster information by roster ID.
| rosterId required | string (UUID)
|
| operationalDay | string <date> (StringifyDate)
|
{- "stops": [
- {
- "shortDescription": "string",
- "long": 0.1,
- "lat": 0.1,
- "stopId": "string"
}
], - "assignmentsInfo": [
- {
- "taskId": "string",
- "assignmentType": "Task",
- "dayIndex": 0.1,
- "weekIndex": 0.1,
- "lineId": "string"
}
], - "lineInfo": [
- {
- "order": 0.1,
- "lineDisplayId": "string",
- "lineId": "string"
}
], - "events": [
- {
- "type": "standby",
- "id": "string",
- "eventJsonData": null,
- "endTime": 0,
- "startTime": 0
}
], - "blocks": [
- {
- "blockData": null,
- "summary": {
- "serviceId": "string",
- "timeplanId": "string",
- "scheduleDatasetId": "string",
- "rosterDatasetId": "string",
- "rosterSourceId": "string",
- "type": "string"
}, - "events": [
- "string"
], - "displayId": "string",
- "id": "string"
}
], - "tasks": [
- {
- "type": "Duty",
- "name": "string",
- "id": "string",
- "extraData": null,
- "paidTime": 0,
- "endTime": 0,
- "startTime": 0,
- "summary": {
- "scheduleName": "string",
- "scheduleLink": "string",
- "serviceName": "string",
- "serviceId": "string",
- "timeplanId": "string",
- "scheduleDatasetId": "string",
- "rosterDatasetId": "string",
- "rosterSourceId": "string",
- "splits": [
- {
- "endTime": 0,
- "startTime": 0
}
], - "blockTypes": [
- "string"
], - "blocks": [
- "string"
], - "routes": [
- "string"
], - "paidTime": 0,
- "destinationDepot": "string",
- "destinationStop": "string",
- "originDepot": "string",
- "originStop": "string",
- "spreadTime": 0,
- "workTime": 0,
- "type": "string",
- "endTime": 0,
- "startTime": 0,
- "property1": null,
- "property2": null
}, - "events": [
- "string"
], - "displayId": "string"
}
], - "rosterDataInfo": {
- "importMode": "roster",
- "depotId": "string",
- "createdBy": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "rotating": "Static",
- "daysInWeek": 0,
- "numberOfWeeks": 0,
- "startDay": 1,
- "importName": "string",
- "importId": "string",
- "group": "string",
- "rosterDatasetId": "string",
- "rosterSourceId": "string",
- "id": "string"
}
}WARNING: This is deprecated - you should use /v2/operational-plan described below. This API will not be supported beyond 2024-06-30. Returns the daily operational plans for a specified date range and a specific depot.
Spare Types Support: When the spare types feature flag is enabled, spare tasks will include additional properties:
spareType: The spare type code (e.g., "SPARE1", "SPARE2")displayId: Will show the configured spare type name instead of the original display IDdutyType: Will be set to "spare" for spare tasksstartTime and endTime: Will be included in the task summary for spare tasks based on the relevant spare type preference configuration| depotId required | string
|
| from required | string <date> (StringifyDate)
|
| to required | string <date> (StringifyDate)
|
| driversIds | string
|
| vehicleIds | string
|
| includeStops | string
|
| assignedOnly | string
|
| includeUnassigned | string
|
| fetchPlannedAssignmentsProperties | boolean
|
| taskDisplayIds | string Example: taskDisplayIds=T100,T200,T300
|
{- "vehicles": [
- {
- "videoSurveillance": true,
- "passengerCounting": true,
- "bicycles": true,
- "consumptionMeter": true,
- "externalSound": true,
- "internalSound": true,
- "sideDisplay": true,
- "rearDisplay": true,
- "frontDisplay": true,
- "onboardMonitor": true,
- "staticInformation": true,
- "kneeling": true,
- "foldingSystem": true,
- "ramp": true,
- "loweredFloor": true,
- "corridor": true,
- "wheelchair": true,
- "climatization": true,
- "ecological": true,
- "newSeminew": true,
- "emission": 0,
- "propulsion": 0,
- "vclass": 0,
- "typology": 0,
- "registrationDate": "2019-08-24",
- "startDate": "2019-08-24",
- "availableStanding": 0,
- "availableSeats": 0,
- "owner": "string",
- "make": "string",
- "archivedOn": "2019-08-24",
- "archived": true,
- "capacity": 0,
- "branding": "string",
- "model": "string",
- "nextDowntime": 0.1,
- "type": "string",
- "mileage": 0.1,
- "description": "string",
- "opUnitId": "string",
- "depot": "string",
- "parkingLocation": "string",
- "licensePlate": "string",
- "id": "string"
}
], - "drivers": [
- {
- "id": "string",
- "archived": true,
- "firstName": "string",
- "lastName": "string",
- "middleName": "string",
- "uuid": "string"
}
], - "assignments": [
- {
- "properties": [
- {
- "taskId": "string",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "disabled": true,
- "cancellationReason": {
- "reasonCode": "string",
- "reason": "string"
}, - "opUnitUuid": "string",
- "assignmentType": "driverAssignment"
}
], - "plannedAssignments": [
- {
- "assignments": [
- "string"
], - "driver": "string"
}
], - "vehicleAssignments": [
- {
- "assignments": [
- "string"
], - "vehicle": "string"
}
], - "driverAssignments": [
- {
- "assignments": [
- "string"
], - "driver": "string"
}
], - "date": "2019-08-24"
}
], - "blocks": [
- {
- "disabled": true,
- "srcBlockId": "string",
- "data": null,
- "summary": {
- "type": "string",
- "property1": null,
- "property2": null
}, - "events": [
- {
- "originRosterId": "string",
- "deleted": true,
- "originalDutyId": "string",
- "dutyId": "string",
- "eventId": "string"
}
], - "type": "block",
- "description": "string",
- "displayId": "string",
- "id": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}
}
], - "tasks": [
- {
- "id": "string",
- "description": "string",
- "type": "duty",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "displayId": "string",
- "srcTaskId": "string",
- "data": null,
- "rosterDatasetId": "string",
- "scheduleId": "string",
- "copiedTaskId": "string",
- "spareType": "string",
- "summary": {
- "destinationStop": "string",
- "destinationDepot": "string",
- "originStop": "string",
- "originDepot": "string",
- "startTime": 0,
- "serviceName": "string",
- "serviceId": "string",
- "timePlanId": "string",
- "scheduleDatasetId": "string",
- "routes": [
- "string"
], - "rosterSourceId": "string",
- "rosterDatasetId": "string",
- "endTime": 0,
- "originDepotId": "string",
- "originStopId": "string",
- "destinationDepotId": "string",
- "destinationStopId": "string",
- "originDepotName": "string",
- "originStopName": "string",
- "destinationDepotName": "string",
- "destinationStopName": "string",
- "originDepotLabel": "string",
- "originStopLabel": "string",
- "destinationDepotLabel": "string",
- "destinationStopLabel": "string"
}, - "dutyType": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}, - "events": [
- {
- "eventType": "deadhead",
- "eventId": "string",
- "eventJsonData": {
- "subType": "deadhead",
- "depotId": "string",
- "distance": 0.1,
- "generated": true,
- "generatedUsingGenerator": true,
- "properties": {
- "property1": null,
- "property2": null
}, - "vehicleId": "string",
- "dutyId": "string",
- "passengers": [
- {
- "publicTravelId": "string",
- "dutyId": "string"
}
], - "carId": "string",
- "stops": [
- {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}
], - "destination": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "origin": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "signPost": "string",
- "id": "string",
- "subTripIndex": 0.1,
- "isLastSubTrip": true,
- "isFirstSubTrip": true,
- "parentSubTrips": [
- "string"
], - "parentProperties": {
- "property1": null,
- "property2": null
}, - "parentTripId": "string",
- "parentEventId": "string",
- "blockId": "string"
}, - "endTime": 0,
- "startTime": 0,
- "splitTripReference": "string",
- "custom": true,
- "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "driverNoteText": "string",
- "noteText": "string",
- "disabled": true,
- "type": "standby",
- "id": "string"
}
]
}
]
}WARNING: This is deprecated - you should use /v2/operational-plan described below. This API will not be supported beyond 2024-06-30. Returns the daily operational plans for a specified date range for every depot.
Spare Types Support: When the spare types feature flag is enabled, spare tasks will include additional properties:
spareType: The spare type code (e.g., "SPARE1", "SPARE2")displayId: Will show the configured spare type name instead of the original display IDdutyType: Will be set to "spare" for spare tasksstartTime and endTime: Will be included in the task summary for spare tasks based on the relevant spare type preference configuration| from required | string <date> (StringifyDate)
|
| to required | string <date> (StringifyDate)
|
| taskDisplayIds | string Example: taskDisplayIds=T100,T200,T300
|
{- "depots": {
- "property1": {
- "vehicles": [
- {
- "videoSurveillance": true,
- "passengerCounting": true,
- "bicycles": true,
- "consumptionMeter": true,
- "externalSound": true,
- "internalSound": true,
- "sideDisplay": true,
- "rearDisplay": true,
- "frontDisplay": true,
- "onboardMonitor": true,
- "staticInformation": true,
- "kneeling": true,
- "foldingSystem": true,
- "ramp": true,
- "loweredFloor": true,
- "corridor": true,
- "wheelchair": true,
- "climatization": true,
- "ecological": true,
- "newSeminew": true,
- "emission": 0,
- "propulsion": 0,
- "vclass": 0,
- "typology": 0,
- "registrationDate": "2019-08-24",
- "startDate": "2019-08-24",
- "availableStanding": 0,
- "availableSeats": 0,
- "owner": "string",
- "make": "string",
- "archivedOn": "2019-08-24",
- "archived": true,
- "capacity": 0,
- "branding": "string",
- "model": "string",
- "nextDowntime": 0.1,
- "type": "string",
- "mileage": 0.1,
- "description": "string",
- "opUnitId": "string",
- "depot": "string",
- "parkingLocation": "string",
- "licensePlate": "string",
- "id": "string"
}
], - "drivers": [
- {
- "id": "string",
- "archived": true,
- "firstName": "string",
- "lastName": "string",
- "middleName": "string",
- "uuid": "string"
}
], - "assignments": [
- {
- "properties": [
- {
- "taskId": "string",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "disabled": true,
- "cancellationReason": {
- "reasonCode": "string",
- "reason": "string"
}, - "opUnitUuid": "string",
- "assignmentType": "driverAssignment"
}
], - "plannedAssignments": [
- {
- "assignments": [
- "string"
], - "driver": "string"
}
], - "vehicleAssignments": [
- {
- "assignments": [
- "string"
], - "vehicle": "string"
}
], - "driverAssignments": [
- {
- "assignments": [
- "string"
], - "driver": "string"
}
], - "date": "2019-08-24"
}
], - "blocks": [
- {
- "disabled": true,
- "srcBlockId": "string",
- "data": null,
- "summary": {
- "type": "string",
- "property1": null,
- "property2": null
}, - "events": [
- {
- "originRosterId": "string",
- "deleted": true,
- "originalDutyId": "string",
- "dutyId": "string",
- "eventId": "string"
}
], - "type": "block",
- "description": "string",
- "displayId": "string",
- "id": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}
}
], - "tasks": [
- {
- "id": "string",
- "description": "string",
- "type": "duty",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "displayId": "string",
- "srcTaskId": "string",
- "data": null,
- "rosterDatasetId": "string",
- "scheduleId": "string",
- "copiedTaskId": "string",
- "spareType": "string",
- "summary": {
- "destinationStop": "string",
- "destinationDepot": "string",
- "originStop": "string",
- "originDepot": "string",
- "startTime": 0,
- "serviceName": "string",
- "serviceId": "string",
- "timePlanId": "string",
- "scheduleDatasetId": "string",
- "routes": [
- "string"
], - "rosterSourceId": "string",
- "rosterDatasetId": "string",
- "endTime": 0,
- "originDepotId": "string",
- "originStopId": "string",
- "destinationDepotId": "string",
- "destinationStopId": "string",
- "originDepotName": "string",
- "originStopName": "string",
- "destinationDepotName": "string",
- "destinationStopName": "string",
- "originDepotLabel": "string",
- "originStopLabel": "string",
- "destinationDepotLabel": "string",
- "destinationStopLabel": "string"
}, - "dutyType": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}, - "events": [
- {
- "eventType": "deadhead",
- "eventId": "string",
- "eventJsonData": {
- "subType": "deadhead",
- "depotId": "string",
- "distance": 0.1,
- "generated": true,
- "generatedUsingGenerator": true,
- "properties": {
- "property1": null,
- "property2": null
}, - "vehicleId": "string",
- "dutyId": "string",
- "passengers": [
- {
- "publicTravelId": null,
- "dutyId": null
}
], - "carId": "string",
- "stops": [
- {
- "time": null,
- "isTimePoint": null,
- "id": null,
- "lat": null,
- "long": null,
- "isCustom": null
}
], - "destination": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "origin": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "signPost": "string",
- "id": "string",
- "subTripIndex": 0.1,
- "isLastSubTrip": true,
- "isFirstSubTrip": true,
- "parentSubTrips": [
- "string"
], - "parentProperties": {
- "property1": null,
- "property2": null
}, - "parentTripId": "string",
- "parentEventId": "string",
- "blockId": "string"
}, - "endTime": 0,
- "startTime": 0,
- "splitTripReference": "string",
- "custom": true,
- "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "driverNoteText": "string",
- "noteText": "string",
- "disabled": true,
- "type": "standby",
- "id": "string"
}
]
}
]
}, - "property2": {
- "vehicles": [
- {
- "videoSurveillance": true,
- "passengerCounting": true,
- "bicycles": true,
- "consumptionMeter": true,
- "externalSound": true,
- "internalSound": true,
- "sideDisplay": true,
- "rearDisplay": true,
- "frontDisplay": true,
- "onboardMonitor": true,
- "staticInformation": true,
- "kneeling": true,
- "foldingSystem": true,
- "ramp": true,
- "loweredFloor": true,
- "corridor": true,
- "wheelchair": true,
- "climatization": true,
- "ecological": true,
- "newSeminew": true,
- "emission": 0,
- "propulsion": 0,
- "vclass": 0,
- "typology": 0,
- "registrationDate": "2019-08-24",
- "startDate": "2019-08-24",
- "availableStanding": 0,
- "availableSeats": 0,
- "owner": "string",
- "make": "string",
- "archivedOn": "2019-08-24",
- "archived": true,
- "capacity": 0,
- "branding": "string",
- "model": "string",
- "nextDowntime": 0.1,
- "type": "string",
- "mileage": 0.1,
- "description": "string",
- "opUnitId": "string",
- "depot": "string",
- "parkingLocation": "string",
- "licensePlate": "string",
- "id": "string"
}
], - "drivers": [
- {
- "id": "string",
- "archived": true,
- "firstName": "string",
- "lastName": "string",
- "middleName": "string",
- "uuid": "string"
}
], - "assignments": [
- {
- "properties": [
- {
- "taskId": "string",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "disabled": true,
- "cancellationReason": {
- "reasonCode": "string",
- "reason": "string"
}, - "opUnitUuid": "string",
- "assignmentType": "driverAssignment"
}
], - "plannedAssignments": [
- {
- "assignments": [
- "string"
], - "driver": "string"
}
], - "vehicleAssignments": [
- {
- "assignments": [
- "string"
], - "vehicle": "string"
}
], - "driverAssignments": [
- {
- "assignments": [
- "string"
], - "driver": "string"
}
], - "date": "2019-08-24"
}
], - "blocks": [
- {
- "disabled": true,
- "srcBlockId": "string",
- "data": null,
- "summary": {
- "type": "string",
- "property1": null,
- "property2": null
}, - "events": [
- {
- "originRosterId": "string",
- "deleted": true,
- "originalDutyId": "string",
- "dutyId": "string",
- "eventId": "string"
}
], - "type": "block",
- "description": "string",
- "displayId": "string",
- "id": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}
}
], - "tasks": [
- {
- "id": "string",
- "description": "string",
- "type": "duty",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "displayId": "string",
- "srcTaskId": "string",
- "data": null,
- "rosterDatasetId": "string",
- "scheduleId": "string",
- "copiedTaskId": "string",
- "spareType": "string",
- "summary": {
- "destinationStop": "string",
- "destinationDepot": "string",
- "originStop": "string",
- "originDepot": "string",
- "startTime": 0,
- "serviceName": "string",
- "serviceId": "string",
- "timePlanId": "string",
- "scheduleDatasetId": "string",
- "routes": [
- "string"
], - "rosterSourceId": "string",
- "rosterDatasetId": "string",
- "endTime": 0,
- "originDepotId": "string",
- "originStopId": "string",
- "destinationDepotId": "string",
- "destinationStopId": "string",
- "originDepotName": "string",
- "originStopName": "string",
- "destinationDepotName": "string",
- "destinationStopName": "string",
- "originDepotLabel": "string",
- "originStopLabel": "string",
- "destinationDepotLabel": "string",
- "destinationStopLabel": "string"
}, - "dutyType": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}, - "events": [
- {
- "eventType": "deadhead",
- "eventId": "string",
- "eventJsonData": {
- "subType": "deadhead",
- "depotId": "string",
- "distance": 0.1,
- "generated": true,
- "generatedUsingGenerator": true,
- "properties": {
- "property1": null,
- "property2": null
}, - "vehicleId": "string",
- "dutyId": "string",
- "passengers": [
- {
- "publicTravelId": null,
- "dutyId": null
}
], - "carId": "string",
- "stops": [
- {
- "time": null,
- "isTimePoint": null,
- "id": null,
- "lat": null,
- "long": null,
- "isCustom": null
}
], - "destination": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "origin": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "signPost": "string",
- "id": "string",
- "subTripIndex": 0.1,
- "isLastSubTrip": true,
- "isFirstSubTrip": true,
- "parentSubTrips": [
- "string"
], - "parentProperties": {
- "property1": null,
- "property2": null
}, - "parentTripId": "string",
- "parentEventId": "string",
- "blockId": "string"
}, - "endTime": 0,
- "startTime": 0,
- "splitTripReference": "string",
- "custom": true,
- "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "driverNoteText": "string",
- "noteText": "string",
- "disabled": true,
- "type": "standby",
- "id": "string"
}
]
}
]
}
}
}Returns the daily operational plans for a specified date range. This endpoint provides comprehensive operational data including tasks, assignments, blocks, drivers, and vehicles.
Spare Types Support: When the spare types feature flag is enabled, spare tasks will include additional properties:
spareType: The spare type code (e.g., "SPARE1", "SPARE2")displayId: Will show the configured spare type name instead of the original display IDdutyType: Will be set to "spare" for spare tasksstartTime and endTime: Will be included in the task summary for spare tasks based on the relevant spare type preference configuration| fromDate required | string <date> (StringifyDate)
|
| toDate required | string <date> (StringifyDate)
|
| depotUuids | string Example: depotUuids=72999313-c6d3-44a3-9e64-a8cbce779ed7,e09cc074-b949-4d39-97b5-d2fa5eb1cdc5
|
| driverUuids | string
|
| includeStops | string
|
| includeUnassigned | string
|
| fetchPlannedAssignmentsProperties | boolean
|
| taskDisplayIds | string Example: taskDisplayIds=T100,T200,T300
|
[- {
- "depotName": "(ED) Example Depot",
- "depotUuid": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "opUnits": [
- {
- "uuid": "e23c5e7f-4f24-45ad-8c06-7ea514ab3422",
- "name": "Example Unit",
- "code": "EXU"
}
], - "assignments": [
- {
- "date": "2024-01-18",
- "vehicleAssignments": [
- {
- "assignments": [
- "0730b92a-082e-444c-9642-c5b92ead4d99"
]
}
], - "driverAssignments": [
- {
- "driver": "19380",
- "assignments": [
- "ff7a0520-c35d-49bd-8d55-cbf640ab2b27"
]
}
], - "plannedAssignments": [
- {
- "driver": "19380",
- "assignments": [
- "ff7a0520-c35d-49bd-8d55-cbf640ab2b27"
]
}
], - "properties": [
- {
- "taskId": "ff7a0520-c35d-49bd-8d55-cbf640ab2b27",
- "labels": [
- {
- "name": "DirectExchange",
- "code": "DX"
}
], - "opUnitUuid": "e23c5e7f-4f24-45ad-8c06-7ea514ab3422",
- "attributes": {
- "distance": 123
}, - "assignmentType": "driverAssignment",
- "lastAssignedDriverId": "19380"
}, - {
- "taskId": "ff7a0520-c35d-49bd-8d55-cbf640ab2b27",
- "opUnitUuid": "e23c5e7f-4f24-45ad-8c06-7ea514ab3422",
- "assignmentType": "plannedAssignment",
- "lastAssignedDriverId": null
}
]
}
], - "blocks": [
- {
- "id": "0730b92a-082e-444c-9642-c5b92ead4d99",
- "displayId": "22606",
- "type": "block",
- "summary": {
- "type": "Double Decker",
- "serviceId": "elZ0TTBBclJhZWs9",
- "rosterSourceId": "qF0tdEWiB",
- "rosterDatasetId": "Fme9uj8Xo",
- "scheduleDatasetId": "JuEsdCizGj"
}, - "events": [
- {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "f09ae7f6-18b5-48d4-af80-ee72fe493ce9",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "c3903f31-5e8b-4476-b110-2729a280f6ee",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "55777353-328a-4ca1-a2d9-5fe37e1af0ba",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "8a5cae94-47c6-49ac-88b0-64d5c46cbf52",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "51b21adb-ff5d-4208-b733-d9329442a82e",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "bababc2a-cdec-4bb4-bdde-90e01f57995e",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "28d4ed4c-95a4-4e08-831a-8be5ead1e85e",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "c3f98114-84c2-4112-833f-196f5f1d28bd",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "86650e7e-c036-4fd1-b8e8-ff3e69ad2d15",
- "eventId": "6e9ec26f-4b1e-4f5b-bbee-c328b8f0e24b",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "b43ed3c4-1d29-4295-8883-b68bea736363",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "ecce2515-2f02-42dc-97d4-1b1d084c6fdc",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "71f87166-48b3-4c9e-8ca4-8fdb7c1a31f1",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "ecf600e2-b21d-498a-9ebf-c7d41bd33bde",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "c705dae3-6f18-42aa-ad31-a65977af6de9",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "7a58057f-89a7-4c89-8430-7af17f9f3ff5",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "3c2cda08-7f74-48ab-a01d-755981683686",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "44d4a7c4-da3b-4269-bc79-38dc493e2628",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "630e542b-3725-497f-8527-ebba6f7184b4",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "409a62bb-ebe4-4a10-8eb3-4125acec2380",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "ef33c7c5-082b-4899-a4f2-353fca477255",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "7ee6694a-ac6a-4630-b21a-71ff030014d3",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "b132ef5a-c4d4-46ba-b1d3-57b4d0f6c5ce",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "42a1c8d6-54aa-4d3c-a062-2dd878aaac6e",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "a03e3a04-e70c-425d-b389-388234390907",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "c2410c65-7a0b-4ebe-b78f-8c42e874f451",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "402952a9-3645-49de-872b-59836ef80e80",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "2ee73657-a34f-426e-973d-fcba16f9ddb0",
- "eventId": "2fa57646-c5a7-4244-b749-807f5ba8082e",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "200cb944-d0ae-4a0a-856c-4b5ea8e363d4",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "7e16656c-e365-49e2-8ae8-177f5453798a",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "a9ffa0b7-4ddd-42c4-b9f0-612c0524114f",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "2012cd2e-74c1-445f-ad5a-feeee3943afe",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "56a3d8cb-f446-4da7-aded-32e8635c19a7",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "0d3a05e8-624c-4459-9286-347007fd1e3c",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "24a9d01b-8226-4f96-ab85-34cac9b86585",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "c687db43-580c-4f2b-aca8-f88b76e0c821",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "6ffad840-7597-4620-9f80-089790ec3649",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "2eec623a-1cd5-4a68-8f6c-cea9e00e5fae",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "ea6f68af-f80b-4d40-ab7b-a4fb5f910277",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "3d59860c-a55f-48d2-aace-f8ff0164f74e",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "9c60c6c2-b886-4a98-8bfd-652e95cd3850",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "865052ce-a151-470b-b1cf-e03c20157341",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "f17a09a2-5800-42c1-a7f4-015a81fa207d",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "54a23955-1fa9-480d-8026-984f6d5680ff",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "f2655562-02b8-42d4-a24d-bf171c2cbf6b",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}, - {
- "dutyId": "bc996392-974e-4e24-9b6a-237f6529de2e",
- "eventId": "05f1caf2-7564-42a0-baaf-375773680fa5",
- "originRosterId": "6a461756-8918-4043-9e9a-efb3ac3f691d"
}
], - "disabled": false,
- "optibusIds": {
- "optibusRosterId": "qF0tdEWiB",
- "optibusRosterDatasetId": "Fme9uj8Xo",
- "optibusScheduleId": "JuEsdCizGj",
- "optibusTimeplanId": "XNchdCce-Cy/8297"
}, - "wasModifiedInOperations": false,
- "source": "scheduling"
}
], - "tasks": [
- {
- "displayId": "1004",
- "summary": {
- "routes": [
- "201"
], - "startTime": 291,
- "endTime": 811,
- "rosterSourceId": "qF0tdEWiB",
- "rosterDatasetId": "Fme9uj8Xo",
- "scheduleDatasetId": "JuEsdCizGj",
- "serviceId": "elZ0TTBBclJhZWs9",
- "serviceName": "Mon-Fri",
- "originDepotId": "BT",
- "originDepotLabel": "(ED) Example Depot",
- "originDepotName": "Example Depot",
- "originStopId": "BT",
- "originStopLabel": "(ED) Example Depot",
- "originStopName": "Example Depot",
- "destinationStopId": "615068",
- "destinationStopLabel": "(615068) Blantyre Ind Est E",
- "destinationStopName": "Blantyre Ind Est E"
}, - "events": [
- {
- "endTime": 296,
- "eventType": "sign_on",
- "startTime": 291,
- "id": "3056bc22",
- "dutyId": "1004",
- "origin": {
- "id": "BT",
- "time": "04:51:00"
}, - "destination": {
- "id": "BT",
- "time": "04:56:00"
}, - "uuid": "3c21ad6c-f095-41a4-acf3-76497e110c0a"
}, - {
- "endTime": 301,
- "eventType": "pre_trip",
- "startTime": 296,
- "id": "-f9b8089",
- "dutyId": "1004",
- "origin": {
- "id": "BT",
- "time": "04:56:00"
}, - "vehicleId": "20106",
- "destination": {
- "id": "BT",
- "time": "05:01:00"
}, - "blockId": "20106",
- "uuid": "9ab737ba-5c48-4447-b763-358c8f0fefb9"
}, - {
- "endTime": 326,
- "eventType": "deadhead",
- "startTime": 301,
- "id": "62cb2714",
- "dutyId": "1004",
- "origin": {
- "id": "BT",
- "time": "05:01:00"
}, - "depotId": "BT",
- "subType": "depot_pull_out",
- "distance": 0,
- "generated": false,
- "vehicleId": "20106",
- "destination": {
- "id": "6160946",
- "time": "05:26:00"
}, - "blockId": "20106",
- "uuid": "6cb71fe8-a288-4fe7-8931-43a4ef748e95"
}, - {
- "endTime": 339,
- "eventType": "service_trip",
- "startTime": 326,
- "id": "343_1",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "6160946",
- "time": "05:26:00",
- "isTimePoint": true
}, - "pattern": "B",
- "distance": 2.7119999999999997,
- "parentId": "343",
- "parentSubTrips": [
- "343_1",
- "343_2",
- "343_3",
- "343_4"
], - "direction": 2,
- "vehicleId": "20106",
- "destination": {
- "id": "6160744",
- "time": "05:39:00",
- "isTimePoint": true
}, - "subTripIndex": 1,
- "directionName": "INBOUND",
- "parentEventId": "99c50f06-899a-415b-a06f-f063e3992fc4",
- "optibusRouteId": "FGAO201-2-B_1",
- "blockId": "20106",
- "uuid": "6ea5b810-eda6-4cfd-8bb5-c919175067e4"
}, - {
- "endTime": 378,
- "eventType": "service_trip",
- "startTime": 340,
- "id": "343_2",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "6160744",
- "time": "05:40:00",
- "isTimePoint": true
}, - "pattern": "B",
- "distance": 10.866,
- "parentId": "343",
- "parentSubTrips": [
- "343_1",
- "343_2",
- "343_3",
- "343_4"
], - "direction": 2,
- "vehicleId": "20106",
- "destination": {
- "id": "61501662",
- "time": "06:18:00",
- "isTimePoint": true
}, - "subTripIndex": 2,
- "directionName": "INBOUND",
- "parentEventId": "99c50f06-899a-415b-a06f-f063e3992fc4",
- "optibusRouteId": "FGAO201-2-B_2",
- "blockId": "20106",
- "uuid": "0ef122f3-7013-48bc-8ca7-252c755a2401"
}, - {
- "endTime": 389,
- "eventType": "service_trip",
- "startTime": 381,
- "id": "343_3",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "61501662",
- "time": "06:21:00",
- "isTimePoint": true
}, - "pattern": "B",
- "distance": 2.009,
- "parentId": "343",
- "parentSubTrips": [
- "343_1",
- "343_2",
- "343_3",
- "343_4"
], - "direction": 2,
- "vehicleId": "20106",
- "destination": {
- "id": "615069",
- "time": "06:29:00",
- "isTimePoint": true
}, - "subTripIndex": 3,
- "directionName": "INBOUND",
- "parentEventId": "99c50f06-899a-415b-a06f-f063e3992fc4",
- "optibusRouteId": "FGAO201-2-B_3",
- "blockId": "20106",
- "uuid": "f2dfea4c-02a8-4112-9934-13212d203df4"
}, - {
- "endTime": 422,
- "eventType": "service_trip",
- "startTime": 389,
- "id": "343_4",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "615069",
- "time": "06:29:00",
- "isTimePoint": true
}, - "pattern": "B",
- "distance": 9.21,
- "parentId": "343",
- "parentSubTrips": [
- "343_1",
- "343_2",
- "343_3",
- "343_4"
], - "direction": 2,
- "vehicleId": "20106",
- "destination": {
- "id": "6150892",
- "time": "07:02:00",
- "isTimePoint": true
}, - "subTripIndex": 4,
- "directionName": "INBOUND",
- "parentEventId": "99c50f06-899a-415b-a06f-f063e3992fc4",
- "optibusRouteId": "FGAO201-2-B_4",
- "blockId": "20106",
- "uuid": "63757824-e263-4b98-a3b7-78b68e5e7f28"
}, - {
- "endTime": 471,
- "eventType": "service_trip",
- "startTime": 434,
- "id": "344_1",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "6150892",
- "time": "07:14:00",
- "isTimePoint": true
}, - "pattern": "A",
- "distance": 8.921999999999999,
- "parentId": "344",
- "parentSubTrips": [
- "344_1",
- "344_2"
], - "direction": 1,
- "vehicleId": "20106",
- "destination": {
- "id": "615068",
- "time": "07:51:00",
- "isTimePoint": true
}, - "subTripIndex": 1,
- "directionName": "OUTBOUND",
- "parentEventId": "5256e566-835d-4712-b281-cc38b55ee597",
- "optibusRouteId": "FGAO201-1-A_1",
- "blockId": "20106",
- "uuid": "fe8f6362-b7c4-4f89-a0a3-21fd6aa11ec0"
}, - {
- "endTime": 481,
- "eventType": "taxi",
- "startTime": 471,
- "id": "-1dd80462",
- "origin": {
- "id": "615068",
- "time": "07:51:00"
}, - "distance": 0.1,
- "passengers": [
- "1004"
], - "destination": {
- "id": "BT",
- "time": "08:01:00"
}, - "isReliefCar": true,
- "uuid": "ae506819-69d6-4bbb-82e9-53de004b658c"
}, - {
- "endTime": 521,
- "eventType": "break",
- "startTime": 481,
- "breakId": "Meal Break Depot",
- "event_id": "1da93417-f146-47f6-becd-f4158a0834f4",
- "paidTime": 40,
- "extraTime": 0,
- "uuid": "1da93417-f146-47f6-becd-f4158a0834f4"
}, - {
- "endTime": 531,
- "eventType": "taxi",
- "startTime": 521,
- "id": "-6b76d95d",
- "origin": {
- "id": "BT",
- "time": "08:41:00"
}, - "distance": 0.1,
- "passengers": [
- "1004"
], - "destination": {
- "id": "615068",
- "time": "08:51:00"
}, - "isReliefCar": true,
- "uuid": "4bc9499d-8b13-4957-99bd-20485694945b"
}, - {
- "endTime": 532,
- "eventType": "attendance",
- "startTime": 531,
- "id": "-5ed6cb27",
- "dutyId": "1004",
- "origin": {
- "id": "615068",
- "time": "08:51:00"
}, - "vehicleId": "20112",
- "destination": {
- "id": "615068",
- "time": "08:52:00"
}, - "blockId": "20112",
- "uuid": "55db950d-409e-410e-939c-ef0a85bb9db5"
}, - {
- "endTime": 620,
- "eventType": "service_trip",
- "startTime": 532,
- "id": "383_2",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "615068",
- "time": "08:52:00",
- "isTimePoint": true
}, - "pattern": "A",
- "distance": 17.408,
- "parentId": "383",
- "parentSubTrips": [
- "383_1",
- "383_2"
], - "direction": 1,
- "vehicleId": "20112",
- "destination": {
- "id": "61601733",
- "time": "10:20:00",
- "isTimePoint": true
}, - "subTripIndex": 2,
- "directionName": "OUTBOUND",
- "parentEventId": "ec2b948d-5ba3-4934-bfed-04f9cdab53b4",
- "optibusRouteId": "FGAO201-1-A_2",
- "blockId": "20112",
- "uuid": "9e73b946-d260-4c04-810e-6acdee580873"
}, - {
- "endTime": 663,
- "eventType": "service_trip",
- "startTime": 634,
- "id": "384_1",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "61601733",
- "time": "10:34:00",
- "isTimePoint": true
}, - "pattern": "-",
- "distance": 5.387999999999999,
- "parentId": "384",
- "parentSubTrips": [
- "384_1",
- "384_2",
- "384_3",
- "384_4"
], - "direction": 2,
- "vehicleId": "20112",
- "destination": {
- "id": "6160744",
- "time": "11:03:00",
- "isTimePoint": true
}, - "subTripIndex": 1,
- "directionName": "INBOUND",
- "parentEventId": "d487a149-afe7-4aa8-ad41-f26676f10175",
- "optibusRouteId": "FGAO201-2--_1",
- "blockId": "20112",
- "uuid": "00006cf7-486c-4d31-a5b6-120ee37b38b7"
}, - {
- "endTime": 712,
- "eventType": "service_trip",
- "startTime": 665,
- "id": "384_2",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "6160744",
- "time": "11:05:00",
- "isTimePoint": true
}, - "pattern": "-",
- "distance": 10.866,
- "parentId": "384",
- "parentSubTrips": [
- "384_1",
- "384_2",
- "384_3",
- "384_4"
], - "direction": 2,
- "vehicleId": "20112",
- "destination": {
- "id": "61501662",
- "time": "11:52:00",
- "isTimePoint": true
}, - "subTripIndex": 2,
- "directionName": "INBOUND",
- "parentEventId": "d487a149-afe7-4aa8-ad41-f26676f10175",
- "optibusRouteId": "FGAO201-2--_2",
- "blockId": "20112",
- "uuid": "f4e114f2-ab5f-4420-91a3-b932bed49e30"
}, - {
- "endTime": 725,
- "eventType": "service_trip",
- "startTime": 715,
- "id": "384_3",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "61501662",
- "time": "11:55:00",
- "isTimePoint": true
}, - "pattern": "-",
- "distance": 2.009,
- "parentId": "384",
- "parentSubTrips": [
- "384_1",
- "384_2",
- "384_3",
- "384_4"
], - "direction": 2,
- "vehicleId": "20112",
- "destination": {
- "id": "615069",
- "time": "12:05:00",
- "isTimePoint": true
}, - "subTripIndex": 3,
- "directionName": "INBOUND",
- "parentEventId": "d487a149-afe7-4aa8-ad41-f26676f10175",
- "optibusRouteId": "FGAO201-2--_3",
- "blockId": "20112",
- "uuid": "65ea83de-42f8-4b0d-b881-69d91c8500fc"
}, - {
- "endTime": 760,
- "eventType": "service_trip",
- "startTime": 726,
- "id": "384_4",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "615069",
- "time": "12:06:00",
- "isTimePoint": true
}, - "pattern": "-",
- "distance": 9.21,
- "parentId": "384",
- "parentSubTrips": [
- "384_1",
- "384_2",
- "384_3",
- "384_4"
], - "direction": 2,
- "vehicleId": "20112",
- "destination": {
- "id": "6150892",
- "time": "12:40:00",
- "isTimePoint": true
}, - "subTripIndex": 4,
- "directionName": "INBOUND",
- "parentEventId": "d487a149-afe7-4aa8-ad41-f26676f10175",
- "optibusRouteId": "FGAO201-2--_4",
- "blockId": "20112",
- "uuid": "1ce3d503-18df-4cbf-bb2c-3eb1db676cda"
}, - {
- "endTime": 811,
- "eventType": "service_trip",
- "startTime": 774,
- "id": "385_1",
- "sign": "201",
- "dutyId": "1004",
- "origin": {
- "id": "6150892",
- "time": "12:54:00",
- "isTimePoint": true
}, - "pattern": "A",
- "distance": 8.921999999999999,
- "parentId": "385",
- "parentSubTrips": [
- "385_1",
- "385_2"
], - "direction": 1,
- "vehicleId": "20112",
- "destination": {
- "id": "615068",
- "time": "13:31:00",
- "isTimePoint": true
}, - "subTripIndex": 1,
- "directionName": "OUTBOUND",
- "parentEventId": "84b11531-6e1e-4c65-80b6-e82fac41c74f",
- "optibusRouteId": "FGAO201-1-A_1",
- "blockId": "20112",
- "uuid": "9beb28f1-af1c-4fca-bec1-e655bf9599bf"
}
], - "dutyType": "Early",
- "optibusIds": {
- "optibusRosterId": "qF0tdEWiB",
- "optibusRosterDatasetId": "Fme9uj8Xo",
- "optibusScheduleId": "JuEsdCizGj",
- "optibusTimeplanId": "XNchdCce-Cy/8297"
}, - "wasModifiedInOperations": false,
- "source": "scheduling",
- "id": "ff7a0520-c35d-49bd-8d55-cbf640ab2b27",
- "type": "duty",
- "attributes": {
- "distance": 321
}
}
], - "vehicles": [
- {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "type": "A",
- "id": "010",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "type": "A",
- "id": "012590",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "type": "A",
- "id": "0600",
- "archived": false,
- "accessories": [
- "USB",
- "WiFi"
]
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "type": "A",
- "id": "1099",
- "archived": false,
- "doubledecker": false,
- "mileage": 3,
- "typology": 6
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "type": "A",
- "id": "13500",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "type": "A",
- "id": "200",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "type": "A",
- "id": "5500",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "129",
- "id": "A-001",
- "archived": false,
- "nextservice": "2024-01-31"
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "219",
- "id": "A-002",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "220",
- "id": "A-003",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "221",
- "id": "A-004",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "222",
- "id": "A-005",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "223",
- "id": "A-006",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "224",
- "id": "A-007",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "225",
- "id": "A-008",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "226",
- "id": "A-009",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "227",
- "id": "A-010",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "228",
- "id": "A-011",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "130",
- "id": "A-012",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "229",
- "id": "A-013",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "230",
- "id": "A-014",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz Conecto G",
- "licensePlate": "231",
- "id": "A-015",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "New Routemaster",
- "licensePlate": "135",
- "id": "DD-001",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "New Routemaster",
- "licensePlate": "136",
- "id": "DD-002",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "New Routemaster",
- "licensePlate": "137",
- "id": "DD-003",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "New Routemaster",
- "licensePlate": "138",
- "id": "DD-004",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "New Routemaster",
- "licensePlate": "139",
- "id": "DD-005",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "140",
- "id": "LF-001",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "141",
- "id": "LF-002",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "142",
- "id": "LF-003",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "143",
- "id": "LF-004",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "144",
- "id": "LF-005",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "145",
- "id": "LF-006",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "146",
- "id": "LF-007",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "147",
- "id": "LF-008",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "148",
- "id": "LF-009",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "149",
- "id": "LF-010",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "150",
- "id": "LF-011",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "151",
- "id": "LF-012",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "152",
- "id": "LF-013",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "153",
- "id": "LF-014",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "154",
- "id": "LF-015",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "155",
- "id": "LF-016",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "156",
- "id": "LF-017",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "157",
- "id": "LF-018",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "158",
- "id": "LF-019",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "123",
- "id": "LF-020",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "159",
- "id": "LF-021",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "160",
- "id": "LF-022",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "161",
- "id": "LF-023",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "162",
- "id": "LF-024",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "163",
- "id": "LF-025",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "164",
- "id": "LF-026",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "165",
- "id": "LF-027",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "166",
- "id": "LF-028",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "167",
- "id": "LF-029",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "168",
- "id": "LF-030",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "124",
- "id": "LF-031",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "169",
- "id": "LF-032",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "170",
- "id": "LF-033",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "171",
- "id": "LF-034",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "172",
- "id": "LF-035",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "173",
- "id": "LF-036",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "174",
- "id": "LF-037",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "175",
- "id": "LF-038",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "176",
- "id": "LF-039",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "177",
- "id": "LF-040",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "178",
- "id": "LF-041",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "125",
- "id": "LF-042",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "179",
- "id": "LF-043",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "180",
- "id": "LF-044",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "181",
- "id": "LF-045",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "182",
- "id": "LF-046",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "183",
- "id": "LF-047",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "184",
- "id": "LF-048",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "185",
- "id": "LF-049",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "186",
- "id": "LF-050",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "187",
- "id": "LF-051",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "188",
- "id": "LF-052",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "126",
- "id": "LF-053",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "189",
- "id": "LF-054",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "190",
- "id": "LF-055",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "191",
- "id": "LF-056",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "192",
- "id": "LF-057",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "193",
- "id": "LF-058",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "194",
- "id": "LF-059",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "195",
- "id": "LF-060",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "196",
- "id": "LF-061",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "197",
- "id": "LF-062",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "198",
- "id": "LF-063",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "127",
- "id": "LF-064",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "199",
- "id": "LF-065",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "200",
- "id": "LF-066",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "201",
- "id": "LF-067",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "202",
- "id": "LF-068",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "203",
- "id": "LF-069",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "204",
- "id": "LF-070",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "205",
- "id": "LF-071",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "206",
- "id": "LF-072",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "207",
- "id": "LF-073",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "208",
- "id": "LF-074",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "128",
- "id": "LF-075",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "209",
- "id": "LF-076",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "210",
- "id": "LF-077",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "211",
- "id": "LF-078",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "212",
- "id": "LF-079",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "213",
- "id": "LF-080",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "214",
- "id": "LF-081",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "215",
- "id": "LF-082",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "216",
- "id": "LF-083",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "217",
- "id": "LF-084",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "218",
- "id": "LF-085",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "232",
- "id": "SD-001",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "233",
- "id": "SD-002",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "234",
- "id": "SD-003",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "235",
- "id": "SD-004",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "236",
- "id": "SD-005",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "237",
- "id": "SD-006",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "238",
- "id": "SD-007",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "131",
- "id": "SD-008",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "239",
- "id": "SD-009",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "133",
- "id": "SD-010",
- "archived": false
}, - {
- "depot": "4ed91508-d43c-4267-958e-65dd61060d2c",
- "description": "some desc",
- "model": "Mercedes-Benz O530 Citaro G",
- "licensePlate": "134",
- "id": "SD-011",
- "archived": false
}
], - "drivers": [
- {
- "uuid": "19380",
- "id": "19380",
- "firstName": "Daniel",
- "lastName": "Doe",
- "middleName": "",
- "archived": false
}
]
}
]Returns the calendar planned assignments and tasks, with filters.
Spare Types Support: When the spare types feature flag is enabled, spare tasks will include additional properties:
spareType: The spare type code (e.g., "SPARE1", "SPARE2")displayId: Will show the configured spare type name instead of the original display IDdutyType: Will be set to "spare" for spare tasksstartTime and endTime: Will be included in the task summary for spare tasks based on the relevant spare type preference configuration| depotId required | string
|
| startDate required | string <date> (StringifyDate)
|
| endDate required | string <date> (StringifyDate)
|
| assignedOnly | boolean
|
| driverIds | Array of strings (UUID)
|
| fetchStops | boolean
|
{- "tasks": [
- {
- "id": "string",
- "description": "string",
- "type": "duty",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "displayId": "string",
- "srcTaskId": "string",
- "data": null,
- "rosterDatasetId": "string",
- "scheduleId": "string",
- "copiedTaskId": "string",
- "spareType": "string",
- "summary": {
- "destinationStop": "string",
- "destinationDepot": "string",
- "originStop": "string",
- "originDepot": "string",
- "startTime": 0,
- "serviceName": "string",
- "serviceId": "string",
- "timePlanId": "string",
- "scheduleDatasetId": "string",
- "routes": [
- "string"
], - "rosterSourceId": "string",
- "rosterDatasetId": "string",
- "endTime": 0
}, - "dutyType": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}, - "events": [
- {
- "eventType": "deadhead",
- "eventId": "string",
- "eventJsonData": {
- "subType": "deadhead",
- "depotId": "string",
- "distance": 0.1,
- "generated": true,
- "generatedUsingGenerator": true,
- "properties": {
- "property1": null,
- "property2": null
}, - "vehicleId": "string",
- "dutyId": "string",
- "passengers": [
- {
- "publicTravelId": "string",
- "dutyId": "string"
}
], - "carId": "string",
- "stops": [
- {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}
], - "destination": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "origin": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "signPost": "string",
- "id": "string",
- "subTripIndex": 0.1,
- "isLastSubTrip": true,
- "isFirstSubTrip": true,
- "parentSubTrips": [
- "string"
], - "parentProperties": {
- "property1": null,
- "property2": null
}, - "parentTripId": "string",
- "parentEventId": "string",
- "blockId": "string"
}, - "endTime": 0,
- "startTime": 0,
- "splitTripReference": "string",
- "custom": true,
- "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "driverNoteText": "string",
- "noteText": "string",
- "disabled": true,
- "type": "standby",
- "id": "string"
}
]
}
], - "calendarDailyPlannedInformation": [
- {
- "tasks": [
- {
- "opUnitUuid": "string",
- "cancellationReason": {
- "reasonCode": "string",
- "reason": "string"
}, - "disabled": true,
- "driverId": "string",
- "taskId": "string"
}
], - "date": "2019-08-24"
}
]
}Returns the calendar planned assignments and tasks, with filters.
| fromDate required | string <date> (StringifyDate)
|
| toDate required | string <date> (StringifyDate)
|
| driverIds | Array of strings (UUID)
|
[- {
- "labelName": "string",
- "labelCode": "string",
- "driverId": "string",
- "date": "2019-08-24"
}
]Returns the Daily and Weekly tasks for a specified date range, with filters. Responds with 302 redirect when payload is too big. OriginalDriverId refers to the driver that was assigned to the task in the plan page
Spare Types Support: When the spare types feature flag is enabled, spare tasks will include additional properties:
spareType: The spare type code (e.g., "SPARE1", "SPARE2")displayId: Will show the configured spare type name instead of the original display IDdutyType: Will be set to "spare" for spare tasksstartTime and endTime: Will be included in the task summary for spare tasks based on the relevant spare type preference configuration| depotId required | string (UUID)
|
| from required | string <date> (StringifyDate)
|
| to required | string <date> (StringifyDate)
|
| plan | Array of strings (UUID)
|
| group | Array of strings
|
| type | Array of strings (TaskType) Items Enum: "duty" "day_off" "standby" "spare" "custom"
|
| assignedOnly | boolean
|
| includeStops | boolean
|
| driversIds | Array of strings (UUID)
|
{- "calendarVehicleAssignments": [
- {
- "tasks": [
- {
- "originalVehicleId": "string",
- "vehicleId": "string",
- "blockId": "string"
}
], - "date": "2019-08-24"
}
], - "blocks": [
- {
- "disabled": true,
- "srcBlockId": "string",
- "data": null,
- "summary": {
- "type": "string",
- "property1": null,
- "property2": null
}, - "events": [
- {
- "originRosterId": "string",
- "deleted": true,
- "originalDutyId": "string",
- "dutyId": "string",
- "eventId": "string"
}
], - "type": "block",
- "description": "string",
- "displayId": "string",
- "id": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}
}
], - "tasks": [
- {
- "id": "string",
- "description": "string",
- "type": "duty",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "displayId": "string",
- "srcTaskId": "string",
- "data": null,
- "rosterDatasetId": "string",
- "scheduleId": "string",
- "copiedTaskId": "string",
- "spareType": "string",
- "summary": {
- "destinationStop": "string",
- "destinationDepot": "string",
- "originStop": "string",
- "originDepot": "string",
- "startTime": 0,
- "serviceName": "string",
- "serviceId": "string",
- "timePlanId": "string",
- "scheduleDatasetId": "string",
- "routes": [
- "string"
], - "rosterSourceId": "string",
- "rosterDatasetId": "string",
- "endTime": 0
}, - "dutyType": "string",
- "source": "scheduling",
- "wasModifiedInOperations": true,
- "optibusIds": {
- "optibusTimeplanId": "string",
- "optibusScheduleId": "string",
- "optibusRosterDatasetId": "string",
- "optibusRosterId": "string"
}, - "events": [
- {
- "eventType": "deadhead",
- "eventId": "string",
- "eventJsonData": {
- "subType": "deadhead",
- "depotId": "string",
- "distance": 0.1,
- "generated": true,
- "generatedUsingGenerator": true,
- "properties": {
- "property1": null,
- "property2": null
}, - "vehicleId": "string",
- "dutyId": "string",
- "passengers": [
- {
- "publicTravelId": "string",
- "dutyId": "string"
}
], - "carId": "string",
- "stops": [
- {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}
], - "destination": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "origin": {
- "time": "string",
- "isTimePoint": true,
- "id": "string",
- "lat": 0.1,
- "long": 0.1,
- "isCustom": true
}, - "signPost": "string",
- "id": "string",
- "subTripIndex": 0.1,
- "isLastSubTrip": true,
- "isFirstSubTrip": true,
- "parentSubTrips": [
- "string"
], - "parentProperties": {
- "property1": null,
- "property2": null
}, - "parentTripId": "string",
- "parentEventId": "string",
- "blockId": "string"
}, - "endTime": 0,
- "startTime": 0,
- "splitTripReference": "string",
- "custom": true,
- "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "driverNoteText": "string",
- "noteText": "string",
- "disabled": true,
- "type": "standby",
- "id": "string"
}
]
}
], - "DailyTasks": [
- {
- "tasks": [
- {
- "opUnitUuid": "string",
- "cancellationReason": {
- "reasonCode": "string",
- "reason": "string"
}, - "disabled": true,
- "driverId": "string",
- "taskId": "string",
- "lastAssignedDriverId": "string",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}, - "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "vehicleId": "string",
- "originalDriverId": "string"
}
], - "date": "2019-08-24"
}
], - "deployedPlans": [
- {
- "deployDateRange": {
- "to": "2019-08-24",
- "from": "2019-08-24"
}, - "group": "string",
- "rosterId": "string",
- "plan": "string"
}
], - "depotId": "string"
}API endpoints for fetching signing deviations for drivers - i.e. the difference between the actual and expected sign-on and sign-off times for a driver.
Calculate the signing deviations for the drivers in the given date range and region. 'Signing deviations' refer to the difference between the actual and expected sign-on and sign-off times for a driver. The expected times are calculated based on the driver's assigned work.
Deviation might be classified either early or late, calculated according to a defined threshold.
| from required | string <date> (StringifyDate) The start of the date range to get the signing deviations from |
| to required | string <date> (StringifyDate) The end of the date range to get the signing deviations from |
| regionUuid required | string (DepotId) The region to get the signing deviations from |
| driverIds | Array of strings (DriverId) The driver IDs for which to get the signing deviations. if empty all drivers will be returned |
{- "property1": {
- "property1": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
], - "property2": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
]
}, - "property2": {
- "property1": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
], - "property2": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
]
}
}Retrieves workEntities values for depots within a specified date range and for specified driver IDs or by depotId. There is a limit of 204k work-entities calculation per request to avoid timeouts. This limit enables, for example, a calculation of 100 drivers for 30 days with 100 daily work-entities defined. In case the limit is exceeded, a 413 error code will be returned, together with the allowed amount of drivers for the existing configuration.
| depotId | string (DepotId)
|
| driverIds | Array of strings (DriverUuid)
|
| startDate | string <date> (StringifyDate)
|
| endDate | string <date> (StringifyDate)
|
| exportAllEntities | boolean
|
| shouldUseCache | boolean
|
[- {
- "timeType": {
- "type": "day"
}, - "result": {
- "value": true,
- "type": "Boolean"
}, - "entityId": "string",
- "occurrenceDates": {
- "endDate": "2019-08-24",
- "startDate": "2019-08-24"
}, - "workingDriver": {
- "driverExternalId": "string",
- "driverUuid": "string"
}, - "depotId": "string"
}
]Fetches the maximum number of drivers allowed per API request of payroll or work-entities for the given dates for a particular client. To prevent timeouts, there is a cap of 204000 work-entity calculations per request. This cap allows, for instance, the calculation of 100 drivers over a 30-day period with 100 daily work-entities specified.
| startDate | string <date> (StringifyDate)
|
| endDate | string <date> (StringifyDate)
|
{- "limit": 0.1
}Retrieves payroll values for depots within a specified date range and for specified driver IDs or by depotId. There is a limit of 204k work-entities calculation per request to avoid timeouts. This limit enables, for example, a calculation of 100 drivers for 30 days with 100 daily work-entities defined. In case the limit is exceeded, a 413 error code will be returned, together with the allowed amount of drivers for the existing configuration.
This endpoint is only available if the Use Payroll V2 feature flag is enabled and work-entity as well as payroll rules have been properly setup.
| depotId | string
|
| driverIds | Array of strings
|
| startDate | string <date> (StringifyDate)
|
| endDate | string <date> (StringifyDate)
|
| paycodes | Array of strings (CodeId)
|
| shouldUseCache | boolean
|
[- {
- "occurrenceDates": {
- "endDate": "2019-08-24",
- "startDate": "2019-08-24"
}, - "result": {
- "timeIntervals": [
- {
- "end": "2019-08-24",
- "start": "2019-08-24"
}
], - "value": 0.1,
- "rate": 0.1,
- "unit": "Minutes"
}, - "periodType": "weekly",
- "workEntityIdReference": "string",
- "codeId": "string",
- "workingDriver": {
- "driverExternalId": "string",
- "driverUuid": "string"
}, - "depotId": "string"
}
]This endpoint operates on eventual consistency. This means the private hire order is validated and enqueued for processing which is confirmed by a http 202 status response.
The actual processing happens asynchronously and typically takes a few seconds. To verify the order was successfully added, use the GetPrivateHireOrder endpoint below specifying the the orderId you used in this request.
Private hire orders and trips should be unique by orderId, taskId and date respectively in the system.
Once the order is created, resources to fulfill the trips, such as drivers and vehicles, can be only assigned through the Optibus OPS platform.
An order can be created directly with a status 'confirmed' or the status of an order can be updated using the endpoint PATCH /private_hires/order/{orderId}.
By default on creation, if there's no status being set, the order is being consider virtually as pending.
Multi-day trips must be divided into individual trips per operational day. Trips can commence as early as 00:00 and extend up to a maximum of 36:00 local time, meaning trips can conclude as late as 12:00 noon the following day.
Use cases that require trips to start and finish in different time zones are currently not supported.
| orderStatus | string Value: "confirmed" | ||||||||||||||||||||||||||||||||
| orderId required | string (OrderIdString) [ 1 .. 255 ] characters External identifier of a private hire order that should be unique within the system | ||||||||||||||||||||||||||||||||
required | Array of objects (PrivateHireTask) Representation of trips within a private hire order | ||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||
{- "orderStatus": "confirmed",
- "orderId": "string",
- "privateHires": [
- {
- "noVehicleNeeded": true,
- "note": "string",
- "labelCodes": [
- "string"
], - "events": [
- {
- "distance": 0.1,
- "note": "string",
- "labelCodes": [
- "string"
], - "endLocation": {
- "lng": 0.1,
- "lat": 0.1,
- "address": "string",
- "name": "string"
}, - "startLocation": {
- "lng": 0.1,
- "lat": 0.1,
- "address": "string",
- "name": "string"
}, - "endTime": "2024-06-30T23:30:00+02:00",
- "startTime": "2024-06-30T23:30:00+02:00",
- "type": "deadhead"
}
], - "date": "string",
- "depotName": "string",
- "taskId": "string"
}
]
}nullAs details of a private hire order and its trips can be modified in the OPS platform, external parties can use this endpoint to get the current state and details of a specific order, its trips, as well as the vehicle and driver resources associated.
Currently there's no support of a pushing mechanism in order to notify API consumers when something changes in resources that belong to a private hire order. As an alternative, until the push mechanism is implemented, this endpoint can be used following a polling strategy in order to identify changes that happen in a private hire order and the trips that belong to it.
| orderId required | string External identifier of a private hire order that should be unique within the system |
{- "privateHires": [
- {
- "taskId": "string",
- "depotName": "string",
- "date": "string",
- "note": "string",
- "labels": [
- {
- "name": "string",
- "code": "string"
}
], - "vehicles": [
- {
- "id": "string",
- "eventIds": [
- "string"
], - "attributes": {
- "availableSeats": 0.1,
- "licensePlate": "string",
- "type": "string",
- "model": "string"
}
}
], - "driver": {
- "id": "string",
- "firstName": "string",
- "lastName": "string"
}, - "lockedAt": "2019-08-24",
- "events": [
- {
- "note": "string",
- "endLocation": {
- "lng": 0.1,
- "lat": 0.1,
- "address": "string",
- "name": "string"
}, - "startLocation": {
- "lng": 0.1,
- "lat": 0.1,
- "address": "string",
- "name": "string"
}, - "endTime": "2024-06-30T23:30:00+02:00",
- "startTime": "2024-06-30T23:30:00+02:00",
- "distance": 0.1,
- "type": "deadhead",
- "eventId": "string"
}
], - "depotCode": "string",
- "regionName": "string"
}
], - "cancelledAt": "2019-08-24",
- "confirmedAt": "2019-08-24",
- "orderId": "string"
}confirmed: status to determine that the order has been paid by the hiring entity.
In the OPS Optibus platform, when a trip has any driver or vehicle associated to a confirmed order, a warning message will be displayed to inform the dispatchers about this fact.cancelled: status to cancel the order, freeing up resources associated to trips belonging to the order, such as drivers and vehicles.| orderId required | string External identifier of a private hire order that should be unique within the system |
| orderStatus required | string (SupportedOrderStatus) Enum: "confirmed" "cancelled" "deleted" Private hire order status.
|
{- "orderStatus": "confirmed"
}{- "errors": [
- {
- "type": "orderAlreadyConfirmed",
- "message": "Private hire order has been already confirmed",
- "details": {
- "orderId": "123"
}
}
]
}One or more private hire tasks can be updated/cancelled in the same request. Only send the private hire tasks that are meant to be updated or cancel, if tasks don't need to be modified, refrain to include them in the request. Updates for a subset of private hire tasks won't be supported, the request should be successful for all the intended private hire trips included in the request.
The private hire attribute taskId and date define the uniqueness of a task and is what's being used to find the private hire task to be updated or cancelled.
In case the private hire is being updated, in certain cases they will be deleted and recreated, changing the event IDs. So in case these IDs
are being consumed in any way, it's something to take into consideration.
When updating the 'date' or times of the events, the driver and vehicle will be automatically unassign, because the API doesn't account for potential overlaps or regulation compliance violations, unlike the OPS web client, for drivers and vehicles.
Dispatchers can split/cut these trips (a.k.a. driver duties), creating 2 trips or more. This action causes as a side effect, the renaming of the original value for the attribute taskId.
As an example, if an original private hire trip had the attribute taskId as the value task-display-id, after a dispatcher splits the trip in the OPS Optibus platform,
it will create 2 trips whose taskIds values will be task-display-id (1/2) and task-display-id (2/2).
startTime or/and endTime in an event (sub-trip)dateNote: At this moment, all the supported modifications will free up all the vehicles and drivers associated to the private hire trip, if there were any, given that it will cause a risk to violate regulation compliance rules, which are currently computed in the Optibus OPS web application.
If there's a modification that's not supported, the response status code returned will be a 400 malformed request, with an informative error that will point out that the change is not supported.
| orderId required | string External identifier of a private hire order that should be unique within the system |
required | Array of PrivateHireTask (object) or PatchPrivateHireCancellation (object) | ||||||||||||||||||||||||||||||||
Array Any of
| |||||||||||||||||||||||||||||||||
{- "privateHires": [
- {
- "noVehicleNeeded": true,
- "note": "string",
- "labelCodes": [
- "string"
], - "events": [
- {
- "distance": 0.1,
- "note": "string",
- "labelCodes": [
- "string"
], - "endLocation": {
- "lng": 0.1,
- "lat": 0.1,
- "address": "string",
- "name": "string"
}, - "startLocation": {
- "lng": 0.1,
- "lat": 0.1,
- "address": "string",
- "name": "string"
}, - "endTime": "2024-06-30T23:30:00+02:00",
- "startTime": "2024-06-30T23:30:00+02:00",
- "type": "deadhead"
}
], - "date": "string",
- "depotName": "string",
- "taskId": "string"
}
]
}nullReturns the public key that can be used to verify the payloads attached to URLs opened via a custom action attached to a notification received in the Optibus Driver App.
No authentication is required to access this endpoint.
{- "publicKeyType": "string",
- "publicKey": "string"
}The Optibus OPS real-time stream delivers changes in entities triggered by user in the OPS platform to subscribers via webhook requests.
Actions supported will be sent in requests to the subscribers, containing all the entities that were changed,
such as runs, run_assignments, run_events, blocks and block_assignments with a format that has been inspired by ODS,
following the same terminology for the name of attributes and entities, despite there's additional information to enrich the data streamed.
Note: Internal IDs can be found in attributes with _internal_id suffix, such as run_internal_id and block_internal_id and these can be used to uniquely identify entities
if the OPS API is consumed, but for the integration these IDs shouldn't be used. It's recommended to use run_id and block_id to uniquely identify entities.
To set up a subscription, the subscriber must provide:
action_type operations they want to receive on this endpoint.The subscriber will receive a secret token that will be used to validate the request comes from Optibus as a trusted source.
Before sending the webhook, we generate an HMAC signature using the same secret key for the request body, then include the result in a header X-HMAC-SIGNATURE.
The subscriber will need to validates the request by generating the signature following the same process on their side and then comparing it to the X-HMAC-SIGNATURE header.
If there's a match, the request should be accepted; otherwise, it should be rejected as it might come from an unauthorized source.
To generate a signature is a simple as:
import crypto from "crypto";
return crypto
.createHmac("sha256", subscriber.secret)
.update(JSON.stringify(realTimeOperation), "utf8")
.digest("base64");
It's important that real-time operations that belong to an aggregate_id, value that's always included in every request payload,
are sequentially processed by the consumers in order to guarantee correctness, given that operations could depend on each and if not
processed chronologically in the order they were triggered, it could lead to data inconsistencies.
aggregate_id represents a funnel for all actions in a specific operational region and parallelism across different aggregate_id should be
considered by the subscribers.
If the subscriber returns any 2xx status code, the request is considered successfully processed. No further action will be taken.
If the subscriber fails to process the request (e.g., due to server issues or downtime), the system will retry the request using an exponential backoff strategy for up to 2 minutes. Retries will be triggered when the subscriber responds with one of the following status codes:
Real-time operations for a given aggregate_id are processed sequentially. If a request for that aggregate_id fails and is being retried, no new operations will be streamed for that same aggregate_id until: The request succeeds, or The retry window (2 minutes) expires.
{
"id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
"customer": "superbus",
"created_at": "2024-10-09T16:19:01.300Z",
"aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
"region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
"operational_actions": [
{
"action_type": "unassign_duty",
"operational_date": "2024-10-09",
"entities_changes": [
{
"blocks": [],
"block_assignments": [],
"runs": [],
"run_assignments": [
{
"run_internal_id": "b045c6f4-f827-4e82-833a-1c5e713ad0b2",
"date": "2024-10-09",
"driver_id": null,
"run_id": "VU1002",
"service_id": "etf0C81iX7",
"entity_operation": "update"
}
],
"run_events": []
}
]
}
]
}
{
"id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
"customer": "superbus",
"created_at": "2024-10-09T16:19:01.300Z",
"aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
"region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
"operational_actions": [
{
"action_type": "assign_duty",
"operational_date": "2024-10-09",
"entities_changes": [
{
"blocks": [],
"block_assignments": [],
"runs": [],
"run_assignments": [
{
"run_internal_id": "b045c6f4-f827-4e82-833a-1c5e713ad0b2",
"date": "2024-10-09",
"driver_id": "driver-123",
"run_id": "VU1002",
"service_id": "etf0C81iX7",
"entity_operation": "update"
}
],
"run_events": []
}
]
}
]
}
{
"id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
"customer": "superbus",
"created_at": "2024-10-09T16:19:01.300Z",
"aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
"region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
"operational_actions": [
{
"action_type": "unassign_block",
"operational_date": "2025-09-24",
"entities_changes": [
{
"blocks": [],
"block_assignments": [
{
"block_id": "Block EU3006",
"block_internal_id": "bd8c55d2-7359-47b0-9a90-228872130eec",
"date": "2025-09-24",
"vehicle_id": null,
"entity_operation": "update",
"service_id": "QtyCFMaby"
}
],
"runs": [],
"run_assignments": [],
"run_events": []
}
]
}
]
}
{
"id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
"customer": "superbus",
"created_at": "2024-10-09T16:19:01.300Z",
"aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
"region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
"operational_actions": [
{
"action_type": "assign_block",
"operational_date": "2025-09-24",
"entities_changes": [
{
"blocks": [],
"block_assignments": [
{
"block_id": "Block EU3006",
"block_internal_id": "bd8c55d2-7359-47b0-9a90-228872130eec",
"date": "2025-09-24",
"vehicle_id": "Vehicle 230",
"entity_operation": "update",
"service_id": "QtyCFMaby"
}
],
"runs": [],
"run_assignments": [],
"run_events": []
}
]
}
]
}
{
"id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
"customer": "superbus",
"created_at": "2024-10-09T16:19:01.300Z",
"aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
"region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
"operational_actions": [
{
"action_type": "assign_block",
"operational_date": "2025-09-24",
"entities_changes": [
{
"blocks": [],
"block_assignments": [],
"runs": [],
"run_assignments": [
{
"run_internal_id": "48afea60-81ce-428c-bc93-622961f2e9b5",
"date": "2024-10-09",
"driver_id": "Driver 124",
"run_id": "Duty VU1000",
"service_id": "etf0C81iX7",
"entity_operation": "update"
}
],
"run_events": []
},
{
"blocks": [],
"block_assignments": [],
"runs": [],
"run_assignments": [
{
"run_internal_id": "b045c6f4-f827-4e82-833a-1c5e713ad0b2",
"date": "2024-10-09",
"driver_id": "Driver 421",
"run_id": "Duty VU2000",
"service_id": "etf0C81iX7",
"entity_operation": "update"
}
],
"run_events": []
}
]
}
]
}
{
"id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
"customer": "superbus",
"created_at": "2024-10-09T16:19:01.300Z",
"aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
"region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
"operational_actions": [
{
"action_type": "cut_duty",
"operational_date": "2025-09-24",
"entities_changes": [
{
"blocks": [],
"block_assignments": [],
"runs": [
{
"run_internal_id": "acaebae9-9804-4a2d-bd66-62f7cbb925a8",
"run_id": "EU1008 (1/2)",
"original_run_internal_id": "9da47cf8-f45b-40a0-a150-18f09503b2c1",
"entity_operation": "create",
"original_run_id": "EU1008",
"reference_from": "split"
},
{
"run_internal_id": "2b26543c-9094-4ebe-b3f0-e8789cd5a4a1",
"run_id": "EU1008 (2/2)",
"original_run_internal_id": "9da47cf8-f45b-40a0-a150-18f09503b2c1",
"entity_operation": "create",
"original_run_id": "EU1008",
"reference_from": "split"
}
],
"run_assignments": [
{
"service_id": "ObP5ZTmaUy",
"run_id": "EU1008",
"run_internal_id": "86ab09ef-d145-4982-94ed-8f4a0b613ce9",
"date": "2025-09-24",
"driver_id": null,
"entity_operation": "delete"
},
{
"service_id": "ObP5ZTmaUy",
"run_id": "EU1008 (1/2)",
"run_internal_id": "acaebae9-9804-4a2d-bd66-62f7cbb925a8",
"date": "2025-09-24",
"driver_id": "006494",
"entity_operation": "create"
},
{
"service_id": "ObP5ZTmaUy",
"run_id": "EU1008 (2/2)",
"run_internal_id": "2b26543c-9094-4ebe-b3f0-e8789cd5a4a1",
"date": "2025-09-24",
"driver_id": "006494",
"entity_operation": "create"
}
],
"run_events": [
{
"run_event_internal_id": "1f3263ea-65b2-4954-a8ce-8eb3ef1a0b60",
"event_type": "deadhead",
"start_time": "05:01",
"start_location": "1",
"end_location": "140143",
"end_time": "05:10",
"event_sequence": 1,
"run_internal_id": "acaebae9-9804-4a2d-bd66-62f7cbb925a8",
"run_id": "EU1008 (1/2)",
"service_id": "ObP5ZTmaUy",
"entity_operation": "update",
"block_id": "EU1007",
"block_internal_id": "4472986c-0f4f-478d-a1e3-8c7f6d904d19"
},
{
"run_event_internal_id": "30da3618-e771-4ee8-9821-ba14268c4400",
"trip_id": "TRIP_ID_12345",
"event_type": "service_trip",
"start_time": "05:10",
"start_location": "140143",
"end_location": "141569",
"end_time": "05:30",
"event_sequence": 2,
"run_internal_id": "acaebae9-9804-4a2d-bd66-62f7cbb925a8",
"run_id": "EU1008 (1/2)",
"service_id": "ObP5ZTmaUy",
"entity_operation": "update",
"block_id": "EU1007",
"block_internal_id": "4472986c-0f4f-478d-a1e3-8c7f6d904d19"
},
{
"run_event_internal_id": "b119d22f-1f53-4e4b-80c6-e3ab77ac1d90",
"trip_id": "TRIP_ID_5423",
"event_type": "service_trip",
"start_time": "05:45",
"start_location": "140167",
"end_location": "140143",
"end_time": "06:00",
"event_sequence": 3,
"run_internal_id": "acaebae9-9804-4a2d-bd66-62f7cbb925a8",
"run_id": "EU1008 (2/2)",
"service_id": "ObP5ZTmaUy",
"entity_operation": "update",
"block_id": "EU1007",
"block_internal_id": "4472986c-0f4f-478d-a1e3-8c7f6d904d19"
},
{
"run_event_internal_id": "215625a0-2e75-46d7-b496-fede700a01e7",
"trip_id": "TRIP_ID_9821",
"event_type": "service_trip",
"start_time": "06:00",
"start_location": "140143",
"end_location": "141569",
"end_time": "06:20",
"event_sequence": 4,
"run_internal_id": "acaebae9-9804-4a2d-bd66-62f7cbb925a8",
"run_id": "EU1008 (2/2)",
"service_id": "ObP5ZTmaUy",
"entity_operation": "update",
"block_id": "EU1007",
"block_internal_id": "4472986c-0f4f-478d-a1e3-8c7f6d904d19"
}
]
}
]
}
]
}
{
"id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
"customer": "superbus",
"created_at": "2024-10-09T16:19:01.300Z",
"aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
"region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
"operational_actions": [
{
"action_type": "cut_block",
"operational_date": "2025-09-24",
"entities_changes": [
{
"blocks": [
{
"block_internal_id": "b66bfa61-714b-4e4f-af5d-49f6ced103c3",
"block_id": "Block EU1084 (1/2)",
"original_block_internal_id": "02890089-ae62-44a4-9eb8-17697deac901",
"original_block_id": "Block EU1084",
"service_id": "ObP5ZTmaUy",
"entity_operation": "create",
"reference_from": "split"
},
{
"block_internal_id": "15a985f4-0382-494a-9e7e-c310196563f4",
"block_id": "Block EU1084 (2/2)",
"original_block_internal_id": "02890089-ae62-44a4-9eb8-17697deac901",
"original_block_id": "Block EU1084",
"service_id": "ObP5ZTmaUy",
"entity_operation": "create",
"reference_from": "split"
}
],
"block_assignments": [
{
"block_id": "Block EU1084",
"block_internal_id": "4dc6e8f1-47a7-4008-90cd-80a6f5141d02",
"date": "2025-09-24",
"vehicle_id": "2336",
"entity_operation": "delete",
"service_id": "ObP5ZTmaUy"
},
{
"block_id": "Block EU1084 (1/2)",
"block_internal_id": "b66bfa61-714b-4e4f-af5d-49f6ced103c3",
"date": "2025-09-24",
"vehicle_id": "2336",
"entity_operation": "create",
"service_id": "ObP5ZTmaUy"
},
{
"block_id": "Block EU1084 (2/2)",
"block_internal_id": "15a985f4-0382-494a-9e7e-c310196563f4",
"date": "2025-09-24",
"vehicle_id": "2336",
"entity_operation": "create",
"service_id": "ObP5ZTmaUy"
}
],
"runs": [],
"run_assignments": [],
"run_events": [
{
"run_event_internal_id": "03cdba95-196e-498e-ad1c-67f012779d95",
"event_type": "deadhead",
"start_time": "10:36",
"start_location": "1",
"end_location": "020959",
"end_time": "10:45",
"event_sequence": 0,
"entity_operation": "update",
"run_internal_id": "50e527d1-a2af-4502-a1da-f983e377518a",
"run_id": "EU1002",
"block_id": "Block EU1084 (1/2)",
"block_internal_id": "b66bfa61-714b-4e4f-af5d-49f6ced103c3",
"service_id": "ObP5ZTmaUy"
},
{
"run_event_internal_id": "e53380be-e28e-4732-8fd4-725228ac2fc4",
"trip_id": "TRIP_ID_1234",
"event_type": "service_trip",
"start_time": "10:45",
"start_location": "020959",
"end_location": "140638",
"end_time": "11:25",
"event_sequence": 1,
"entity_operation": "update",
"run_internal_id": "50e527d1-a2af-4502-a1da-f983e377518a",
"run_id": "EU1002",
"block_id": "Block EU1084 (1/2)",
"block_internal_id": "b66bfa61-714b-4e4f-af5d-49f6ced103c3",
"service_id": "ObP5ZTmaUy"
},
{
"run_event_internal_id": "1fe96a0d-f009-467c-be45-1757ae70f131",
"trip_id": "TRIP_ID_5326",
"event_type": "service_trip",
"start_time": "11:30",
"start_location": "140637",
"end_location": "020959",
"end_time": "12:10",
"event_sequence": 2,
"entity_operation": "update",
"run_internal_id": "50e527d1-a2af-4502-a1da-f983e377518a",
"run_id": "EU1002",
"block_id": "Block EU1084 (1/3)",
"block_internal_id": "b66bfa61-714b-4e4f-af5d-49f6ced103c3",
"service_id": "ObP5ZTmaUy"
}
]
}
]
}
]
}
required | Array of objects (OperationalAction) List of operational actions triggered by a user in OPS platform. A single action triggered by a user has the potential of creating multiple operational actions. A user action could cause multiple operational action types for an operational day, such as [example] or actions for multiple operational days, such as adding a driver absence that could unassign the driver along multiple days. | ||||||||||||||||||
Array
| |||||||||||||||||||
| customer required | string The customer or agency the operation applies to | ||||||||||||||||||
| aggregate_id required | string Aggregate identifier, typically to group related operations Sequentiality in processing real-time events for an aggregateId should be guaranteed by the provider. Parallelism in the processing of events could be performed across events belonging to different aggregateId. | ||||||||||||||||||
| region_id required | string Identifier of the region the operation pertains to | ||||||||||||||||||
| created_at required | string Timestamp of the operation | ||||||||||||||||||
| id required | string UUID for the real-time operation | ||||||||||||||||||
{- "id": "90cb367f-3680-48c2-93a2-b162cb11ce9a",
- "customer": "superbus",
- "created_at": "2024-10-09T16:19:01.300Z",
- "aggregate_id": "operational-calendar-0d277b74-ab79-493f-8f1d-ec307420868d",
- "region_id": "0d277b74-ab79-493f-8f1d-ec307420868d",
- "operational_actions": [
- {
- "action_type": "unassign_duty",
- "operational_date": "2024-10-09",
- "entities_changes": [
- {
- "blocks": [ ],
- "block_assignments": [ ],
- "runs": [ ],
- "run_assignments": [
- {
- "run_internal_id": "b045c6f4-f827-4e82-833a-1c5e713ad0b2",
- "date": "2024-10-09",
- "driver_id": null,
- "run_id": "VU1002",
- "service_id": "etf0C81iX7",
- "entity_operation": "update"
}
], - "run_events": [ ]
}
]
}
]
}These API endpoints are deprecated and could be removed in a future version. Please use the corresponding new API endpoints instead, which should offer improved usability and extra functionality.
WARNING: This API endpoint is deprecated - you should use GET /v2/drivers/absences instead.
Returns absences of drivers.
Driver GroupsPublic Holidays as configured in preferences| driver | Array of strings (UUID)
|
| from | string <date> (StringifyDate)
|
| to | string <date> (StringifyDate)
|
{- "property1": [
- {
- "endTimeNextDay": true,
- "startTimeNextDay": true,
- "endTime": 0,
- "endDate": "2019-08-24",
- "startTime": 0,
- "startDate": "2019-08-24",
- "absenceRequestId": "string",
- "updatedOn": "2019-08-24T14:15:22Z",
- "createdOn": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": null,
- "property2": null
}, - "note": "string",
- "absenceCode": "string",
- "absenceId": "string",
- "driver": "string"
}
], - "property2": [
- {
- "endTimeNextDay": true,
- "startTimeNextDay": true,
- "endTime": 0,
- "endDate": "2019-08-24",
- "startTime": 0,
- "startDate": "2019-08-24",
- "absenceRequestId": "string",
- "updatedOn": "2019-08-24T14:15:22Z",
- "createdOn": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": null,
- "property2": null
}, - "note": "string",
- "absenceCode": "string",
- "absenceId": "string",
- "driver": "string"
}
]
}WARNING: This API endpoint is deprecated - you should use GET /v2/drivers instead.
Returns the driver information, with filters.
| driversIds | Array of strings (UUID)
|
| date | string <date> (StringifyDate)
|
[- {
- "id": "string",
- "archived": true,
- "note": "string",
- "firstName": "string",
- "lastName": "string",
- "middleName": "string",
- "avatar": "string",
- "mobileNumber": "string",
- "homeNumber": "string",
- "emailAddress": "string",
- "uuid": "string",
- "employmentPeriods": [
- {
- "endDate": "2019-08-24",
- "startDate": "2019-08-24",
- "employmentPeriodId": "string"
}
], - "meta": {
- "property1": null,
- "property2": null
}, - "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}
}
]WARNING: This API endpoint is deprecated - you should use POST /v2/drivers and PUT /v2/drivers instead.
Adds or updates a specific driver.
| opUnitId | string Deprecated The unit a driver is assigned to. Editing a driver's unit will create a new depot period with the new information. DEPRECATED: Use Expected: Depot name (e.g., "MyBusCompany Central") |
| depotName | string The depot (unit) a driver is assigned to. Editing a driver's depot will create a new depot period with the new information. Expected: Depot name (e.g., "MyBusCompany Central") |
| group | string Deprecated The group a driver is assigned to. A driver can be part of only one group. Editing a driver's group will create a new depot period with the new information. DEPRECATED: Use Expected: Group name (e.g., "Morning Shift") |
| groupName | string The group a driver is assigned to. A driver can be part of only one group. Editing a driver's group will create a new depot period with the new information. Expected: Group name (e.g., "Morning Shift") |
| depot | string Deprecated The main region a driver is assigned to. Editing a driver's region will create a new depot period with the new information. DEPRECATED: Use Expected: Region name (e.g., "MyBusCompany West") |
| regionName | string The region a driver is assigned to. Editing a driver's region will create a new depot period with the new information. Expected: Region name (e.g., "MyBusCompany West") |
| startDate | string |
| id required | string The driver ID provided by the user. It can be up to 36 characters with no gaps. |
| firstName required | string The driver’s first name |
| lastName required | string The driver’s last name |
| middleName | string The driver’s middle name |
| avatar | string The driver’s avatar. This is the url of an image of the driver. It needs to be accessible on the public internet. |
| mobileNumber | string The driver’s mobile phone number |
| homeNumber | string The driver’s home phone number |
| emailAddress | string The driver’s email address |
| driverType | string |
| driverUnion | string |
| driverGrade | string |
| attributes | object |
[- {
- "opUnitId": "string",
- "depotName": "string",
- "group": "string",
- "groupName": "string",
- "depot": "string",
- "regionName": "string",
- "startDate": "string",
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "middleName": "string",
- "avatar": "string",
- "mobileNumber": "string",
- "homeNumber": "string",
- "emailAddress": "string",
- "driverType": "string",
- "driverUnion": "string",
- "driverGrade": "string",
- "attributes": {
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}
}
]{ }WARNING: This API endpoint is deprecated - you should use GET /v1/drivers/signing-deviations instead.
Calculate the signing deviations for the drivers in the given date range and region. If driverIds is empty, all drivers will be returned Signing deviations are calculated as the difference between the expected and actual signing times, for each sign on or sign off event. Deviation might be either early or late, calculated according to a defined threshold.
| from required | string <date> (StringifyDate) The start of the date range to get the signing deviations from |
| to required | string <date> (StringifyDate) The end of the date range to get the signing deviations from |
| regionUuid required | string (DepotId) The region to get the signing deviations from |
| driverIds | Array of strings (DriverId) The driver IDs for which to get the signing deviations. if empty all drivers will be returned |
{- "property1": {
- "property1": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
], - "property2": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
]
}, - "property2": {
- "property1": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
], - "property2": [
- {
- "expectedTime": "2024-06-30T23:30:00+02:00",
- "actualTime": "2024-06-30T23:30:00+02:00",
- "deviation": 0.1,
- "signingType": "signOn",
- "signingDeviationType": "early"
}
]
}
}WARNING: This API endpoint is deprecated - you should use GET /v2/drivers/custom-attributes instead.
Returns the driver attributes.
| driverIds | Array of strings (DriverId)
|
| from | string
|
| to | string
|
{- "version": 0.1,
- "driverAttributes": {
- "property1": {
- "property1": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
], - "property2": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
]
}, - "property2": {
- "property1": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
], - "property2": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
]
}
}
}These API endpoints are deprecated and could be removed in a future version. Please use the corresponding new API endpoints instead, which should offer improved usability and extra functionality.
WARNING: This API endpoint is deprecated - you should use GET /v1/vehicles instead.
Returns the information for vehicles, with filters.
| vehicleIds | Array of strings (UUID)
|
| depotIds | Array of strings (UUID)
|
| date | string <date> (StringifyDate)
|
[- {
- "id": "string",
- "licensePlate": "string",
- "parkingLocation": "string",
- "depot": "string",
- "opUnitId": "string",
- "description": "string",
- "type": "string",
- "nextDowntime": 0.1,
- "model": "string",
- "archived": true,
- "archivedOn": "string",
- "property1": [
- 0.1
], - "property2": [
- 0.1
]
}
]WARNING: This API endpoint is deprecated - you should use GET /v1/vehicles/custom-attributes instead.
Returns the vehicle attributes.
| vehicleIds | Array of strings (VehicleId)
|
| from | string
|
| to | string
|
{- "attributes": {
- "property1": {
- "property1": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
], - "property2": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
]
}, - "property2": {
- "property1": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
], - "property2": [
- {
- "value": [
- 0.1
], - "date": "2019-08-24",
- "attributeId": "string"
}
]
}
}, - "attributeMap": {
- "property1": {
- "id": "string",
- "type": "STRING",
- "displayName": "string"
}, - "property2": {
- "id": "string",
- "type": "STRING",
- "displayName": "string"
}
}
}Below, we use the following icons to indicate the type of changes:
version prefix such as /v2/endpointName to /v3/endpointName. See section Versioning.POST /v2/drivers: fix bug where response status code when trying to create a driver with an ID that already exists was 422 instead of 409POST /v1/vehicles: fix bug where response status code when trying to create a vehicle with an ID that already exists was 422 instead of 409totalPages value now behaves consistently across all these endpoints when there are zero results (some endpoints returned 0 total pages and some returned 1 - now all will return 1 in this scenario).GET /v2/driversGET /v2/drivers/absencesGET /v2/drivers/custom-attributesGET /v2/drivers/employment-periodsGET /v1/vehiclesGET /v1/vehicles/custom-attributesGET /v1/vehicles/downtimesGET /v1/vehicles/downtimes: fix bug where some values incorrectly returned null instead of being undefined, contrary to the behaviour stated in the API documentation.GET /v2/drivers/custom-attributes: new endpoint to query driver custom attributes with entry IDs for synchronization with third party systems. Supports filtering by driver IDs, attribute IDs, and date range. Results are paginated (100 drivers per page) and sorted by driver ID, attribute ID, and start date.PUT /v2/drivers/custom-attributes: new endpoint to create/update driver custom attribute entries with entry IDs for synchronization with third party systems.GET /v2/driver-attributes: deprecated in favor of GET /v2/drivers/custom-attributes. The new endpoint provides entry IDs, improved pagination, and better filtering capabilities.GET /v2/operational-plan: Added taskDisplayIds query parameter to filter tasks by display ID. Filtering cascades to related duty assignments, blocks with task events, and vehicle assignments.PATCH /private_hires/order/{orderId}: Support deletion of a private hire order and all its associated resources, such as tasks and blocks.POST /v2/drivers: new endpoint to create driversPUT /v2/drivers: new endpoint to update driversPOST /v1/vehicles: fix bug where response status on creating new vehicles was 200 instead of 201originDepot and destinationDepot are sometimes undefined in duty event summaries across multiple endpoints. Despite this they were typed as required. Now these fields are correctly typed as optional. Affects the following endpoints:GET /v1/operational-planGET /v2/operational-planGET /v1/calendarGET /v1/calendar/planned-assignmentsGET /v2/drivers: new endpoint to fetch paginated driver information with advanced filtering capabilities. Supports filtering by driver IDs, region names, employment status, and date. Results are sorted by driver ID and paginated (100 results per page).GET /driver: deprecated in favor of GET /v2/drivers. The new endpoint provides improved filtering, pagination, and date-based filtering capabilities.GET /v2/drivers/employment-periods: new paginated endpoint to query driver employment periods. Supports filtering by driver IDs and date range. Returns up to 100 results per page, sorted by driver ID, start date, and end date.GET /v2/drivers/absences: new paginated endpoint to query driver absences. Supports filtering by driver IDs, absence codes, and date range. Returns up to 100 results per page, sorted by driver ID, start date, start time, end date, and end time.PUT /v1/vehicles/custom-attributes: new endpoint to create and update vehicle custom attributes.POST /v1/absences: Added balance validation feature. When the entitlementBanksEffectiveDate feature flag is enabled, the API validates that absences do not cause negative balance violations for entitlement banks that do not allow negative balances. If violations are detected, the API returns HTTP 422 with details about which drivers have violations and which banks are affected.skipBalanceValidation query parameter (defaults to false). When set to "true", skips balance validation.entitlementBanksEffectiveDate feature flag is enabledskipBalanceValidation query parameter is NOT set to "true" (validation is enabled by default)GET /v1/vehicles/custom-attributes: new endpoint to fetch vehicle custom attributes.POST /v1/drivers/employment-periods: new endpoint to create driver employment periods.PUT /v1/drivers/employment-periods/{periodId}: new endpoint to update driver employment periods by ID.PUT /v1/vehicles/downtimes: new endpoint to create or update vehicle downtimesPOST /v1/absences: fix an issue where modifying the dates of an existing absence would sometimes be blocked by an incorrect validation error.POST /v1/drivers: fix bug where using regionName field returned validation error instead of accepting itGET /v1/vehicles/downtimes: fixes a couple of minor property naming issues with the response body. This is a non-breaking change as the API endpoint itself was not released yet at the time of the fix.PUT /v1/vehicles: new endpoint to update vehicles.GET /v1/vehicles/downtimes: new endpoint to fetch vehicle downtimes with filtering and pagination.GET /v2/operational-plan: Added lastAssignedDriverId field to assignment properties in response.POST /v1/vehicles: new endpoint to create vehicles.GET /v1/vehicles: new endpoint to fetch a list of vehicles.GET /v1/calendar/{depotId}GET /v1/calendar-planned-assignments/{depotId}GET /v1/operational-plan/{depotId}GET /v1/operational-plan, GET /v2/operational-planGET /v1/preferences/absence-types: new endpoint to fetch a list configured absence types.GET /v1/driver-day-labels: new endpoint to fetch a list of labels applied for drivers within a given date range.POST /v1/drivers: fix API documentation inconsistency where note field was documented as supported but was actually rejected by the APIPOST /v1/drivers: add new clearly named fields with deprecation of confusing legacy field names:regionName field (use instead of deprecated depot field)groupName field (use instead of deprecated group field)depotName field (use instead of deprecated opUnitId field)Note: These changes are non-breaking because the note field was never functional, and all other changes only add new fields while maintaining full backward compatibility with existing field names.
GET /v1/operational-plan/{depotId}, GET /v1/operational-plan, GET /v2/operational-plan: fix bug in response body where assignments.properties.cancellationReason was under certain conditions returned as a string instead of as an objectPOST /v1/drivers: add support for custom attributes/v1/preferences/holidays endpoint added/v1/regions (was incorrectly specified as /region in v2.3.4)/v1/regions/group endpoint now returns regionUuid field, which is an alias of deprecated depot field/group endpoint now returns additional regionName field🌟 Added the optibusTimeplanId field to the optibus Ids object within tasks and blocks
Op Units in assignments - we are introducing the op unit in the operational plan. in V1 and V2, the naming of depots remains unchanged although for some customers this would be considered a region. Within these customers, the lower level division is called an operational unit (opUnit). In future versions, "depots" would be renamed to "region", and units would be renamed to "depot".
Introducing support for private hire endpoints
POST /private_hires/order: Creation of the private hire order and trips associated to it.GET /private_hires/order/{orderId}/info: Retrieval of the private hire order, the trips associated and the driver/vehicle assignments, besides other useful information.PATCH /private_hires/order/{orderId}: Modification of private hire order status.PATCH /private_hires/order/{orderId}/trips: Modification of trips associated to a private hire order.Adjustment to operational-plan endpoints. Additional properties were added, and some additional aliases introduced for a more coherent naming structure. This is intended to ease a transition from the deprecated end point v1/operational-plan to v2/operational-plan (OPS-8538). While there are breaking changes in v2/operational-plan, there are no active users at this endpoint currently yet, so we are treating it as a minor version upgrade from 2.1.0 to 2.2.0
v1/operational-plan. On each event:eventId has been added as an alias for the existing id propertyeventType has been added as an alias for the existing type propertynoteText has been addedreinforcedTripReference has been added to reinforcement eventssplitTripReference has been added the parts of trips that were spliteventJsonData, these vary per eventType.blockId has been added as an alias for the existing vehicleIdv2/operational-plan. On each event:type has been removed and replaced by eventTypeid has been removed and replaced by uuideventJsonData has been removed and all properties that were inside this object are now on the event levelIn v1/operational-plan and v2/operational-plan
Additional source ids for tasks and blocks added Optibus IDs to tasks and blocks (OPS-8855)
optibusIds on each task and block as follows
export type OptibusIds = { optibusRosterId: string; optibusRosterDatasetId: string; optibusScheduleId: string; };
It is important to document that tasks and blocks and days off that have been created inside Ops will NOT have these IDs. Therefore, we are adding additional properties called: source and wasModifiedInOperationssource is “scheduling“:optibusIds will existwasModifiedInOperations will exist. True, if the task has been modified in anyway (excluding cancellations) else, False.source is “operations“:optibusIds will NOT existwasModifiedInOperations will NOT exist.Adding dutyType to certain tasks added dutyType to the task, where dutyType is a property that comes from Rosters/Schedules imported into Optibus Operations from Optibus Planning/Scheduling/Rostering (OPS-8877)
Changes in this release do not contain breaking changes to existing endpoints, but we are deprecating endpoint v1/operational-plan by 2024-06-30 in favor of v2/operational-plan, therefore marking this as a major release, increasing overall API version from 1.3.0 to 2.0.0:
v2/operational-plan endpoint. (OPS-6125) which contains a number of breaking changes if switching from v1/operational-plan. Note that v1/operational-plan is still available, but will be deprecated by 2024-06-30:assignedOnly, vehicleIdsdepotId is no longer a path parameter, it has been replaced by query param depotUuids which is now a listdriverIds query parameter is now called driverUuidsfrom query parameter is now called fromDateto query parameter is now called toDatedepotUuid and depotName alongside the previous operational plan properties.v2/operational-plan/{depotId}) has been removed. Instead their is only the v2/operational-plan endpoint and specific depots can be requested using a depotUuids query parameter on the request.summary is removed in v2 (OPS-8757). Therefore:destination.originStop and destination.originDepot are completely removed in v2/operational-planoriginStopName, originStopId, originStopLabel, originDepotName, originDepotId and originDepotLabel (and the equivalent for destination) are moved up to the task/block level.v1/operational-plan/{depotId} (and v2/operational-plan), added originStopName, originStopId, originStopLabel, originDepotName, originDepotId and originDepotLabel to the duty and block summary (and the equivalent for destination) (OPS-8539)