Fahrtenbuch

Vehicles

List vehicles

GET
/vehicles

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Fahrzeuge

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/api/v1/vehicles'
Example Response200
[  {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "licensePlate": "string",    "vin": "string",    "odometerKm": 0,    "color": "string",    "notes": "string",    "bluetoothMac": "string",    "businessReimbursementRateEur": 0,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]

Create vehicle

POST
/vehicles

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
name*string
Length1 <= length
licensePlate?string|null
vin?string|null
odometerKm?|
Range0 <= value
color?string|null
notes?string|null
bluetoothMac?|
Match^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$
businessReimbursementRateEur?|

Default employer mileage reimbursement (EUR per km); null removes it. Omitted on update = unchanged.

Range0 <= value <= 1000

Response Body

Fahrzeug angelegt

application/json
  1. response
id*string
Formatuuid
name*string
licensePlate?string|null
vin?string|null
odometerKm?|
Range0 <= value
color?string|null
notes?string|null
bluetoothMac?string|null
businessReimbursementRateEur?|

Default employer mileage reimbursement (EUR per km). Copied into a trip when it becomes a business trip and has no rate yet.

Range0 <= value
createdAt*string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/vehicles' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response201
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "licensePlate": "string",  "vin": "string",  "odometerKm": 0,  "color": "string",  "notes": "string",  "bluetoothMac": "string",  "businessReimbursementRateEur": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Get vehicle

GET
/vehicles/{id}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Fahrzeug

application/json
  1. response
id*string
Formatuuid
name*string
licensePlate?string|null
vin?string|null
odometerKm?|
Range0 <= value
color?string|null
notes?string|null
bluetoothMac?string|null
businessReimbursementRateEur?|

Default employer mileage reimbursement (EUR per km). Copied into a trip when it becomes a business trip and has no rate yet.

Range0 <= value
createdAt*string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X GET 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response200
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "licensePlate": "string",  "vin": "string",  "odometerKm": 0,  "color": "string",  "notes": "string",  "bluetoothMac": "string",  "businessReimbursementRateEur": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete vehicle

DELETE
/vehicles/{id}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Fahrzeug gelöscht

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

Update vehicle

PUT
/vehicles/{id}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
name*string
Length1 <= length
licensePlate?string|null
vin?string|null
odometerKm?|
Range0 <= value
color?string|null
notes?string|null
bluetoothMac?|
Match^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$
businessReimbursementRateEur?|

Default employer mileage reimbursement (EUR per km); null removes it. Omitted on update = unchanged.

Range0 <= value <= 1000

Response Body

Fahrzeug aktualisiert

application/json
  1. response
id*string
Formatuuid
name*string
licensePlate?string|null
vin?string|null
odometerKm?|
Range0 <= value
color?string|null
notes?string|null
bluetoothMac?string|null
businessReimbursementRateEur?|

Default employer mileage reimbursement (EUR per km). Copied into a trip when it becomes a business trip and has no rate yet.

Range0 <= value
createdAt*string
Formatdate-time
updatedAt?string
Formatdate-time
Example Request
curl -X PUT 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response200
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "licensePlate": "string",  "vin": "string",  "odometerKm": 0,  "color": "string",  "notes": "string",  "bluetoothMac": "string",  "businessReimbursementRateEur": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Set default vehicle

PUT
/vehicles/{id}/default

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Standardfahrzeug aktualisiert

Example Request
curl -X PUT 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/default'
Example Response200
Empty
PUT
/vehicles/{id}/bluetooth

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
bluetoothMac*|
Match^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$

Response Body

Bluetooth-Zuordnung aktualisiert

Example Request
curl -X PUT 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/bluetooth' \  -H 'Content-Type: application/json' \  -d '{  "bluetoothMac": "string"}'
Example Response200
Empty
GET
/vehicles/{id}/shared-trip-activity

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Aggregierte Fahrtenaktivität

Example Request
curl -X GET 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/shared-trip-activity'
Example Response
Empty
GET
/vehicles/{id}/shares

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Bestätigte Freigaben

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

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
email*string
Formatemail

Response Body

Einladung versendet

Example Request
curl -X POST 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/shares' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Example Response202
Empty

Revoke vehicle share

DELETE
/vehicles/{id}/shares/{userId}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid
userId*string
Formatuuid

Response Body

Freigabe entfernt

Example Request
curl -X DELETE 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/shares/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response204
Empty
POST
/vehicles/{id}/share-link

Der Link ist 24 Stunden gültig. Nach sieben Tagen wird der Einladungsdatensatz gelöscht.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Freigabelink erstellt

application/json
  1. response
url*string
Formaturi
expiresAt*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/share-link'
Example Response201
{  "url": "http://example.com",  "expiresAt": "2019-08-24T14:15:22Z"}
GET
/vehicles/share-invitations/inspect

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

token*string
Length20 <= length

Response Body

Status und Metadaten der Einladung

Example Request
curl -X GET 'https://example.com/api/v1/vehicles/share-invitations/inspect?token=stringstringstringst'
Example Response
Empty
GET
/vehicles/share-invitations/pending

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Ausstehende Einladungen

Example Request
curl -X GET 'https://example.com/api/v1/vehicles/share-invitations/pending'
Example Response200
Empty
POST
/vehicles/share-invitations/respond

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
token*string
Length20 <= length
action*string
Value in"accept""decline"

Response Body

Einladung beantwortet

Example Request
curl -X POST 'https://example.com/api/v1/vehicles/share-invitations/respond' \  -H 'Content-Type: application/json' \  -d '{  "token": "stringstringstringst",  "action": "accept"}'
Example Response
Empty

Deregister owned vehicle

POST
/vehicles/{id}/deregister

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Fahrzeug abgemeldet

Example Request
curl -X POST 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/deregister'
Example Response200
Empty
GET
/vehicles/archive

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Archivierte Fahrzeuge

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

Restore archived vehicle

POST
/vehicles/{id}/restore

Stellt das Fahrzeug als abgemeldetes/inaktives Fahrzeug wieder her. Eine Wiederanmeldung erfolgt separat.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Response Body

Fahrzeug wiederhergestellt

Example Request
curl -X POST 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore'
Example Response
Empty
POST
/vehicles/{id}/register

Startet eine neue aktive Besitzperiode; frühere Abmeldungen und Fahrten bleiben erhalten.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
effectiveAt?string
Formatdate-time

Response Body

Fahrzeug wieder angemeldet

Example Request
curl -X POST 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/register' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
Empty
POST
/vehicles/{id}/transfer

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
account*string
transferAt*string
Formatdate-time

Response Body

Besitzerwechsel gespeichert

Example Request
curl -X POST 'https://example.com/api/v1/vehicles/497f6eca-6276-4993-bfeb-53cbbbba6f08/transfer' \  -H 'Content-Type: application/json' \  -d '{  "account": "string",  "transferAt": "2019-08-24T14:15:22Z"}'
Example Response200
Empty
GET
/odometer

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Kilometerstand-Ablesungen

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

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Fehlende Messwerte

Example Request
curl -X GET 'https://example.com/api/v1/odometer/pending'
Example Response200
Empty
PUT
/odometer/{vehicleId}/{month}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

vehicleId*string
Formatuuid
month*string
Match^\d{4}-(0[1-9]|1[0-2])$

Request Body

application/json
  1. body
odometerKm*number
Range0 <= value <= 10000000
readingDate?string

Kalendertag im Monat (Kontozeitzone)

Formatdate
readingAt?|

Ablesezeitpunkt; muss zum Ablesedatum passen und darf nicht in der Zukunft liegen

Formatdate-time

Response Body

Kilometerstand gespeichert

application/json
  1. response
id?string
Formatuuid
vehicleId?string
Formatuuid
month?string
readingDate?string
Formatdate
odometerKm?number
source?string
recordedAt?string
Formatdate-time
Example Request
curl -X PUT 'https://example.com/api/v1/odometer/497f6eca-6276-4993-bfeb-53cbbbba6f08/string' \  -H 'Content-Type: application/json' \  -d '{  "odometerKm": 0}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",  "month": "string",  "readingDate": "2019-08-24",  "odometerKm": 0,  "source": "string",  "recordedAt": "2019-08-24T14:15:22Z"}