Fahrtenbuch

App Pairing

Create QR pairing

POST
/auth/pair/options

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Response Body

Pairing-Optionen

application/json
  1. response
pairId*string
Formatuuid
payload*string
qrCodeDataUrl*string
expiresAt*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/auth/pair/options'
Example Response200
{  "pairId": "133b3609-45c6-44ff-a507-8618ec870f78",  "payload": "string",  "qrCodeDataUrl": "string",  "expiresAt": "2019-08-24T14:15:22Z"}

Pair device via QR code

POST
/auth/pair

Request Body

application/json
  1. body
pairId*string
Formatuuid
pairToken*string
deviceId*string
deviceName*string
platform*string
appVersion?string|null

Response Body

Tokens für das gekoppelte Gerät

application/json
  1. response
accessToken*string
refreshToken*string
expiresIn*integer
tokenType?string
Example Request
curl -X POST 'https://example.com/api/v1/auth/pair' \  -H 'Content-Type: application/json' \  -d '{  "pairId": "133b3609-45c6-44ff-a507-8618ec870f78",  "pairToken": "string",  "deviceId": "string",  "deviceName": "string",  "platform": "string"}'
Example Response200
{  "accessToken": "string",  "refreshToken": "string",  "expiresIn": 0,  "tokenType": "Bearer"}

Get pairing status

GET
/auth/pair/{pairId}/status

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

pairId*string
Formatuuid

Response Body

Pairing-Status

application/json
  1. response
status*string
Value in"pending""completed""expired""cancelled"
tokens?|null
Example Request
curl -X GET 'https://example.com/api/v1/auth/pair/497f6eca-6276-4993-bfeb-53cbbbba6f08/status'
Example Response200
{  "status": "pending",  "tokens": {    "accessToken": "string",    "refreshToken": "string",    "expiresIn": 0,    "tokenType": "Bearer"  }}

Cancel pairing

DELETE
/auth/pair/{pairId}

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

pairId*string
Formatuuid

Response Body

Pairing abgebrochen

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