A truck and a barge from one port
Utrecht and Eindhoven are road only. The steel is too heavy for the truck, and Duisburg is on the water, so it goes by barge. Note the truck reaching Eindhoven as the time window opens.
curl -X POST "https://api.app.transportial.com/api/vrp/solve" \
-H "x-api-key: $TRANSPORTIAL_KEY" \
-H "x-api-secret: $TRANSPORTIAL_SECRET" \
-H "Content-Type: application/json" \
-d @request.json{
"locations": [
{ "id": "rotterdam", "lat": 51.9244, "lon": 4.4777, "transportModes": ["inlandWaterway"] },
{ "id": "duisburg", "lat": 51.4344, "lon": 6.7623, "transportModes": ["inlandWaterway"] },
{ "id": "utrecht", "lat": 52.0907, "lon": 5.1214, "transportModes": [] },
{ "id": "eindhoven", "lat": 51.4416, "lon": 5.4697, "transportModes": [] }
],
"vehicles": [
{ "id": "truck-1", "startLocationId": "rotterdam", "capacity": { "weightKg": 24000 } },
{ "id": "barge-1", "startLocationId": "rotterdam", "transportMode": "inlandWaterway", "capacity": { "weightKg": 2000000 } }
],
"shipments": [
{
"id": "pallets-utrecht",
"pickup": { "locationId": "rotterdam", "serviceSeconds": 900 },
"delivery": { "locationId": "utrecht", "serviceSeconds": 900 },
"load": { "weightKg": 8000 }
},
{
"id": "pallets-eindhoven",
"pickup": { "locationId": "rotterdam", "serviceSeconds": 900 },
"delivery": {
"locationId": "eindhoven",
"serviceSeconds": 900,
"timeWindows": [{ "start": "2026-11-10T10:00:00Z", "end": "2026-11-10T14:00:00Z" }]
},
"load": { "weightKg": 6000 }
},
{
"id": "steel-duisburg",
"pickup": { "locationId": "rotterdam", "serviceSeconds": 7200 },
"delivery": { "locationId": "duisburg", "serviceSeconds": 7200 },
"load": { "weightKg": 900000 }
}
],
"options": { "objective": "minimize_distance", "startTime": "2026-11-10T06:00:00Z", "timeBudgetMs": 2000 }
}{
"success": true,
"routes": [
{
"vehicleId": "truck-1",
"transportMode": "road",
"distanceKm": 274.01,
"drivingSeconds": 12330,
"stops": [
{ "locationId": "rotterdam", "arrival": "2026-11-10T06:00:00Z", "departure": "2026-11-10T06:15:00Z", "activities": [{ "type": "pickup", "shipmentId": "pallets-utrecht" }] },
{ "locationId": "rotterdam", "arrival": "2026-11-10T06:15:00Z", "departure": "2026-11-10T06:30:00Z", "activities": [{ "type": "pickup", "shipmentId": "pallets-eindhoven" }] },
{ "locationId": "eindhoven", "arrival": "2026-11-10T10:00:00Z", "departure": "2026-11-10T10:15:00Z", "activities": [{ "type": "delivery", "shipmentId": "pallets-eindhoven" }] },
{ "locationId": "utrecht", "arrival": "2026-11-10T11:29:09Z", "departure": "2026-11-10T11:44:09Z", "activities": [{ "type": "delivery", "shipmentId": "pallets-utrecht" }] },
{ "locationId": "rotterdam", "arrival": "2026-11-10T12:30:44Z", "departure": "2026-11-10T12:30:44Z", "activities": [] }
]
},
{
"vehicleId": "barge-1",
"transportMode": "inlandWaterway",
"distanceKm": 433.332,
"drivingSeconds": 119998,
"stops": [
{ "locationId": "rotterdam", "arrival": "2026-11-10T06:00:00Z", "departure": "2026-11-10T08:00:00Z", "activities": [{ "type": "pickup", "shipmentId": "steel-duisburg" }] },
{ "locationId": "duisburg", "arrival": "2026-11-11T00:39:59Z", "departure": "2026-11-11T02:39:59Z", "activities": [{ "type": "delivery", "shipmentId": "steel-duisburg" }] },
{ "locationId": "rotterdam", "arrival": "2026-11-11T19:19:58Z", "departure": "2026-11-11T19:19:58Z", "activities": [] }
]
}
],
"unassigned": [],
"totalDistanceKm": 707.342,
"totalDrivingSeconds": 132328,
"warnings": ["distance_matrix_estimated", "mode_distances_estimated"]
}