Fahrtenbuch

Tracking

Start tracking

POST
/tracking/start

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
vehicleId*string
Formatuuid
clientTripId?|

Trip ID generated by the device when the trip starts. A repeated start with the same ID returns the existing trip (200) instead of creating a new one.

Formatuuid
startedAt?|
Formatdate-time
timeZone?|

IANA time zone of the device at trip start. Stored as zone id, so daylight saving time is applied per timestamp.

Response Body

Diese Fahrt existiert bereits (gleiche clientTripId; ohne clientTripId gleiches Fahrzeug und gleiches startedAt einer laufenden Aufzeichnung), z. B. weil die Antwort auf einen früheren Start verloren ging. Liefert die bestehende 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/tracking/start' \  -H 'Content-Type: application/json' \  -d '{  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb"}'
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"}

Upload GPS points

POST
/tracking/points

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
tripId*string
Formatuuid
points*array<>
Items1 <= items <= 5000

Response Body

GPS-Punkte angenommen

Example Request
curl -X POST 'https://example.com/api/v1/tracking/points' \  -H 'Content-Type: application/json' \  -d '{  "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5",  "points": [    {      "lat": -90,      "lon": -180,      "recordedAt": "2019-08-24T14:15:22Z"    }  ]}'
Example Response202
Empty

Stop tracking

POST
/tracking/stop

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
tripId*string
Formatuuid
endedAt?|
Formatdate-time
timeZone?|

IANA time zone of the device at trip end; defaults to the start time zone.

Response Body

Aufzeichnung beendet

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/tracking/stop' \  -H 'Content-Type: application/json' \  -d '{  "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5"}'
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
/tracking/status

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Trackingstatus

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