Getting the first optimization going with Integration API
The Integration API offers a swift and straightforward method for initiating initial optimization and retrieving assignments for vehicles, which comprises vehicle polylines that can be visualized in the UI.
Workflow options
Regardless of the chosen workflow, the API calls for implementation remain the same. However, the sequence will differ.
With blank simulation template
The blank simulation template does not include any order, vehicle, or driver data. It is essentially an empty simulation container with predefined settings that are tailored to the specific customer's use case. These use cases may include point-to-point deliveries, enabled driver breaks, on-demand ad hoc orders, and support for multiple pickups and drop-offs.
The workflow may look like this:
In this case, a simulation is created for each optimization run. Similarly, all orders and vehicles are uploaded each time a simulation is created. Nonetheless, simulation settings are automatically applied on simulation creation, based on the simulation template.
This simplified workflow encompasses general optimization scenarios but excludes the dynamic insertion of orders, manual order adjustments, and more intricate scenarios. Additionally, SWAT Routes and SWAT Driver do not currently support a workflow that involves the creation and deletion of simulations for each simulation run. Instead, they utilize a single simulation for an entire day of operations, facilitating more advanced order management and route optimization scenarios.
With predefined fleet
In this case, a simulation template will already contain fleet that has been pre-configured, but can be updated for each simulation run. Orders are uploaded each time the simulation is created.
The workflow may look like this:
Prerequisites
- Pre-created project by the SWAT team. Project ID should be known for the API workflow to work.
- Pre-created simulation template by the SWAT team. Simulation ID should be known for the API workflow to work.
- User credentials created by the SWAT team to call the APIs and it has write access to simulations in the project. Configure authentication as
basic - Map deployed by the SWAT team for the region where the sample operations will run.
- A few sample orders along with a few vehicles.
Each order must have:
- Location of pickup and drop off (in WGS84)
- Pick up and drop off time windows for all locations
- Sample definitions goods\items for delivery (referred as
demand) - Service times are the times required to execute drop off and pickup. A value of zero indicates that drop off or pickup occurs instantaneously.
If customer master Operations Location is used, then orders can be created using booking fields pickup_operations_location_external_id and dropoff_operations_location_external_id from Integration API that will automatically apply information such as location, timewindows and metada from the related Operations Location. This happens only once on booking creation.
Each vehicle must have:
- Capacity defined by matching with the order
demand - Assigned vehicle routing profile that is used for routing purposes
This scenario depicts an operational model where operations are meticulously planned before deploying vehicles. Upon assignment, routes are made available to vehicles, enabling them to commence live operations and execute deliveries. The scenario assumes a centralized warehouse for all pickups and designates two delivery locations for the goods. Notably, there are two vehicles available to deliver orders, each catering to distinct demand types.
Sequence to get the first workflow going
The simplest workflow involves three API requests:
- (Optional) Create vehicles in the simulation template if they weren't precreated beforehand.
- Upload bookings and automatically create a simulation for the day of operations.
- Retrieve optimization results, including order assignments and route polylines.
Example requests are available in Postman collection
Some responses in the examples are lengthy; you can select only the fields necessary for your workflow and exclude the rest using the only_fields query extension.
(Optional) Create or update vehicles for a simulation in a simulation template
To understand what the simulation template is, reference explanation is provided here
To create vehicles, /api/v2/vehicle API can be used. In the example below we will create two vehicles with the minimal required set of parameters, and two types of demand, specifically fruit and animal
See JSON payload
POST {{base_url}}/api/v2/vehicle
{
"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e96978", // Unique vehicle identifer provided by the requesting application. This UID must bne unique within a simulation, vehicle also has a global unique ID in "id" property
"capacity": {
"fruit": 10 // Set capacity of the vehicle, in this case 10 items of fruit
},
"simulation": "/api/v2/simulation/{{simulation_id}}", // Simulation this vehicle belongs to. Can be a simulation template or a real operations simulation
"lat": 0, // Current vehicle location. If unknown, set to 0
"lon": 0, // Current vehicle location. If unknown, set to 0
"speed": 0, // Current vehicle speed. If unknown, set to 0
"routing_engine_settings": { // Routing provider that the vehicle should be using
"key": "{{routing_key}}", // This is provided by SWAT team
"url": "http://mapbox-osrm-proxy",
"curb": true,
"speed": null,
"profile": "van", // Routing profile that the vehicle should be using
"time_factor": 1,
"road_network": "van",
"make_depot_zero": true,
"intermediate_curb": true,
"mapmatcher_radius": "15",
"routing_engine_name": "osrme"
}
}
{
"agent_id": "2b1e3b65-2c04-4fa2-a2d7-567901e96978", // Unique vehicle identifer provided by the requesting application. This UID must bne unique within a simulation, vehicle also has a global unique ID in "id" property
"capacity": {
"fruit": 10, // Set capacity of the vehicle, in this case 10 items of fruit and 10 animals so the total capacity of the vehicle is 20 units
"animal": 10
},
"simulation": "/api/v2/simulation/{{simulation_id}}", // Simulation this vehicle belongs to. Can be a simulation template or a real operations simulation
"lat": 0, // Current vehicle location. If unknown, set to 0
"lon": 0, // Current vehicle location. If unknown, set to 0
"speed": 0, // Current vehicle speed. If unknown, set to 0
"routing_engine_settings": { // Routing provider that the vehicle should be using
"key": "{{routing_key}}", // This is provided by SWAT team
"url": "http://mapbox-osrm-proxy",
"curb": true,
"speed": null,
"profile": "van", // Routing profile that the vehicle should be using
"time_factor": 1,
"road_network": "van",
"make_depot_zero": true,
"intermediate_curb": true,
"mapmatcher_radius": "15",
"routing_engine_name": "osrme"
}
}
The response includes the full vehicle model with its globally unique ID in the id field and the local unique UID in the uid field.
(Optional) Create a simulation instance
If there is a need to separate simulation creation from a template with order uploading (for example, to manually adjust vehicles or some simulation settings), it is possible to create a simulation instance before bookings are uploaded and avoid the automatic creation of the simulation. It also allows you to explicitly choose a simulation template to be used when creating a simulation instance, as well as explicitly prevent vehicles from the template from being copied over (for example, if that day of operations would be expected to have a completely different fleet composition). The following API can be used:
POST {{base_url}}/api/v2/microservices/simulation_template_instance
If a simulation has already been explicitly created, you can upload the order using the POST {{base_url}}/api/v2/microservices/logisticsapi endpoint without setting the simulation_clone_parameter parameter and instead use the "Upload into existing simulation" mode of the booking upload API.
Uploading sample orders and running the optimization
For the example, we will create two orders (one for animals and another for fruit) using the default template with vehicles created in the previous request. A default pipeline for logistics operations will be used for optimization purposes. It is configured to support only star-like routes with only a single trip per vehicle (so the vehicle can visit the warehouse only once).
The /api/v2/microservices/logisticsapi endpoint in simulation_clone mode defines a simulation using start_time and end_time. When using simulation_clone_parameters to upload orders (instead of adding to an existing simulation), a unique start_time/end_time pair creates a new simulation. To add orders to the same simulation across multiple requests, use the same start_time/end_time pair; otherwise, each request creates a new simulation.
See JSON payload
POST {{base_url}}/api/v2/microservices/logisticsapi
{
"simulation_clone_parameters": {
"start_time": "{{date_of_service}}T00:00:00+07:00", // Date of operations. Typically, the earliest time for the operations to start. This time will be used to automaticall select a matching simulation template based on the templating rules.
"end_time": "{{date_of_service}}T12:00:00+07:00", // Date of operations. Typically, the latest time for the operations to stop
"project_id": {{project_id}} // Project these orders belong to
},
"bookings": [
{
"uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde63", //Order uid. This UID must be unique withint a simulation. Irder also has a globally unisue identifier that is automatically generated in the property 'id'
"demand": {
"fruit": 1 // The order requires 1 fruit to be moved
},
"pickup_location_name": "Hub",
"pickup_location_lat": 1.3228751960077858, // Location where the order is expected to be picked up
"pickup_location_lon": 103.89996384867766,
"min_pickup_time": "{{date_of_service}}T00:00:00+07:00", // Pickup location time window (earliest and the latest)
"max_pickup_time": "{{date_of_service}}T23:00:00+07:00",
"pickup_service_time": 0, // Pickup service time, i.e. time required to do the pickup in seconds
"dropoff_location_name": "Grocery shop",
"dropoff_location_lat": 1.3238751960077858, // Location where the order should be dropped off
"dropoff_location_lon": 103.78996384867766,
"min_dropoff_time": "{{date_of_service}}T00:00:00+07:00", // Drop off location time window (ealiest and latest)
"max_dropoff_time": "{{date_of_service}}T23:00:00+07:00",
"dropoff_service_time": 300 //Drop off service time300 seconds or 5 minutes
},
{
"uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde66", //UUID generate version 4 (customer generated)
"demand": {
"animal": 11 // Order requires to carry 11 animal. Note, that in the example maximum capacity of a vehicle that is able to carry animals is only 10
},
"pickup_location_name": "Hub",
"dropoff_location_name":"Pet store",
"pickup_location_lat": 1.3228751960077858, // Location where the order is expected to be picked up, same as for the previous order
"pickup_location_lon": 103.89996384867766,
"min_pickup_time": "{{date_of_service}}T00:00:00+07:00", // Pickup time window for the order. In this example drop off lat\lon is not known and it will be retrieved from address using geocoding. Geocoding providerf has to br configured for a project for a featyure to work.
"max_pickup_time": "{{date_of_service}}T23:00:00+07:00",
"pickup_service_time": 0, // Pickup service time.
"min_dropoff_time": "{{date_of_service}}T00:00:00+07:00", // Drop off time window
"max_dropoff_time": "{{date_of_service}}T23:00:00+07:00",
"dropoff_service_time": 300, //300 seconds or 5 minutes.
"data": {
"external_id": "EXSS2407120009254", // Customer provided order ID
"customer_name": "Best customer",
"customer_phone": "956123123123",
"dropoff_customer_name": "Customer to deliver to",
"dropoff_customer_phone": "2434234234234",
"dropoff_address": "7 Scotts Road, #03-01 Goldbell Towers, Singapore, 228233", // Address to deliver the animals to. Geocoding threshold is set to be of 0.99 quality, otherwise the request will fail with "bookings have no coordinates information" error.
"remarks": "s60"
}
}
]
}
When dealing with Singaporean addresses, you can use a unique postal code instead of the complete address unless a unit number is necessary. For example, for a booking model for dropoff location:
{
...
"dropoff_postal_code":"819642",
"data": {
...
"dropoff_customer_name": "Customer to deliver to",
"dropoff_customer_phone": "2434234234234",
}
}
...
The request will return something like this:
See JSON payload
{
"processor_id": 48401,
"simulation_id": 144390,
"booking_ids": [
6172695,
6172696
]
}
All bookings were successfully processed and uploaded in the simulation. The list of IDs in the response corresponds to unique global identifiers for the bookings created. If a new simulation was created, the response will also return a unique identifier for the simulation.
Running an optimization
Optimization can be triggered with a single request, or, alternatively automatically on booking upload. Refer documentation and optimization call documentation
Now allow for a few minutes for the optimization to execute.
Current status of the optimization can be polled by retrieving the simulation processor state.
Getting the results
In this example, we can observe that an order with the UID aa082b4c-e8b3-4caf-a9f2-aba007bdde66 cannot be executed by any vehicle because 11 animals will not fit into either of them. Consequently, we should expect one booking to be assigned to a vehicle, while the other one will not be assigned (referred to as a no-offer situation in SWAT APIs). Let's retrieve booking state:
GET {{base_url}}/api/v2/vehicle/{{vehicle_id}}/assigned_nodes
which will return a list of assigned nodes ofr the vehicle. Use vehicle_id from the response of the request used to create the vehicles, or, alternatively, get simulation vehicle list using example by filtering with simulation from the previous request.
Each booking consists of at least two nodes, interpreted as waypoints where goods are picked up and dropped off.
Example response will look like this:
See JSON for the first vehicle
{
"objects": [
{
"allow_jump": false,
"arrived_to_location_ts": null,
"assigned_vehicle": "/api/v2/vehicle/1800897",
"assignment_order": 0,
"boarding_pass": "424",
"booking": "/api/v2/booking/6172702",
"booking_group_uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde63",
"booking_uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde63",
"cancelled_at_ts": null,
"close_time_ts": "2025-01-30T16:00:00+00:00",
"close_time_ts_dynamic": "2025-01-30T16:00:00+00:00",
"completed_service_at": null,
"created_at": "2025-01-30T03:45:39.964766+00:00",
"customer_id": null,
"data": {},
"demand": {
"fruit": 1
},
"departed_at_ts": null,
"display_name": "Hub",
"dropoff_ticket": null,
"dropoff_tickets": [],
"dynamic_break": null,
"end_of_trip": null,
"estimated_arrival_time": null,
"estimated_earliest_arrival_ts": null,
"estimated_scheduled_ts": null,
"external_id": null,
"failed_to_deliver_at_ts": null,
"finalization_type": "min",
"fixed_route_is_unreachable": false,
"fixed_route_journey_time": null,
"fixed_route_ride_time": null,
"fixed_route_wait_time": null,
"fixed_route_walk_time": null,
"geofence_id": null,
"geofence_ids": [],
"groups": [],
"h3": "0040062446531011063323",
"id": 12022546,
"initial_close_time_ts": null,
"initial_close_time_ts_dynamic": null,
"initial_max_trip_duration": null,
"initial_open_time_ts": null,
"is_invalidated": null,
"lat": 1.3228751960077858,
"lifo_order_check": false,
"lifo_order_penalty": null,
"location_code": "",
"location_name": "Hub",
"lon": 103.89996384867766,
"matrix_timestamp": null,
"max_slack": null,
"max_trip_duration": 82800,
"min_trip_duration": null,
"modified_at": "2025-01-30T03:46:11.337823+00:00",
"node_type": "pickup",
"offer_should_be_auto_accepted": null,
"open_time_ts": "2025-01-29T17:00:00+00:00",
"open_time_ts_dynamic": null,
"operations_location": null,
"partial_route_index": null,
"passenger_count": 0,
"penalty": 10000000,
"pickup_tickets": [],
"processing_order_timestamp": null,
"ready_to_board_at": null,
"resource_uri": "/api/v2/node/12022546",
"scheduled_ts": "2025-01-29T17:00:00+00:00",
"service_time": 0,
"simulation": "/api/v2/simulation/144390",
"slack": 0,
"started_service_at_ts": null,
"status": "assigned",
"ticket": null,
"time_windows": null,
"transfer_type": "depart_at",
"transit_stop": null,
"trip_cost": 0,
"uid": "dbb29e73-a4da-4554-b4be-4f3af8833653",
"user_accepted_offer_at": null,
"vehicle_characteristics": {},
"vehicle_labels": null,
"visited_at_ts": null,
"walking_distance_to_node": 0,
"walking_time_to_node": 0,
"weight": null
},
{
"allow_jump": false,
"arrived_to_location_ts": null,
"assigned_vehicle": "/api/v2/vehicle/1800897",
"assignment_order": 1,
"boarding_pass": "807",
"booking": "/api/v2/booking/6172702",
"booking_group_uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde63",
"booking_uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde63",
"cancelled_at_ts": null,
"close_time_ts": "2025-01-30T16:00:00+00:00",
"close_time_ts_dynamic": "2025-01-30T16:00:00+00:00",
"completed_service_at": null,
"created_at": "2025-01-30T03:45:39.964963+00:00",
"customer_id": null,
"data": {},
"demand": {
"fruit": -1
},
"departed_at_ts": null,
"display_name": "Grocery shop",
"dropoff_ticket": null,
"dropoff_tickets": [],
"dynamic_break": null,
"end_of_trip": null,
"estimated_arrival_time": null,
"estimated_earliest_arrival_ts": null,
"estimated_scheduled_ts": null,
"external_id": null,
"failed_to_deliver_at_ts": null,
"finalization_type": "min",
"fixed_route_is_unreachable": false,
"fixed_route_journey_time": null,
"fixed_route_ride_time": null,
"fixed_route_wait_time": null,
"fixed_route_walk_time": null,
"geofence_id": null,
"geofence_ids": [],
"groups": [],
"h3": "0040062440663041621652",
"id": 12022547,
"initial_close_time_ts": null,
"initial_close_time_ts_dynamic": null,
"initial_max_trip_duration": null,
"initial_open_time_ts": null,
"is_invalidated": null,
"lat": 1.3238751960077857,
"lifo_order_check": false,
"lifo_order_penalty": null,
"location_code": "",
"location_name": "Grocery shop",
"lon": 103.78996384867766,
"matrix_timestamp": null,
"max_slack": null,
"max_trip_duration": 82800,
"min_trip_duration": null,
"modified_at": "2025-01-30T03:46:11.349609+00:00",
"node_type": "dropoff",
"offer_should_be_auto_accepted": null,
"open_time_ts": "2025-01-29T17:00:00+00:00",
"open_time_ts_dynamic": null,
"operations_location": null,
"partial_route_index": null,
"passenger_count": 0,
"penalty": 10000000,
"pickup_tickets": [],
"processing_order_timestamp": null,
"ready_to_board_at": null,
"resource_uri": "/api/v2/node/12022547",
"scheduled_ts": "2025-01-29T17:26:25.700000+00:00",
"service_time": 300,
"simulation": "/api/v2/simulation/144390",
"slack": 0,
"started_service_at_ts": null,
"status": "assigned",
"ticket": null,
"time_windows": null,
"transfer_type": "depart_at",
"transit_stop": null,
"trip_cost": 0,
"uid": "fa45e483-5099-4e83-b83e-5961098eaced",
"user_accepted_offer_at": null,
"vehicle_characteristics": {},
"vehicle_labels": null,
"visited_at_ts": null,
"walking_distance_to_node": 0,
"walking_time_to_node": 0,
"weight": null
}
]
}
See JSON for the second vehicle
{
"objects": []
}
As anticipated, the second vehicle was not assigned any nodes. The vehicle that was assigned nodes also has a sequence of nodes to visit along with their scheduled arrival time in the scheduled_ts field.
You can also retrieve the status of bookings after optimization using get booking request and using the simulation ID as a filter. It will return an output similar to the following:
See JSON for a simulation
{
"meta": {
"has_more": false,
"limit": 20,
"next": null,
"offset": 0,
"previous": null,
"total_count": 2
},
"objects": [
{
"actual_dropoff_time": null,
"actual_journey_duration": null,
"actual_pickup_time": null,
"air_distance": 12242.399071517626,
"booking_type": "customer",
"cancellation_time": null,
"completed_by": null,
"created_at": "2025-01-30T03:45:39.946605+00:00",
"created_by": null,
"customer_id": "",
"data": {},
"demand": {
"fruit": 1
},
"dropoff_location_lat": 1.3238751960077857,
"dropoff_location_lon": 103.78996384867766,
"dropoff_location_name": "Grocery shop",
"dropoff_service_time": 300,
"dropoff_stops": {
"points": []
},
"dropoff_time_windows": null,
"fail_to_board_time": null,
"failed_to_deliver_at_ts": null,
"fixed_journey_duration": null,
"fixed_route_type": null,
"fixed_waiting_time": null,
"geofence_definition_strategy": null,
"group_booking_id": null,
"group_uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde63",
"groups": [],
"id": 6172702,
"is_invalidated": false,
"journey_duration_difference": null,
"lifo_order_check": false,
"lifo_order_penalty": null,
"max_dropoff_time": "2025-01-30T16:00:00+00:00",
"max_pickup_time": "2025-01-30T16:00:00+00:00",
"max_trip_duration": 82800,
"min_dropoff_time": "2025-01-29T17:00:00+00:00",
"min_pickup_time": "2025-01-29T17:00:00+00:00",
"min_trip_duration": null,
"modified_at": "2025-01-30T03:46:11.234731+00:00",
"odbs_waiting_time": null,
"offer_should_be_auto_accepted": null,
"passenger_payment_method_id": null,
"payment_method_type": null,
"penalty": 10000000,
"pickup_location_lat": 1.3228751960077858,
"pickup_location_lon": 103.89996384867766,
"pickup_location_name": "Hub",
"pickup_service_time": 0,
"pickup_stops": {
"points": []
},
"pickup_time_windows": null,
"planned_dropoff_time": null,
"planned_journey_duration": null,
"planned_pickup_time": null,
"project": "/api/v2/project/808",
"public_transit_transport": null,
"ready_to_board_at": null,
"requested_at": "2025-01-30T03:45:39.724480+00:00",
"requested_tickets": null,
"resource_uri": "/api/v2/booking/6172702",
"service_time": 0,
"sim_tier": null,
"simulation": "/api/v2/simulation/144390",
"state": "assigned",
"transfer_type": "depart_at",
"trip_cost": 0,
"uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde63",
"user_accepted_offer_at": null,
"vehicle_characteristics": {},
"vehicle_labels": null,
"waiting_time_difference": null
},
{
"actual_dropoff_time": null,
"actual_journey_duration": null,
"actual_pickup_time": null,
"air_distance": 7701.526328750747,
"booking_type": "customer",
"cancellation_time": null,
"completed_by": null,
"created_at": "2025-01-30T03:45:39.946605+00:00",
"created_by": null,
"customer_id": "",
"data": {
"customer_name": "Best customer",
"customer_phone": "956123123123",
"dropoff_address": "7 Scotts Road, #03-01 Goldbell Towers, Singapore, 228233",
"dropoff_customer_name": "Customer to deliver to",
"dropoff_customer_phone": "2434234234234",
"dropoff_location_variants": [
{
"address": "21-07 Scotts Rd, #03 01, Singapore 228208",
"kind": "GoogleV3",
"lat": 1.30847,
"lon": 103.832258,
"score": 1
}
],
"external_id": "EXSS2407120009254",
"remarks": "s60"
},
"demand": {
"animal": 11
},
"dropoff_location_lat": 1.30847,
"dropoff_location_lon": 103.832258,
"dropoff_location_name": "21-07 Scotts Rd, #03 01, Singapore 228208",
"dropoff_service_time": 300,
"dropoff_stops": {
"points": []
},
"dropoff_time_windows": null,
"fail_to_board_time": null,
"failed_to_deliver_at_ts": null,
"fixed_journey_duration": null,
"fixed_route_type": null,
"fixed_waiting_time": null,
"geofence_definition_strategy": null,
"group_booking_id": null,
"group_uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde66",
"groups": [],
"id": 6172703,
"is_invalidated": false,
"journey_duration_difference": null,
"lifo_order_check": false,
"lifo_order_penalty": null,
"max_dropoff_time": "2025-01-30T16:00:00+00:00",
"max_pickup_time": "2025-01-30T16:00:00+00:00",
"max_trip_duration": 82800,
"min_dropoff_time": "2025-01-29T17:00:00+00:00",
"min_pickup_time": "2025-01-29T17:00:00+00:00",
"min_trip_duration": null,
"modified_at": "2025-01-30T03:46:11.277891+00:00",
"odbs_waiting_time": null,
"offer_should_be_auto_accepted": null,
"passenger_payment_method_id": null,
"payment_method_type": null,
"penalty": 10000000,
"pickup_location_lat": 1.3228751960077858,
"pickup_location_lon": 103.89996384867766,
"pickup_location_name": "Hub",
"pickup_service_time": 0,
"pickup_stops": {
"points": []
},
"pickup_time_windows": null,
"planned_dropoff_time": null,
"planned_journey_duration": null,
"planned_pickup_time": null,
"project": "/api/v2/project/808",
"public_transit_transport": null,
"ready_to_board_at": null,
"requested_at": "2025-01-30T03:45:39.724480+00:00",
"requested_tickets": null,
"resource_uri": "/api/v2/booking/6172703",
"service_time": 0,
"sim_tier": null,
"simulation": "/api/v2/simulation/144390",
"state": "rejected_by_system",
"transfer_type": "depart_at",
"trip_cost": 0,
"uid": "aa082b4c-e8b3-4caf-a9f2-aba007bdde66",
"user_accepted_offer_at": null,
"vehicle_characteristics": {},
"vehicle_labels": null,
"waiting_time_difference": null
}
]
}
Note the current states of bookings: one of the bookings has state rejected_by_system and the other one is assigned which means that the rejected booking couldn't be assigned to any of the provided vehicles.
Retrieving Vehicle Polyline
SWAT Optimization engine uses the SWAT Routing API by default, which is built upon extended OSM maps and supports predictive routing. This engine may produce routes that differ from those generated by other engines depending on the settings used. To maintain consistency between scheduled times and actual routes during optimization, we recommend leveraging the SWAT Routing API to generate the actual route and provide turn-by-turn navigation, if necessary.
SWAT API provide a proxy API that saves time to produce a route based on assigned sequence to a vehicle and automatically applying vehicle routing profile used during optimization.
GET {{base_url}}/vehicle_route_proxy/{{vehicle_id}}/103.89996384867766,1.3228751960077858;103.78996384867766,1.3238751960077857
See route for the vehicle
{
"code": "Ok",
"waypoints": [
{
"name": "Eunos Avenue 6",
"hint": "aXgCgP___3-FAAAA3gAAAAAAAABfAAAAvHCNQhpDr0EAAAAAPWcdQoUAAADeAAAAAAAAAF8AAABfCwAAbGMxBowuFAA8YzEGey8UAAAALxA_KfUU",
"distance": 26.960249,
"location": [
103.900012,
1.322636
]
},
{
"name": "Sixth Avenue",
"hint": "V1IBgJNSAYAEAAAAMgAAAAAAAAAcAAAAaqiKQA_raEIAAAAASvECQgQAAAAyAAAAAAAAABwAAABfCwAA-LovBuAvFACMtS8GYzMUAAAADwI_KfUU",
"distance": 183.69019,
"location": [
103.791352,
1.322976
]
}
],
"routes": [
{
"geometry": "wgvoAwupdeEjEx`@nyBsWbrA~}Kgw@tVfOzoAsfC|\\uVbh@fWptIpaCnrItChwDubAhtBw{Kj~IisDjpMpyAfbIgZ`mZlfFv{Qg`AtpEzOlcDc}CtxEw}HhzTurGpcJ~U~yGjzAhnDnfJthAkXbqC~kObcG",
"weight": 1266.8,
"distance": 14877.1,
"duration": 1266.8,
"weight_name": "routability",
"legs": [
{
"summary": "",
"distance": 14877.1,
"duration": 1266.8,
"weight": 1266.8,
"steps": []
}
]
}
],
"uuid": "2df1c2ba-b80a-4f26-bf64-3b4ae9019185"
}
Alternatively, the current vehicle route can be retrieved from the vehicle itself which includes
points array representing a list of turns the vehicle is expected to make representing its route, and path which is a encoded polyline with 6-bit precision.
GET {{base_url}}/api/v2/vehicle/{{vehicle_id}}
See JSON the first vehicle
{
"agent_id": "b3e13a1c-fd97-4a94-b064-b92caa547643",
"amortized_linear_cost_factor": null,
"amortized_quadratic_cost_factor": null,
"assigned_nodes_protection_interval": null,
"assigned_nodes_protection_max_locations": null,
"assignment": null,
"bearing": 0,
"capacity": {
"fruit": 10
},
"characteristics": {},
"color": "#65BCFF",
"created_at": "2025-01-30T02:21:04.576087+00:00",
"current_route": {
"points": [
[
1.322636,
103.900012
],
[
1.322597,
103.899819
],
[
1.322543,
103.899522
],
[
1.322534,
103.899471
],
[
1.322179,
103.89954
],
[
1.32192,
103.899592
],
[
1.321749,
103.899628
],
[
1.321654,
103.899647
],
[
1.321562,
103.899665
],
[
1.321445,
103.899687
],
[
1.321124,
103.899758
],
[
1.320952,
103.899791
],
[
1.320574,
103.899865
],
[
1.320562,
103.899804
],
[
1.320418,
103.899081
],
[
1.320336,
103.898672
],
[
1.320272,
103.898354
],
[
1.320208,
103.898039
],
[
1.320142,
103.897716
],
[
1.320123,
103.897619
],
[
1.320106,
103.897537
],
[
1.32003,
103.897161
],
[
1.320006,
103.897045
],
[
1.319866,
103.896323
],
[
1.319856,
103.896269
],
[
1.31985,
103.896243
],
[
1.319724,
103.895647
],
[
1.319649,
103.89529
],
[
1.319527,
103.894689
],
[
1.319412,
103.894124
],
[
1.319371,
103.893924
],
[
1.319319,
103.89364
],
[
1.319266,
103.893339
],
[
1.319261,
103.89331
],
[
1.319244,
103.893225
],
[
1.319531,
103.893159
],
[
1.31995,
103.893069
],
[
1.320088,
103.892952
],
[
1.320106,
103.892919
],
[
1.320144,
103.892846
],
[
1.320171,
103.892722
],
[
1.32012,
103.892474
],
[
1.320065,
103.89224
],
[
1.319945,
103.891794
],
[
1.319922,
103.891709
],
[
1.319884,
103.891552
],
[
1.319998,
103.891525
],
[
1.320071,
103.891509
],
[
1.320572,
103.891399
],
[
1.321174,
103.89127
],
[
1.321667,
103.891155
],
[
1.322054,
103.891073
],
[
1.322177,
103.890981
],
[
1.322283,
103.890867
],
[
1.322368,
103.890733
],
[
1.322419,
103.890578
],
[
1.322433,
103.890415
],
[
1.32242,
103.890252
],
[
1.322369,
103.889908
],
[
1.322291,
103.889339
],
[
1.322182,
103.887666
],
[
1.322171,
103.887192
],
[
1.322142,
103.886344
],
[
1.322136,
103.886191
],
[
1.322135,
103.886162
],
[
1.322134,
103.886115
],
[
1.322129,
103.885974
],
[
1.322124,
103.885638
],
[
1.322065,
103.885071
],
[
1.322045,
103.88495
],
[
1.322019,
103.884819
],
[
1.321942,
103.88454
],
[
1.321563,
103.883561
],
[
1.321183,
103.882623
],
[
1.320967,
103.882085
],
[
1.320688,
103.881398
],
[
1.320305,
103.880467
],
[
1.32008,
103.879898
],
[
1.319996,
103.879662
],
[
1.319956,
103.879518
],
[
1.319932,
103.87941
],
[
1.319908,
103.879293
],
[
1.319867,
103.879058
],
[
1.319821,
103.878823
],
[
1.319769,
103.878392
],
[
1.319793,
103.877744
],
[
1.319812,
103.877021
],
[
1.319832,
103.876821
],
[
1.319881,
103.876569
],
[
1.319948,
103.876314
],
[
1.31997,
103.876254
],
[
1.320025,
103.876134
],
[
1.320101,
103.875979
],
[
1.320295,
103.875588
],
[
1.320367,
103.875469
],
[
1.320437,
103.875358
],
[
1.320523,
103.87523
],
[
1.320689,
103.875009
],
[
1.320757,
103.87493
],
[
1.320964,
103.874692
],
[
1.321222,
103.874462
],
[
1.322798,
103.873272
],
[
1.322871,
103.873198
],
[
1.322947,
103.873127
],
[
1.324579,
103.871891
],
[
1.325296,
103.871372
],
[
1.325562,
103.871179
],
[
1.326078,
103.870758
],
[
1.326304,
103.870542
],
[
1.326408,
103.870438
],
[
1.326598,
103.870249
],
[
1.32671,
103.87013
],
[
1.326874,
103.869945
],
[
1.326956,
103.86985
],
[
1.327167,
103.869583
],
[
1.327568,
103.86907
],
[
1.327948,
103.868496
],
[
1.328232,
103.86798
],
[
1.328491,
103.867382
],
[
1.328709,
103.866734
],
[
1.328958,
103.865911
],
[
1.328994,
103.865789
],
[
1.329028,
103.865679
],
[
1.329187,
103.865149
],
[
1.329571,
103.864207
],
[
1.329584,
103.864179
],
[
1.32975,
103.86384
],
[
1.329812,
103.863734
],
[
1.329898,
103.863571
],
[
1.329967,
103.863427
],
[
1.329996,
103.863367
],
[
1.330119,
103.863104
],
[
1.330231,
103.862838
],
[
1.330325,
103.862546
],
[
1.330368,
103.862362
],
[
1.330421,
103.86204
],
[
1.330435,
103.861955
],
[
1.330453,
103.861624
],
[
1.330451,
103.861254
],
[
1.330405,
103.86097
],
[
1.33035,
103.86075
],
[
1.330284,
103.860541
],
[
1.330232,
103.860376
],
[
1.330123,
103.860072
],
[
1.330079,
103.85995
],
[
1.32979,
103.85918
],
[
1.329711,
103.858968
],
[
1.329675,
103.858848
],
[
1.329514,
103.858344
],
[
1.329224,
103.857433
],
[
1.329093,
103.856975
],
[
1.329033,
103.856721
],
[
1.329004,
103.856452
],
[
1.329,
103.856043
],
[
1.329009,
103.855921
],
[
1.32903,
103.855652
],
[
1.329054,
103.855343
],
[
1.329209,
103.853234
],
[
1.329263,
103.852501
],
[
1.329277,
103.852348
],
[
1.329287,
103.852226
],
[
1.329443,
103.850419
],
[
1.329531,
103.849514
],
[
1.329582,
103.848833
],
[
1.329594,
103.848696
],
[
1.329641,
103.848165
],
[
1.329678,
103.847222
],
[
1.329691,
103.846506
],
[
1.329665,
103.846043
],
[
1.329654,
103.845866
],
[
1.329591,
103.84477
],
[
1.329576,
103.844503
],
[
1.329568,
103.844372
],
[
1.329528,
103.843524
],
[
1.329488,
103.842895
],
[
1.32944,
103.842403
],
[
1.329366,
103.841991
],
[
1.32929,
103.841733
],
[
1.329198,
103.841479
],
[
1.329032,
103.841063
],
[
1.328846,
103.840653
],
[
1.328651,
103.840271
],
[
1.328074,
103.839266
],
[
1.32775,
103.838739
],
[
1.327501,
103.838253
],
[
1.327293,
103.837754
],
[
1.327182,
103.837445
],
[
1.32712,
103.83725
],
[
1.326334,
103.834791
],
[
1.326301,
103.834688
],
[
1.326201,
103.834379
],
[
1.32602,
103.83381
],
[
1.325824,
103.833115
],
[
1.325768,
103.832914
],
[
1.325737,
103.832727
],
[
1.325721,
103.832483
],
[
1.32573,
103.832223
],
[
1.325771,
103.831973
],
[
1.325852,
103.831576
],
[
1.325957,
103.83136
],
[
1.326494,
103.83052
],
[
1.326706,
103.829879
],
[
1.326781,
103.829372
],
[
1.326785,
103.829231
],
[
1.326778,
103.829124
],
[
1.326762,
103.829026
],
[
1.326734,
103.828877
],
[
1.326653,
103.828314
],
[
1.326484,
103.827353
],
[
1.3265,
103.826967
],
[
1.326511,
103.826741
],
[
1.32653,
103.826658
],
[
1.326589,
103.826425
],
[
1.326701,
103.826128
],
[
1.326935,
103.825756
],
[
1.327324,
103.825288
],
[
1.32846,
103.824186
],
[
1.328722,
103.823822
],
[
1.329041,
103.823258
],
[
1.329379,
103.822564
],
[
1.330283,
103.820297
],
[
1.330561,
103.819757
],
[
1.330676,
103.819547
],
[
1.331059,
103.818865
],
[
1.331091,
103.818712
],
[
1.331117,
103.818601
],
[
1.331154,
103.818504
],
[
1.331202,
103.818403
],
[
1.331365,
103.818061
],
[
1.331484,
103.817763
],
[
1.33149,
103.817616
],
[
1.331469,
103.817489
],
[
1.331411,
103.817305
],
[
1.33129,
103.817049
],
[
1.331232,
103.816887
],
[
1.331191,
103.816714
],
[
1.331194,
103.816252
],
[
1.33116,
103.815967
],
[
1.331095,
103.815818
],
[
1.331015,
103.815725
],
[
1.330915,
103.815617
],
[
1.330577,
103.815407
],
[
1.330253,
103.815209
],
[
1.330135,
103.815129
],
[
1.330018,
103.815048
],
[
1.329858,
103.814941
],
[
1.329821,
103.814916
],
[
1.329668,
103.814812
],
[
1.329533,
103.814722
],
[
1.32906,
103.814403
],
[
1.328789,
103.81427
],
[
1.328663,
103.814217
],
[
1.328551,
103.814175
],
[
1.328424,
103.814133
],
[
1.328275,
103.814091
],
[
1.328082,
103.814047
],
[
1.327954,
103.814019
],
[
1.327704,
103.813983
],
[
1.32745,
103.81396
],
[
1.326885,
103.813924
],
[
1.326144,
103.813853
],
[
1.325204,
103.813762
],
[
1.324881,
103.813715
],
[
1.324555,
103.813646
],
[
1.324298,
103.813584
],
[
1.324132,
103.813552
],
[
1.323233,
103.813366
],
[
1.322227,
103.813191
],
[
1.322046,
103.813144
],
[
1.321821,
103.813064
],
[
1.321693,
103.813002
],
[
1.321538,
103.812903
],
[
1.321312,
103.812719
],
[
1.320805,
103.812273
],
[
1.320479,
103.811971
],
[
1.320281,
103.811773
],
[
1.320078,
103.811544
],
[
1.319977,
103.811411
],
[
1.31984,
103.81118
],
[
1.319587,
103.810712
],
[
1.319308,
103.810107
],
[
1.319233,
103.809942
],
[
1.319125,
103.809719
],
[
1.319,
103.809519
],
[
1.318958,
103.80944
],
[
1.318921,
103.809386
],
[
1.318778,
103.809199
],
[
1.318035,
103.808365
],
[
1.31725,
103.807516
],
[
1.317194,
103.807454
],
[
1.317139,
103.807394
],
[
1.317068,
103.80732
],
[
1.317012,
103.807258
],
[
1.316961,
103.807202
],
[
1.316654,
103.80688
],
[
1.316513,
103.806736
],
[
1.316192,
103.806359
],
[
1.316034,
103.80619
],
[
1.315751,
103.805891
],
[
1.315682,
103.80582
],
[
1.315315,
103.805441
],
[
1.315088,
103.805227
],
[
1.315064,
103.805202
],
[
1.315035,
103.805179
],
[
1.315008,
103.805157
],
[
1.314882,
103.805051
],
[
1.314593,
103.804854
],
[
1.31429,
103.804721
],
[
1.313997,
103.804603
],
[
1.313858,
103.804556
],
[
1.31373,
103.804509
],
[
1.313454,
103.804407
],
[
1.313306,
103.804355
],
[
1.313221,
103.804329
],
[
1.313054,
103.804269
],
[
1.312896,
103.804216
],
[
1.312554,
103.804181
],
[
1.312076,
103.804055
],
[
1.311834,
103.803993
],
[
1.311477,
103.803906
],
[
1.311332,
103.803868
],
[
1.311297,
103.803862
],
[
1.310982,
103.803778
],
[
1.310939,
103.803765
],
[
1.310898,
103.803754
],
[
1.310587,
103.803666
],
[
1.310672,
103.803371
],
[
1.310688,
103.803312
],
[
1.310788,
103.802938
],
[
1.310831,
103.802773
],
[
1.310926,
103.802423
],
[
1.310991,
103.80218
],
[
1.311058,
103.801932
],
[
1.311072,
103.801886
],
[
1.311102,
103.801782
],
[
1.311281,
103.801182
],
[
1.311339,
103.801018
],
[
1.311395,
103.80086
],
[
1.311445,
103.800745
],
[
1.311453,
103.800725
],
[
1.311469,
103.800688
],
[
1.311473,
103.800679
],
[
1.311525,
103.800557
],
[
1.311628,
103.800363
],
[
1.311652,
103.80032
],
[
1.311768,
103.800141
],
[
1.3119,
103.79996
],
[
1.311948,
103.799894
],
[
1.312059,
103.799719
],
[
1.312309,
103.799308
],
[
1.31251,
103.799007
],
[
1.312706,
103.798648
],
[
1.312762,
103.798535
],
[
1.312802,
103.798429
],
[
1.312835,
103.798319
],
[
1.312859,
103.79821
],
[
1.312876,
103.798084
],
[
1.31288,
103.797984
],
[
1.312876,
103.797884
],
[
1.312863,
103.797777
],
[
1.312834,
103.797639
],
[
1.312795,
103.797519
],
[
1.31269,
103.797282
],
[
1.312615,
103.797114
],
[
1.312568,
103.797007
],
[
1.312413,
103.796717
],
[
1.312249,
103.796415
],
[
1.312054,
103.796053
],
[
1.31203,
103.795971
],
[
1.312014,
103.795925
],
[
1.311992,
103.795813
],
[
1.311973,
103.795686
],
[
1.311954,
103.795528
],
[
1.311964,
103.795315
],
[
1.312002,
103.795104
],
[
1.312062,
103.794932
],
[
1.312145,
103.794767
],
[
1.312244,
103.794615
],
[
1.312457,
103.794339
],
[
1.312604,
103.794148
],
[
1.312906,
103.793733
],
[
1.313198,
103.793374
],
[
1.313264,
103.793268
],
[
1.313313,
103.79319
],
[
1.313332,
103.793152
],
[
1.313372,
103.793079
],
[
1.313396,
103.793032
],
[
1.313478,
103.79285
],
[
1.313529,
103.792703
],
[
1.313645,
103.792314
],
[
1.313819,
103.791788
],
[
1.313951,
103.791482
],
[
1.31424,
103.790894
],
[
1.314312,
103.79078
],
[
1.31442,
103.790597
],
[
1.314513,
103.790448
],
[
1.314708,
103.790219
],
[
1.314886,
103.790026
],
[
1.31501,
103.789889
],
[
1.315064,
103.78983
],
[
1.315328,
103.789593
],
[
1.315581,
103.789366
],
[
1.315857,
103.789086
],
[
1.316046,
103.788879
],
[
1.316495,
103.788331
],
[
1.316723,
103.788065
],
[
1.317239,
103.787487
],
[
1.317293,
103.787428
],
[
1.317428,
103.787526
],
[
1.317487,
103.787573
],
[
1.31752,
103.787599
],
[
1.317651,
103.787697
],
[
1.317793,
103.787788
],
[
1.318067,
103.787994
],
[
1.31828,
103.788139
],
[
1.318311,
103.78816
],
[
1.318338,
103.788178
],
[
1.318687,
103.788415
],
[
1.319328,
103.788852
],
[
1.319704,
103.78911
],
[
1.32026,
103.789495
],
[
1.320768,
103.789847
],
[
1.320954,
103.789968
],
[
1.321002,
103.789999
],
[
1.321193,
103.790128
],
[
1.321385,
103.790258
],
[
1.321607,
103.790411
],
[
1.322225,
103.790839
],
[
1.322763,
103.791214
],
[
1.322895,
103.7913
],
[
1.322943,
103.791331
],
[
1.322976,
103.791352
]
]
},
"current_sim_ts": "2025-01-30T04:38:23.528446+00:00",
"driver": null,
"dynamic_break_avg_time_between_breaks": null,
"dynamic_break_duration": null,
"dynamic_break_end_time": null,
"dynamic_break_max_latency": null,
"dynamic_break_min_path_duration": null,
"dynamic_break_start_time": null,
"efficiency": {
"constraints": null
},
"end_time": null,
"end_time_node_index": null,
"geofence_ids": [],
"gps_modified_at": null,
"h3": null,
"id": 1800897,
"in_use": "enabled",
"init_server_ts": null,
"is_invalidated": null,
"labels": {},
"last_assignment_ts": "2025-01-30T03:46:11.357036+00:00",
"lat": 0,
"lifo_order_check": false,
"lon": 0,
"max_dropoff_locations": null,
"max_physical_stops": null,
"max_pickup_locations": null,
"max_trip_duration": null,
"max_trip_length": null,
"modified_at": "2025-01-30T04:38:23.528446+00:00",
"number_of_trips": null,
"operations_location_groups": [],
"path": "wgvoAwupdeElA`KjBpQPdBdUiCdOgBtIgA|De@vDc@hFk@`SmCvIaArVsCVxB~Gdl@bDpX~BzR~BtRbCdSd@`E`@bDvCnVn@fFvGbl@RjBJr@zFfd@tChUrFpd@dFhb@pAnKfBvPhBxQHx@`@hD}PbCeYrDsGhFc@`AkApCu@vFdBnNlBrMnFzZl@hDjAxHcFt@qC^i^zEsd@`Gy]dFeWbDuFvDsEbFiDjGeBtH[dIXdIdBnTzCpb@xEpgBTr\\x@~s@JpH@x@@|AHxGH~StBlb@f@pFr@dGxClPtVd|@vVry@nLr`@lP|i@|Vdy@`Mpb@fDvMnA~Gn@vEn@hFpAtMzAtMfB|Yo@ng@e@dl@g@nKaBvNeC|Nk@vBmBnFwCtHcKlWoClFkC|EkD~FkIxLgC|C}KzMcOjMoaBjiAqCrCwClC_eBflAyk@l_@sO`Kg_@hYcMnLoEnE{JxJ_FlFgIpJcD|DeLtOaX`_@wVzb@wPf_@eOjd@sLng@qNlr@gArFcAzE}Hb`@_Wzy@Yv@kIdT{BrEkDdIiC~Gy@vBuFlO_FrO{DfQuAnJiBbS[hDc@tSBbVzAvPlBvLbC`LfBhIxE~QvArF`Qbo@|CfLfAnF`In^bQ|w@dGr[vBzNx@xOFpXQrFi@xOo@hRuHxbCkBxl@[pHSrFwH|oBoDpw@eBpi@WpG}Ad`@iA|y@Yvk@r@|[T`J|BncA\\tONdGnA~s@nAhf@~Av]rCvXvCbOvDzNjI~XrJrXdKzV`c@x}@fS|_@pNj]~Kd^|EhRzBdKbp@txC`AlEfEhRhJpb@fKlj@nBpK|@tJ^fNQfOqArNaDxWqEnLq`@ns@gL`g@uCt^GxGLtE^bEv@hH`Ddb@pI`{@_@bWUbMe@dDuBpM_FpQsMfViWf\\_fAzcAkOvU}Rfb@cTjj@ow@tlCkPv`@eFbL}Vri@_ApHs@|EiA`E_BhEeIjTmFrQKdHh@|FrBnJpF~NrBbIpAxIEz[bAxP`ChH~CxDfEvEbTbLfSjKjF~ChF`D~HtEhAp@pHnElGrDp\\|R|OhGzFhB~ErA|FrAhHrA`KvA~Fv@rNfAzNl@hb@fAhm@lCvy@tDdS|AjShC`OzBjI~@dw@rJz}@|IhJ|A`M~C~FzBtHdEbMnJt^zZjSzQjKjKtKhMhEhGpGlMxNf\\lPxd@tChIvE|LxFnKrA|ChAjB|GtJlm@bs@`p@`t@nBzBlBvBlCrCnBzBdBnBdRbSxG~G`SpVzHpItPtQhClC|UtVdMjLn@p@x@l@t@j@zFrE`QhK|QhGhQjFtG|A~F|AfPjEfHfBhDr@lIvBzHhBjTdAz\\zFbNzBhUlD`HjAdAJtRfDtAXpATlRnDiDlQ_@tBgEjVuAhI}DzTaCdNeCnN[zA{@nEeJnd@sBfIoBzHcBdFOf@_@hAGPgBrFmEbKo@tAgFdJgGhJ_BbC}E|IsNtXqKxQgKlUoB`FoArEaAzEo@xEa@zFGfEFfEXtEx@rGlAnFpExMtCnI|AtEtHbQfIzQdKrUn@bD^zAj@~Ed@|Fd@zHShLkAdLwBvIeDhIeEnHiLfPeH|J{Q|XgQlUcCrEaBzCe@jAoApCo@|AcDjJeBdHgFhW{Iz_@gGbRaQvc@oCbFwElJyDhHeKhMcJ`KwFpGkBtBoOxMyNdMgPnPyJ|Ka[fa@gMrOg_@bc@kBtBmGcEuB}AaAs@eGcE{GuDcP{KiLaH}@i@u@c@yTyMag@iZoVcOwa@aWw^_UsJqF_B}@}JaG_KcG{LqHse@wYs`@mVgGkD_B}@aAi@",
"physical_vehicle": null,
"previous_sim_ts": null,
"project": "/api/v2/project/808",
"registration_number": null,
"resource_uri": "/api/v2/vehicle/1800897",
"routing_engine_settings": {
"curb": true,
"intermediate_curb": true,
"key": "HTRMRRR7WRAEZFWP0LCBHWXN31FN7RJF4YDIYVUXAS1O7KZK01CG92CRD3SOFYKF",
"make_depot_zero": true,
"mapmatcher_radius": "15",
"profile": "van",
"road_network": "van",
"routing_engine_name": "osrme",
"speed": null,
"time_factor": 1,
"url": "http://mapbox-osrm-proxy"
},
"server_ts": "2025-01-30T03:34:12.923470+00:00",
"service_number": null,
"should_reach_at": null,
"should_reach_for": null,
"should_wait_until": null,
"sim_enable_gps_noise": false,
"sim_gps_noise_distance": 1,
"simulation": "/api/v2/simulation/144390",
"simulation_step_pause": 1,
"simulation_time_speedup_factor": 1,
"speed": 0,
"start_time": null,
"start_time_node_index": null,
"status": "idle",
"traffic_sim_dependency_function": {},
"ts": null,
"vehicle_cost": null,
"zero_cost_if_only_partial_routes": null
}
Tear down
To delete the simulation, use the following request :
DELETE {{base_url}}/api/v2/simulation/{simulation_id}