Download OpenAPI specification:Download
The Vehicle API provides endpoints for managing vehicles used in planning operations.
The ping-endpoint can be used for validating a connection with the application. It will authenticate the caller and respond pong if everything is set-up correctly.
Returned when the application is responsive and you are authenticated.
Authentication required
pong
Create or update a Vehicle. A unique ID (business_id) is required to identify the Vehicle.
Calling this endpoint with an existing business_id will update the Vehicle.
Modifying (or retrieving) a Vehicle will provide the caller with a version number for this Vehicle.
This version can be passed to the upsert endpoint as a weak ETag in the If-Match header.
This allows the caller to ensure that the Vehicle has not been modified since the last time it was retrieved.
| Prefer | Array of strings The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240). The following behavior (see Examples) is supported by this API:
Indicate no response is needed, can be omitted return=minimalRequest the result of the operation as response return=representation |
| If-Match | string Weak Etag used for optimistic locking. Example: W/"24" |
Vehicle created or updated
Vehicle created or updated
Bad request
Authentication required
Not found
Conflict
This status is returned when an trying to modify an entity with an outdated version in the If-Match header.
{- "description": "Horn plays La Cucaracha - use sparingly in residential areas",
- "mandatory": true,
- "driver": {
- "name": "John Doe",
- "efficiency_factor": 1.2,
- "custom_data": {
- "something": "customer specific"
}
}, - "start": {
- "location": {
- "address": {
- "business_id": "50.9514048-3.8067878",
- "name": "The office",
- "address_line": "Voordries 41",
- "city": "Oosterzele",
- "zip_code": "9860",
- "country_code": "BE",
- "geo_point": {
- "latitude": 50.9514048,
- "longitude": 3.8067878
}
}
}, - "service_time": "PT20M"
}, - "end": {
- "location": {
- "address": {
- "business_id": "50.9514048-3.8067878",
- "name": "The office",
- "address_line": "Voordries 41",
- "city": "Oosterzele",
- "zip_code": "9860",
- "country_code": "BE",
- "geo_point": {
- "latitude": 50.9514048,
- "longitude": 3.8067878
}
}, - "at_last_activity": false,
- "same_as_start": false
}, - "service_time": "PT15M"
}, - "deployability": {
- "window": {
- "start": {
- "earliest": "2025-01-01T08:00:00Z",
- "latest": "2025-01-01T10:00:00Z"
}, - "end": {
- "latest": "2025-01-01T18:00:00Z"
}
}, - "duration": {
- "at_most_without_overtime": "PT8H",
- "allowed_overtime": "PT2H"
}
}, - "capabilities": [
- "refrigerated",
- "hazmat"
], - "transport_resource": {
- "license_plate": "1-ABC-234",
- "capacities": [
- {
- "type": "weight",
- "value": 3500
}, - {
- "type": "volume",
- "value": 25.5
}
], - "custom_data": {
- "something": "customer specific"
}
}, - "labels": [
- "priority",
- "express"
], - "cost": {
- "fixed": 50,
- "per_hour": 25,
- "per_kilometer": 0.5,
- "per_stop": 12,
- "overtime_per_hour": 30
}, - "route_settings": {
- "routing_group": "medium-truck",
- "max_distance_in_kilometers": 450,
- "max_stops": 10,
- "driving_speed_factor": 1.5,
- "preferred_route_duration": {
- "duration": "PT8H",
- "importance": 0.5
}
}, - "color": "#FF5733"
}{- "business_id": "truck-42",
- "description": "Horn plays La Cucaracha - use sparingly in residential areas",
- "mandatory": true,
- "driver": {
- "name": "John Doe",
- "efficiency_factor": 1.2,
- "custom_data": {
- "something": "customer specific"
}
}, - "start": {
- "location": {
- "address": {
- "business_id": "50.9514048-3.8067878",
- "name": "The office",
- "address_line": "Voordries 41",
- "city": "Oosterzele",
- "zip_code": "9860",
- "country_code": "BE",
- "geo_point": {
- "latitude": 50.9514048,
- "longitude": 3.8067878,
- "resolved": {
- "geocoded": true,
- "address": "Voordries 41, 9860 Oosterzele",
- "precision": 9
}
}
}
}, - "service_time": "PT20M"
}, - "end": {
- "location": {
- "address": {
- "business_id": "50.9514048-3.8067878",
- "name": "The office",
- "address_line": "Voordries 41",
- "city": "Oosterzele",
- "zip_code": "9860",
- "country_code": "BE",
- "geo_point": {
- "latitude": 50.9514048,
- "longitude": 3.8067878,
- "resolved": {
- "geocoded": true,
- "address": "Voordries 41, 9860 Oosterzele",
- "precision": 9
}
}
}, - "at_last_activity": false,
- "same_as_start": false
}, - "service_time": "PT15M"
}, - "deployability": {
- "window": {
- "start": {
- "earliest": "2025-01-01T08:00:00Z",
- "latest": "2025-01-01T10:00:00Z"
}, - "end": {
- "latest": "2025-01-01T18:00:00Z"
}
}, - "duration": {
- "at_most_without_overtime": "PT8H",
- "allowed_overtime": "PT2H"
}
}, - "capabilities": [
- "refrigerated",
- "hazmat"
], - "transport_resource": {
- "license_plate": "1-ABC-234",
- "capacities": [
- {
- "type": "weight",
- "value": 3500
}, - {
- "type": "volume",
- "value": 25.5
}
], - "custom_data": {
- "something": "customer specific"
}
}, - "labels": [
- "priority",
- "express"
], - "cost": {
- "fixed": 50,
- "per_hour": 25,
- "per_kilometer": 0.5,
- "per_stop": 12,
- "overtime_per_hour": 30
}, - "route_settings": {
- "routing_group": "medium-truck",
- "max_distance_in_kilometers": 450,
- "max_stops": 10,
- "driving_speed_factor": 1.5,
- "preferred_route_duration": {
- "duration": "PT8H",
- "importance": 0.5
}
}, - "color": "#FF5733"
}Get an existing Vehicle, defined by their business_id.
The Vehicle was successfully retrieved. Details are in the response body.
Authentication required
Not found
{- "business_id": "truck-42",
- "description": "Horn plays La Cucaracha - use sparingly in residential areas",
- "mandatory": true,
- "driver": {
- "name": "John Doe",
- "efficiency_factor": 1.2,
- "custom_data": {
- "something": "customer specific"
}
}, - "start": {
- "location": {
- "address": {
- "business_id": "50.9514048-3.8067878",
- "name": "The office",
- "address_line": "Voordries 41",
- "city": "Oosterzele",
- "zip_code": "9860",
- "country_code": "BE",
- "geo_point": {
- "latitude": 50.9514048,
- "longitude": 3.8067878,
- "resolved": {
- "geocoded": true,
- "address": "Voordries 41, 9860 Oosterzele",
- "precision": 9
}
}
}
}, - "service_time": "PT20M"
}, - "end": {
- "location": {
- "address": {
- "business_id": "50.9514048-3.8067878",
- "name": "The office",
- "address_line": "Voordries 41",
- "city": "Oosterzele",
- "zip_code": "9860",
- "country_code": "BE",
- "geo_point": {
- "latitude": 50.9514048,
- "longitude": 3.8067878,
- "resolved": {
- "geocoded": true,
- "address": "Voordries 41, 9860 Oosterzele",
- "precision": 9
}
}
}, - "at_last_activity": false,
- "same_as_start": false
}, - "service_time": "PT15M"
}, - "deployability": {
- "window": {
- "start": {
- "earliest": "2025-01-01T08:00:00Z",
- "latest": "2025-01-01T10:00:00Z"
}, - "end": {
- "latest": "2025-01-01T18:00:00Z"
}
}, - "duration": {
- "at_most_without_overtime": "PT8H",
- "allowed_overtime": "PT2H"
}
}, - "capabilities": [
- "refrigerated",
- "hazmat"
], - "transport_resource": {
- "license_plate": "1-ABC-234",
- "capacities": [
- {
- "type": "weight",
- "value": 3500
}, - {
- "type": "volume",
- "value": 25.5
}
], - "custom_data": {
- "something": "customer specific"
}
}, - "labels": [
- "priority",
- "express"
], - "cost": {
- "fixed": 50,
- "per_hour": 25,
- "per_kilometer": 0.5,
- "per_stop": 12,
- "overtime_per_hour": 30
}, - "route_settings": {
- "routing_group": "medium-truck",
- "max_distance_in_kilometers": 450,
- "max_stops": 10,
- "driving_speed_factor": 1.5,
- "preferred_route_duration": {
- "duration": "PT8H",
- "importance": 0.5
}
}, - "color": "#FF5733"
}Delete a Vehicle, defined by their business_id.
Deletion has succeeded and body is empty.
Bad request
Authentication required
Not found
This status is returned when an trying to modify an entity with an outdated version in the If-Match header.
{- "title": "Validation exception",
- "detail": "The field contains invalid business formatting.",
- "violations": [
- {
- "field": "path.to.field",
- "message": "Field is required"
}
]
}