Fahrtenbuch

Trips

List trips

GET
/trips

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

vehicleId?string
Formatuuid
type?string
Value in"business""private""commute""unclassified"
from?string
Formatdate-time
to?string
Formatdate-time
limit?integer
Rangevalue <= 500
Default100
offset?integer
Default0

Response Body

Fahrten

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/api/v1/trips'
Example Response200
[  {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",    "type": "business",    "specialCategory": "medical",    "status": "recording",    "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",    "startedAt": "2019-08-24T14:15:22Z",    "endedAt": "2019-08-24T14:15:22Z",    "startTimeZone": "string",    "endTimeZone": "string",    "timeZoneSource": "trip",    "startAddress": "string",    "endAddress": "string",    "purpose": "string",    "contact": "string",    "notes": "string",    "distanceKm": 0,    "durationSeconds": 0,    "reimbursementRateEur": 0,    "reimbursementEur": 0,    "mapMatching": null,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]

Create trip manually

POST
/trips

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
vehicleId*string
Formatuuid
type?string
Default"unclassified"
Value in"business""private""commute""unclassified"
specialCategory?|

Optional secondary purpose category independent of the primary trip type.

Value in"medical""volunteer""education""application""moving""other"null
startedAt*string
Formatdate-time
endedAt?|
Formatdate-time
startTimeZone?|

IANA time zone; omitted = keep (update) or account time zone (create).

endTimeZone?|

IANA time zone; defaults to startTimeZone.

startAddress?string|null
endAddress?string|null
purpose?string|null
contact?string|null
notes?string|null
reimbursementRateEur?|

Reimbursement rate (EUR per km) for this trip. Omitted = keep (update) or vehicle default for business trips (create); null removes it.

Range0 <= value <= 1000
startLat?|

Nur beim Anlegen (POST /trips): Koordinate der Startadresse, zusammen mit startLon.

Range-90 <= value <= 90
startLon?|

Nur beim Anlegen

Range-180 <= value <= 180
endLat?|

Nur beim Anlegen: Koordinate der Zieladresse, zusammen mit endLon.

Range-90 <= value <= 90
endLon?|

Nur beim Anlegen

Range-180 <= value <= 180
distanceKm?|

Nur beim Anlegen einer beendeten Fahrt: gefahrene Strecke, z. B. vom Tacho oder aus GET /geocoding/route. Ohne Angabe bleibt die Distanz leer.

Range0 <= value <= 10000

Response Body

Fahrt angelegt

application/json
  1. response
id*string
Formatuuid
vehicleId*string
Formatuuid
type*string
Value in"business""private""commute""unclassified"
specialCategory?|

Optional secondary purpose category independent of the primary trip type.

Value in"medical""volunteer""education""application""moving""other"null
status*string
Value in"recording""completed""cancelled"
clientTripId?|

Trip ID generated by the recording device at start (sent as clientTripId to /tracking/start).

Formatuuid
startedAt*string
Formatdate-time
endedAt?|
Formatdate-time
startTimeZone?|

IANA time zone in which the trip started. Falls back to the user's time zone. Format startedAt in this zone to show local time (DST-aware).

endTimeZone?|

IANA time zone in which the trip ended. Falls back to startTimeZone, then the user's time zone.

timeZoneSource?|

trip = recorded with the trip, user = fallback to the account time zone.

Value in"trip""user"null
startAddress?string|null
endAddress?string|null
purpose?string|null
contact?string|null
notes?string|null
distanceKm?number|null
durationSeconds?integer|null
reimbursementRateEur?|

Employer reimbursement rate of this trip (EUR per km). Taken from the vehicle when the trip becomes a business trip and has no rate yet; kept when the type changes later.

reimbursementEur?|

distanceKm × reimbursementRateEur, rounded to cents. Only for business trips, otherwise null.

mapMatching?|

Ergebnis des Map-Matchings (null = noch nicht gematcht). Bei status applied ist distanceKm die gematchte Distanz.

createdAt?string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/trips' \  -H 'Content-Type: application/json' \  -d '{  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "startedAt": "2019-08-24T14:15:22Z"}'
Example Response201
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "type": "business",  "specialCategory": "medical",  "status": "recording",  "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",  "startedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "startTimeZone": "string",  "endTimeZone": "string",  "timeZoneSource": "trip",  "startAddress": "string",  "endAddress": "string",  "purpose": "string",  "contact": "string",  "notes": "string",  "distanceKm": 0,  "durationSeconds": 0,  "reimbursementRateEur": 0,  "reimbursementEur": 0,  "mapMatching": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Get trip

GET
/trips/{id}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Fahrt

application/json
  1. response
id*string
Formatuuid
vehicleId*string
Formatuuid
type*string
Value in"business""private""commute""unclassified"
specialCategory?|

Optional secondary purpose category independent of the primary trip type.

Value in"medical""volunteer""education""application""moving""other"null
status*string
Value in"recording""completed""cancelled"
clientTripId?|

Trip ID generated by the recording device at start (sent as clientTripId to /tracking/start).

Formatuuid
startedAt*string
Formatdate-time
endedAt?|
Formatdate-time
startTimeZone?|

IANA time zone in which the trip started. Falls back to the user's time zone. Format startedAt in this zone to show local time (DST-aware).

endTimeZone?|

IANA time zone in which the trip ended. Falls back to startTimeZone, then the user's time zone.

timeZoneSource?|

trip = recorded with the trip, user = fallback to the account time zone.

Value in"trip""user"null
startAddress?string|null
endAddress?string|null
purpose?string|null
contact?string|null
notes?string|null
distanceKm?number|null
durationSeconds?integer|null
reimbursementRateEur?|

Employer reimbursement rate of this trip (EUR per km). Taken from the vehicle when the trip becomes a business trip and has no rate yet; kept when the type changes later.

reimbursementEur?|

distanceKm × reimbursementRateEur, rounded to cents. Only for business trips, otherwise null.

mapMatching?|

Ergebnis des Map-Matchings (null = noch nicht gematcht). Bei status applied ist distanceKm die gematchte Distanz.

createdAt?string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X GET 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response200
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "type": "business",  "specialCategory": "medical",  "status": "recording",  "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",  "startedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "startTimeZone": "string",  "endTimeZone": "string",  "timeZoneSource": "trip",  "startAddress": "string",  "endAddress": "string",  "purpose": "string",  "contact": "string",  "notes": "string",  "distanceKm": 0,  "durationSeconds": 0,  "reimbursementRateEur": 0,  "reimbursementEur": 0,  "mapMatching": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete trip

DELETE
/trips/{id}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Fahrt gelöscht

Example Request
curl -X DELETE 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response204
Empty

Update trip

PUT
/trips/{id}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
vehicleId*string
Formatuuid
type?string
Default"unclassified"
Value in"business""private""commute""unclassified"
specialCategory?|

Optional secondary purpose category independent of the primary trip type.

Value in"medical""volunteer""education""application""moving""other"null
startedAt*string
Formatdate-time
endedAt?|
Formatdate-time
startTimeZone?|

IANA time zone; omitted = keep (update) or account time zone (create).

endTimeZone?|

IANA time zone; defaults to startTimeZone.

startAddress?string|null
endAddress?string|null
purpose?string|null
contact?string|null
notes?string|null
reimbursementRateEur?|

Reimbursement rate (EUR per km) for this trip. Omitted = keep (update) or vehicle default for business trips (create); null removes it.

Range0 <= value <= 1000
startLat?|

Nur beim Anlegen (POST /trips): Koordinate der Startadresse, zusammen mit startLon.

Range-90 <= value <= 90
startLon?|

Nur beim Anlegen

Range-180 <= value <= 180
endLat?|

Nur beim Anlegen: Koordinate der Zieladresse, zusammen mit endLon.

Range-90 <= value <= 90
endLon?|

Nur beim Anlegen

Range-180 <= value <= 180
distanceKm?|

Nur beim Anlegen einer beendeten Fahrt: gefahrene Strecke, z. B. vom Tacho oder aus GET /geocoding/route. Ohne Angabe bleibt die Distanz leer.

Range0 <= value <= 10000

Response Body

Fahrt aktualisiert

application/json
  1. response
id*string
Formatuuid
vehicleId*string
Formatuuid
type*string
Value in"business""private""commute""unclassified"
specialCategory?|

Optional secondary purpose category independent of the primary trip type.

Value in"medical""volunteer""education""application""moving""other"null
status*string
Value in"recording""completed""cancelled"
clientTripId?|

Trip ID generated by the recording device at start (sent as clientTripId to /tracking/start).

Formatuuid
startedAt*string
Formatdate-time
endedAt?|
Formatdate-time
startTimeZone?|

IANA time zone in which the trip started. Falls back to the user's time zone. Format startedAt in this zone to show local time (DST-aware).

endTimeZone?|

IANA time zone in which the trip ended. Falls back to startTimeZone, then the user's time zone.

timeZoneSource?|

trip = recorded with the trip, user = fallback to the account time zone.

Value in"trip""user"null
startAddress?string|null
endAddress?string|null
purpose?string|null
contact?string|null
notes?string|null
distanceKm?number|null
durationSeconds?integer|null
reimbursementRateEur?|

Employer reimbursement rate of this trip (EUR per km). Taken from the vehicle when the trip becomes a business trip and has no rate yet; kept when the type changes later.

reimbursementEur?|

distanceKm × reimbursementRateEur, rounded to cents. Only for business trips, otherwise null.

mapMatching?|

Ergebnis des Map-Matchings (null = noch nicht gematcht). Bei status applied ist distanceKm die gematchte Distanz.

createdAt?string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X PUT 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "startedAt": "2019-08-24T14:15:22Z"}'
Example Response200
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "type": "business",  "specialCategory": "medical",  "status": "recording",  "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",  "startedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "startTimeZone": "string",  "endTimeZone": "string",  "timeZoneSource": "trip",  "startAddress": "string",  "endAddress": "string",  "purpose": "string",  "contact": "string",  "notes": "string",  "distanceKm": 0,  "durationSeconds": 0,  "reimbursementRateEur": 0,  "reimbursementEur": 0,  "mapMatching": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
GET
/trips/{id}/history

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Fahrten-Historie

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/history'
Example Response
[  {    "id": "string",    "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",    "eventType": "CREATED",    "changedFields": {},    "oldValues": {},    "newValues": {},    "metadata": {},    "actor": null,    "createdAt": "2019-08-24T14:15:22Z"  }]

Get map-matched route

GET
/trips/{id}/matched-route

Auf das Straßennetz gelegte Route aus dem Map-Matching. Die GPS-Rohpunkte bleiben unter /trips/{id}/points unverändert.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Gematchte Route

application/json
  1. response
status*string
Value in"applied""rejected""failed"
provider*string
Value in"valhalla""osrm""atlas"
matchedAt?string
Formatdate-time
rawDistanceMeters?|

Distanz aus den GPS-Rohpunkten

matchedDistanceMeters?integer|null
message?|

Grund bei rejected/failed

tripId*string
Formatuuid
pointCount?integer
confidence?number|null
coordinates*array<array<number>>

Route auf dem Straßennetz als [lat, lon]-Paare

Example Request
curl -X GET 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/matched-route'
Example Response
{  "status": "applied",  "provider": "valhalla",  "matchedAt": "2019-08-24T14:15:22Z",  "rawDistanceMeters": 0,  "matchedDistanceMeters": 0,  "message": "string",  "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",  "pointCount": 0,  "confidence": 0,  "coordinates": [    [      0,      0    ]  ]}

Get trip GPS points

GET
/trips/{id}/points

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

GPS-Punkte

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/points'
Example Response200
[  {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",    "lat": -90,    "lon": -180,    "altitude": 0,    "accuracy": 0,    "speed": 0,    "bearing": 0,    "recordedAt": "2019-08-24T14:15:22Z",    "source": "gps"  }]
POST
/trips/{id}/points/remove

Entfernt einzelne GPS-Punkte (z. B. Sprünge durch schlechten Empfang). Distanz, Dauer sowie Start- und Zielkoordinaten werden aus den verbleibenden Punkten neu berechnet, ein vorhandenes Map-Matching wird verworfen und beim nächsten Lauf neu erzeugt. Die entfernten Punkte stehen mit Koordinaten und Zeit in der Fahrthistorie (POINTS_REMOVED). Nur für abgeschlossene Fahrten; mindestens zwei Punkte bleiben.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
pointIds*array<>

IDs aus GET /trips/{id}/points

Items1 <= items <= 5000

Response Body

Aktualisierte Fahrt

application/json
  1. response
id*string
Formatuuid
vehicleId*string
Formatuuid
type*string
Value in"business""private""commute""unclassified"
specialCategory?|

Optional secondary purpose category independent of the primary trip type.

Value in"medical""volunteer""education""application""moving""other"null
status*string
Value in"recording""completed""cancelled"
clientTripId?|

Trip ID generated by the recording device at start (sent as clientTripId to /tracking/start).

Formatuuid
startedAt*string
Formatdate-time
endedAt?|
Formatdate-time
startTimeZone?|

IANA time zone in which the trip started. Falls back to the user's time zone. Format startedAt in this zone to show local time (DST-aware).

endTimeZone?|

IANA time zone in which the trip ended. Falls back to startTimeZone, then the user's time zone.

timeZoneSource?|

trip = recorded with the trip, user = fallback to the account time zone.

Value in"trip""user"null
startAddress?string|null
endAddress?string|null
purpose?string|null
contact?string|null
notes?string|null
distanceKm?number|null
durationSeconds?integer|null
reimbursementRateEur?|

Employer reimbursement rate of this trip (EUR per km). Taken from the vehicle when the trip becomes a business trip and has no rate yet; kept when the type changes later.

reimbursementEur?|

distanceKm × reimbursementRateEur, rounded to cents. Only for business trips, otherwise null.

mapMatching?|

Ergebnis des Map-Matchings (null = noch nicht gematcht). Bei status applied ist distanceKm die gematchte Distanz.

createdAt?string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/points/remove' \  -H 'Content-Type: application/json' \  -d '{  "pointIds": [    "077ab0e7-997d-450a-aa83-a0ee4c7f1644"  ]}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "type": "business",  "specialCategory": "medical",  "status": "recording",  "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",  "startedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "startTimeZone": "string",  "endTimeZone": "string",  "timeZoneSource": "trip",  "startAddress": "string",  "endAddress": "string",  "purpose": "string",  "contact": "string",  "notes": "string",  "distanceKm": 0,  "durationSeconds": 0,  "reimbursementRateEur": 0,  "reimbursementEur": 0,  "mapMatching": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PUT
/trips/{id}/route

Ersetzt alle GPS-Punkte einer abgeschlossenen Fahrt und setzt Start, Ende und Adressen. Der erste Punkt erhält die Startzeit, der letzte die Endzeit; Punkte ohne recordedAt (neu gesetzt oder über die Straße ergänzt) werden nach Strecke zeitlich verteilt. Distanz und Dauer werden neu berechnet, Map-Matching neu eingereiht. Bleibt eine Adresse unverändert, während sich der zugehörige Endpunkt um mehr als 150 m verschiebt, wird sie neu ermittelt. Historie: ROUTE_CORRECTED mit metadata.method = editor.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
startedAt*string
Formatdate-time
endedAt*string
Formatdate-time
startAddress?|

Fehlt das Feld

endAddress?|

Fehlt das Feld

routedPointCount?integer

Veraltet – wird aus den Punkten mit source routed ermittelt.

points*array<>
Items2 <= items <= 20000

Response Body

Aktualisierte Fahrt

application/json
  1. response
id*string
Formatuuid
vehicleId*string
Formatuuid
type*string
Value in"business""private""commute""unclassified"
specialCategory?|

Optional secondary purpose category independent of the primary trip type.

Value in"medical""volunteer""education""application""moving""other"null
status*string
Value in"recording""completed""cancelled"
clientTripId?|

Trip ID generated by the recording device at start (sent as clientTripId to /tracking/start).

Formatuuid
startedAt*string
Formatdate-time
endedAt?|
Formatdate-time
startTimeZone?|

IANA time zone in which the trip started. Falls back to the user's time zone. Format startedAt in this zone to show local time (DST-aware).

endTimeZone?|

IANA time zone in which the trip ended. Falls back to startTimeZone, then the user's time zone.

timeZoneSource?|

trip = recorded with the trip, user = fallback to the account time zone.

Value in"trip""user"null
startAddress?string|null
endAddress?string|null
purpose?string|null
contact?string|null
notes?string|null
distanceKm?number|null
durationSeconds?integer|null
reimbursementRateEur?|

Employer reimbursement rate of this trip (EUR per km). Taken from the vehicle when the trip becomes a business trip and has no rate yet; kept when the type changes later.

reimbursementEur?|

distanceKm × reimbursementRateEur, rounded to cents. Only for business trips, otherwise null.

mapMatching?|

Ergebnis des Map-Matchings (null = noch nicht gematcht). Bei status applied ist distanceKm die gematchte Distanz.

createdAt?string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X PUT 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/route' \  -H 'Content-Type: application/json' \  -d '{  "startedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "points": [    {      "lat": -90,      "lon": -180    },    {      "lat": -90,      "lon": -180    }  ]}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "type": "business",  "specialCategory": "medical",  "status": "recording",  "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",  "startedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "startTimeZone": "string",  "endTimeZone": "string",  "timeZoneSource": "trip",  "startAddress": "string",  "endAddress": "string",  "purpose": "string",  "contact": "string",  "notes": "string",  "distanceKm": 0,  "durationSeconds": 0,  "reimbursementRateEur": 0,  "reimbursementEur": 0,  "mapMatching": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/trips/{id}/route/recalculate

Verwirft alle erzeugten Punkte (source = routed) und füllt die Lücken über 250 m zwischen gemessenen und gesetzten Punkten neu über den Routing-Dienst. Gemessene und gesetzte Punkte, Start, Ende und Adressen bleiben unverändert; Distanz und Dauer werden neu berechnet. Historie: ROUTE_CORRECTED mit metadata.method = recalculate.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Ergebnis

application/json
  1. response
trip?
gapCount?integer
routedGaps?integer
failedGaps?integer
routedPointCount?integer
Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/route/recalculate'
Example Response
{  "trip": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",    "type": "business",    "specialCategory": "medical",    "status": "recording",    "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",    "startedAt": "2019-08-24T14:15:22Z",    "endedAt": "2019-08-24T14:15:22Z",    "startTimeZone": "string",    "endTimeZone": "string",    "timeZoneSource": "trip",    "startAddress": "string",    "endAddress": "string",    "purpose": "string",    "contact": "string",    "notes": "string",    "distanceKm": 0,    "durationSeconds": 0,    "reimbursementRateEur": 0,    "reimbursementEur": 0,    "mapMatching": null,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "gapCount": 0,  "routedGaps": 0,  "failedGaps": 0,  "routedPointCount": 0}
POST
/trips/{id}/dawarich-import

Füllt Lücken einer abgeschlossenen Fahrt (Fahrtbeginn bis erster Punkt, Abstände zwischen Punkten, letzter Punkt bis Fahrtende – jeweils ab 60 Sekunden) mit Standortpunkten aus der verbundenen Dawarich-Instanz des Benutzers (siehe /users/me/dawarich). Vorhandene Punkte bleiben unverändert; Dawarich-Punkte mit mehr als 200 m Ungenauigkeit werden übersprungen. Distanz und Dauer werden neu berechnet, Map-Matching wird neu eingereiht. Verschieben sich Start oder Ziel um mehr als 150 m, wird die jeweilige Adresse neu ermittelt. In der Fahrthistorie steht POINTS_IMPORTED. Mit preview: true werden die passenden Punkte nur geliefert (points) und nichts gespeichert – so übernimmt der Fahrt-Editor sie als ungespeicherte Änderung.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
preview?boolean
Defaultfalse

Response Body

Ergebnis des Imports

application/json
  1. response
importedCount*integer

Anzahl übernommener (bzw. bei preview passender) Punkte

gapCount*integer

Anzahl gefundener Lücken

trip?

Nur ohne preview

points?array<>

Nur bei preview – die passenden Punkte, nicht gespeichert

Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/dawarich-import' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "importedCount": 0,  "gapCount": 0,  "trip": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",    "type": "business",    "specialCategory": "medical",    "status": "recording",    "clientTripId": "318f40ef-c424-48c0-a9d6-a2368e4149e4",    "startedAt": "2019-08-24T14:15:22Z",    "endedAt": "2019-08-24T14:15:22Z",    "startTimeZone": "string",    "endTimeZone": "string",    "timeZoneSource": "trip",    "startAddress": "string",    "endAddress": "string",    "purpose": "string",    "contact": "string",    "notes": "string",    "distanceKm": 0,    "durationSeconds": 0,    "reimbursementRateEur": 0,    "reimbursementEur": 0,    "mapMatching": null,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "points": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",      "lat": -90,      "lon": -180,      "altitude": 0,      "accuracy": 0,      "speed": 0,      "bearing": 0,      "recordedAt": "2019-08-24T14:15:22Z",      "source": "gps"    }  ]}

Classify trip

PUT
/trips/{id}/classify

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
type*string
Value in"business""private""commute"
specialCategory?|

Optional secondary purpose category; null removes it.

Value in"medical""volunteer""education""application""moving""other"null
purpose?|

Trip purpose. Only changed when present; null or "" removes it.

Lengthlength <= 1000
contact?|

Business contact / visited person. Only changed when present; null or "" removes it.

Lengthlength <= 1000
notes?|

Free-text note. Only changed when present; null or "" removes it.

Lengthlength <= 20000
reimbursementRateEur?|

Reimbursement rate (EUR per km). Only changed when present; null removes it. Omitted when switching to business = vehicle default if the trip has no rate yet.

Range0 <= value <= 1000

Response Body

Fahrt klassifiziert

Example Request
curl -X PUT 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/classify' \  -H 'Content-Type: application/json' \  -d '{  "type": "business"}'
Example Response200
Empty

Set trip tags

PUT
/trips/{id}/tags

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
tagIds*array<>

Response Body

Tags gesetzt

Example Request
curl -X PUT 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/tags' \  -H 'Content-Type: application/json' \  -d '{  "tagIds": [    "9c99701b-f191-4642-8bc0-e04053f29131"  ]}'
Example Response200
Empty
GET
/compliance/checks

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Prüfzusammenfassung, Integrität und Auffälligkeiten

Example Request
curl -X GET 'https://example.com/api/v1/compliance/checks'
Example Response200
Empty
GET
/compliance/integrity

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Integritätsstatus

Example Request
curl -X GET 'https://example.com/api/v1/compliance/integrity'
Example Response200
Empty

List closed periods

GET
/compliance/periods

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Abgeschlossene Zeiträume

Example Request
curl -X GET 'https://example.com/api/v1/compliance/periods'
Example Response200
Empty
POST
/compliance/periods

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Zeitraum abgeschlossen

Example Request
curl -X POST 'https://example.com/api/v1/compliance/periods'
Example Response201
Empty

List archived trips

GET
/trips/archive

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Successful response

Example Request
curl -X GET 'https://example.com/api/v1/trips/archive'
Example Response
Empty

Restore archived trip

POST
/trips/{id}/restore

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

Response Body

Successful response

Example Request
curl -X POST 'https://example.com/api/v1/trips/string/restore'
Example Response
Empty
DELETE
/trips/{id}/permanent

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

Response Body

Successful response

Example Request
curl -X DELETE 'https://example.com/api/v1/trips/string/permanent'
Example Response
Empty
POST
/trips/{id}/split

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Geteilte Fahrten

Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/split'
Example Response200
Empty
POST
/trips/merge

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Zusammengeführte Fahrt

Example Request
curl -X POST 'https://example.com/api/v1/trips/merge'
Example Response200
Empty
GET
/trips/{id}/assignable-drivers

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Zulässige Fahrer und Rückgabeoptionen

Example Request
curl -X GET 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/assignable-drivers'
Example Response200
Empty
POST
/trips/{id}/assign-driver

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
userId*string
Formatuuid
reason?string
Lengthlength <= 500

Response Body

Fahrerzuordnung aktualisiert

Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/assign-driver' \  -H 'Content-Type: application/json' \  -d '{  "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"}'
Example Response200
Empty
GET
/trips/{id}/suggestions

Vorschläge zur Fahrtart. source places = bekannte Orte (Zuhause, Arbeitsort, gespeicherte Orte), history = gleiche Strecke wurde schon mehrfach gleich eingeordnet, ai = gespeicherter KI-Vorschlag. Nur Vorschläge – eingeordnet wird über PUT /trips/{id}/classify. history und ai nur mit Feature aiClassification.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Vorschläge

application/json
  1. response
suggestions*array<>
ai?

Nur mit Feature aiClassification.

Example Request
curl -X GET 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/suggestions'
Example Response200
{  "suggestions": [    {      "type": "business",      "reason": "string",      "source": "places",      "confidence": 0,      "historyCount": 0,      "historyTotal": 0,      "provider": "string",      "purpose": "string",      "contact": "string",      "startPlace": {},      "endPlace": {}    }  ],  "ai": {    "available": true,    "enabled": true,    "status": "none"  }}
POST
/trips/{id}/suggestions/ai

Fragt den KI-Anbieter (Claude, OpenAI oder Ollama) sofort, auch erneut. Sendet Adressen, Zeiten, bekannte Orte und die letzten eingeordneten Fahrten – keine GPS-Spur. Erfordert Feature aiClassification, einen eingerichteten Anbieter und aiClassificationEnabled in den Nutzereinstellungen.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Aktualisierte Vorschläge

application/json
  1. response
suggestions*array<>
ai?

Nur mit Feature aiClassification.

Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/suggestions/ai'
Example Response
{  "suggestions": [    {      "type": "business",      "reason": "string",      "source": "places",      "confidence": 0,      "historyCount": 0,      "historyTotal": 0,      "provider": "string",      "purpose": "string",      "contact": "string",      "startPlace": {},      "endPlace": {}    }  ],  "ai": {    "available": true,    "enabled": true,    "status": "none"  }}
POST
/trips/{id}/suggestions/ai/dismiss

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Aktualisierte Vorschläge

application/json
  1. response
suggestions*array<>
ai?

Nur mit Feature aiClassification.

Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/suggestions/ai/dismiss'
Example Response200
{  "suggestions": [    {      "type": "business",      "reason": "string",      "source": "places",      "confidence": 0,      "historyCount": 0,      "historyTotal": 0,      "provider": "string",      "purpose": "string",      "contact": "string",      "startPlace": {},      "endPlace": {}    }  ],  "ai": {    "available": true,    "enabled": true,    "status": "none"  }}
POST
/trips/{id}/route-correction

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Korrigierte Fahrt

Example Request
curl -X POST 'https://example.com/api/v1/trips/497f6eca-6276-4993-bfeb-53cbbbba6f08/route-correction'
Example Response200
Empty