Vehicles
Record a trip sheet (foaie de parcurs) for a registry vehicle. Honours Idempotency-Key. (scope: fleet:write)
POST
bearerAuthheader
AuthorizationBearer <token>API key as Bearer token
id*stringRegistry vehicle id
Format
uuidapplication/json- body
performed_at*stringISO 8601 with offset.
Format
date-timedriver_name?stringLength
length <= 255route_from?stringLength
length <= 200route_to?stringLength
length <= 200purpose?stringLength
length <= 255odometer_start_km?integerRange
0 <= valueodometer_end_km?integerMust be ≥ odometer_start_km (422 otherwise).
Range
0 <= valuefuel_issued_litres?numberRange
0 <= valuenotes?stringLength
length <= 2000OK
application/json- response
data*A foaie de parcurs (Romanian trip sheet). driver_name is present only when the key also holds fleet_drivers:read; otherwise the property is omitted.
error*nullcurl -X POST "https://example.com/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/trip-sheets" \ -H "Content-Type: application/json" \ -d '{ "performed_at": "2019-08-24T14:15:22Z" }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vehicle_id": "e57c411b-caf2-4a2e-b2e8-e232824b6ddf", "performed_at": "2019-08-24T14:15:22Z", "driver_id": "d13674cc-89e2-4383-beab-46a9e6e4a9b2", "driver_name": "string", "route_from": "string", "route_to": "string", "purpose": "string", "odometer_start_km": 0, "odometer_end_km": 0, "distance_km": 0, "fuel_issued_litres": "string", "notes": "string", "created_at": "2019-08-24T14:15:22Z" }, "error": null}