Reports
Gleicher Inhalt wie der Monatsbericht per E-Mail: alle eigenen und freigegebenen Fahrzeuge (bei freigegebenen nur die eigenen Fahrten), offene Fahrten und Orte, die im Monat zum ersten Mal angefahren wurden. Monatsgrenzen in der Ortszeit der Fahrt.
bearerAuthAuthorizationBearer <JWT>month?stringYYYY-MM, Standard ist der Vormonat in der Kontozeitzone.
^\d{4}-(0[1-9]|1[0-2])$Monatsbericht
application/json- response
month?stringfrom?stringdateto?stringdatetimeZone?stringdistanceUnit?stringAnzeigeeinheit des Benutzers; alle Werte sind in km
"km""mi"isEmpty?booleanKeine Fahrten im Monat und keine offenen Fahrten – es wird keine Mail versendet
totals?vehicles?array<>openTrips?array<>olderOpenTripCount?integerOffene Fahrten aus früheren Monaten
newPlaces?array<>Ziele, die im Monat erstmals angefahren wurden (vorher keine Fahrt im Erkennungsradius), unabhängig davon, ob sie gespeichert sind.
curl -X GET 'https://example.com/api/v1/reports/monthly'{ "month": "string", "from": "2019-08-24", "to": "2019-08-24", "timeZone": "string", "distanceUnit": "km", "isEmpty": true, "totals": { "drivenKm": 0, "businessKm": 0, "tripCount": 0, "openTripCount": 0, "openKm": 0 }, "vehicles": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "licensePlate": "string", "access": "owner", "ownerName": "string", "tripCount": 0, "openTripCount": 0, "drivenKm": 0, "actualKm": 0, "trackedKm": 0, "businessKm": 0, "privateKm": 0, "commuteKm": 0, "unclassifiedKm": 0, "otherDriversKm": 0, "unexplainedKm": 0, "endOdometerKm": 0 } ], "openTrips": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "vehicleName": "string", "startedAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z", "localStart": "string", "localEnd": "string", "startAddress": "string", "endAddress": "string", "distanceKm": 0, "suggestion": { "type": "business", "reason": "string", "source": "places", "confidence": 0, "historyCount": 0, "historyTotal": 0, "provider": "string", "purpose": "string", "contact": "string", "startPlace": {}, "endPlace": {} } } ], "olderOpenTripCount": 0, "newPlaces": [ { "key": "string", "address": "string", "latitude": 0, "longitude": 0, "firstVisit": "2019-08-24", "tripCount": 0, "distanceKm": 0, "openTripCount": 0, "mainType": "business", "purpose": "string", "savedPlace": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" } } ]}Zum Testen und Debuggen: sendet den Bericht sofort, auch für einen leeren
Monat. Nur verfügbar, wenn features.monthlyReportSendNow aktiv ist
(Standard im dev-Image, sonst 404 FEATURE_DISABLED).
bearerAuthAuthorizationBearer <JWT>application/json- body
month?stringGesendet
application/json- response
sent?booleanto?|emailmonth?stringcurl -X POST 'https://example.com/api/v1/reports/monthly/send' \ -H 'Content-Type: application/json' \ -d '{}'{ "sent": true, "to": "user@example.com", "month": "string"}