Expenses
Nur verfügbar, wenn features.expenses in /config/services true ist (sonst 404 FEATURE_DISABLED). Tank-/Ladevorgänge und sonstige Fahrzeugkosten des angemeldeten Benutzers (nur eigene Fahrzeuge), neueste zuerst.
bearerAuthAuthorizationBearer <JWT>vehicleId?stringuuidfrom?stringdateto?stringdatecategory?string"fuel""charging""insurance""tax""maintenance""repair""tires""leasing""financing""parking""toll""cleaning""inspection""other"Kosteneinträge
application/json- response
[index: integer]?curl -X GET 'https://example.com/api/v1/expenses'[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "vehicleName": "string", "category": "fuel", "date": "2019-08-24", "amount": 0, "amountCents": 0, "currency": "string", "odometerKm": 0, "quantity": 0, "quantityUnit": "string", "pricePerUnit": 0, "fuelType": "string", "fullTank": true, "periodStart": "2019-08-24", "periodEnd": "2019-08-24", "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5", "vendor": "string", "notes": "string", "source": "manual", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }]bearerAuthAuthorizationBearer <JWT>application/json- body
Bei POST sind vehicleId, category, date und amount Pflicht. Tankfelder gelten nur für fuel/charging.
vehicleId?stringuuidcategory?ExpenseCategory"fuel""charging""insurance""tax""maintenance""repair""tires""leasing""financing""parking""toll""cleaning""inspection""other"date?stringdateamount?numberBruttobetrag in der angegebenen Währung
0 <= valuecurrency?string^[A-Z]{3}$"EUR"odometerKm?|0 <= valuequantity?|0 < valuequantityUnit?|Standard l (fuel) bzw. kwh (charging)
"l""kwh""kg"nullfuelType?|"petrol""diesel""lpg""cng""electric""hydrogen""other"nullfullTank?booleanfalseperiodStart?|dateperiodEnd?|datetripId?|uuidvendor?|length <= 200notes?|length <= 2000Kosteneintrag angelegt
application/json- response
id?stringuuidvehicleId?stringuuidvehicleName?stringcategory?ExpenseCategory"fuel""charging""insurance""tax""maintenance""repair""tires""leasing""financing""parking""toll""cleaning""inspection""other"date?stringdateamount?numberamountCents?integercurrency?stringodometerKm?number|nullquantity?number|nullquantityUnit?string|nullpricePerUnit?number|nullfuelType?string|nullfullTank?booleanperiodStart?|dateperiodEnd?|datetripId?|uuidvendor?string|nullnotes?string|nullsource?string"manual""csv_import"createdAt?stringdate-timeupdatedAt?stringdate-timecurl -X POST 'https://example.com/api/v1/expenses' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "vehicleName": "string", "category": "fuel", "date": "2019-08-24", "amount": 0, "amountCents": 0, "currency": "string", "odometerKm": 0, "quantity": 0, "quantityUnit": "string", "pricePerUnit": 0, "fuelType": "string", "fullTank": true, "periodStart": "2019-08-24", "periodEnd": "2019-08-24", "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5", "vendor": "string", "notes": "string", "source": "manual", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Gesamtkosten je Kategorie und Währung, Kosten pro km, Kostenanteil je Fahrtart (nach gefahrenen km), Energiemengen und Durchschnittsverbrauch (Volltank-Methode). Kosten mit Leistungszeitraum werden tagesgenau anteilig verteilt. Standardzeitraum ist das aktuelle Kalenderjahr in der Kontozeitzone.
bearerAuthAuthorizationBearer <JWT>vehicleId*stringuuidfrom?stringdateto?stringdateKostenauswertung
application/json- response
vehicleId?stringuuidfrom?stringdateto?stringdatetimeZone?stringdistance?costs?array<>energy?array<>consumption?array<>curl -X GET 'https://example.com/api/v1/expenses/summary?vehicleId=497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "from": "2019-08-24", "to": "2019-08-24", "timeZone": "string", "distance": { "totalKm": 0, "tripCount": 0, "byTripType": { "property1": 0, "property2": 0 }, "shares": { "property1": 0, "property2": 0 } }, "costs": [ { "currency": "string", "total": 0, "costPerKm": 0, "byCategory": [ { "category": "fuel", "amount": 0, "entries": 0 } ], "byTripType": { "property1": 0, "property2": 0 } } ], "energy": [ { "unit": "string", "currency": "string", "quantity": 0, "amount": 0, "entries": 0, "averagePricePerUnit": 0 } ], "consumption": [ { "unit": "string", "quantity": 0, "distanceKm": 0, "intervals": 0, "per100Km": 0 } ]}Liest eine CSV-Datei (z. B. Spritmonitor-Export von Tankungen oder Kosten, deutsch oder englisch) und liefert erkannte Spaltenzuordnung, Formate, Zählwerte, Fehler/Hinweise und eine Vorschau. Es wird nichts gespeichert. Bereits vorhandene Einträge werden als Duplikate erkannt.
bearerAuthAuthorizationBearer <JWT>application/json- body
vehicleId*stringuuidcontent*stringCSV-Datei Base64-kodiert (max. 3 MB). UTF-8 oder Windows-1252.
bytemapping?Optionale Spaltenzuordnung Feld → Spaltenindex (0-basiert). Ohne Angabe wird sie aus der Kopfzeile erkannt.
kind?stringTankungen oder sonstige Kosten
"fuel""costs"energy?string"fuel_l""fuel_l""fuel_kg""charging_kwh"dateFormat?string"DD.MM.YYYY""YYYY-MM-DD""DD/MM/YYYY""MM/DD/YYYY"decimalSeparator?string",""."currency?stringWährung, falls die Datei keine enthält
^[A-Z]{3}$Importvorschau
application/json- response
source?string"spritmonitor""generic"encoding?stringdelimiter?stringheaders?array<string>sampleRows?array<array<string>>mapping?options?missingRequired?array<string>counts?dateRange?|nullerrors?array<>warnings?array<>preview?array<>curl -X POST 'https://example.com/api/v1/expenses/import/preview' \ -H 'Content-Type: application/json' \ -d '{ "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "content": "string"}'{ "source": "spritmonitor", "encoding": "string", "delimiter": "string", "headers": [ "string" ], "sampleRows": [ [ "string" ] ], "mapping": { "property1": 0, "property2": 0 }, "options": {}, "missingRequired": [ "string" ], "counts": { "rows": 0, "valid": 0, "new": 0, "duplicates": 0, "errors": 0, "warnings": 0, "fullTanks": 0 }, "dateRange": {}, "errors": [ { "line": 0, "message": "string" } ], "warnings": [ { "line": 0, "message": "string" } ], "preview": [ {} ]}Importiert alle gültigen, noch nicht vorhandenen Zeilen in einer Transaktion (Quelle csv_import). Fehlerhafte Zeilen werden übersprungen und gemeldet.
bearerAuthAuthorizationBearer <JWT>application/json- body
vehicleId*stringuuidcontent*stringCSV-Datei Base64-kodiert (max. 3 MB). UTF-8 oder Windows-1252.
bytemapping?Optionale Spaltenzuordnung Feld → Spaltenindex (0-basiert). Ohne Angabe wird sie aus der Kopfzeile erkannt.
kind?stringTankungen oder sonstige Kosten
"fuel""costs"energy?string"fuel_l""fuel_l""fuel_kg""charging_kwh"dateFormat?string"DD.MM.YYYY""YYYY-MM-DD""DD/MM/YYYY""MM/DD/YYYY"decimalSeparator?string",""."currency?stringWährung, falls die Datei keine enthält
^[A-Z]{3}$Import abgeschlossen
application/json- response
imported?integerduplicates?integererrors?array<>warnings?array<>curl -X POST 'https://example.com/api/v1/expenses/import' \ -H 'Content-Type: application/json' \ -d '{ "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "content": "string"}'{ "imported": 0, "duplicates": 0, "errors": [ { "line": 0, "message": "string" } ], "warnings": [ { "line": 0, "message": "string" } ]}bearerAuthAuthorizationBearer <JWT>id*stringuuidKosteneintrag
application/json- response
id?stringuuidvehicleId?stringuuidvehicleName?stringcategory?ExpenseCategory"fuel""charging""insurance""tax""maintenance""repair""tires""leasing""financing""parking""toll""cleaning""inspection""other"date?stringdateamount?numberamountCents?integercurrency?stringodometerKm?number|nullquantity?number|nullquantityUnit?string|nullpricePerUnit?number|nullfuelType?string|nullfullTank?booleanperiodStart?|dateperiodEnd?|datetripId?|uuidvendor?string|nullnotes?string|nullsource?string"manual""csv_import"createdAt?stringdate-timeupdatedAt?stringdate-timecurl -X GET 'https://example.com/api/v1/expenses/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "vehicleName": "string", "category": "fuel", "date": "2019-08-24", "amount": 0, "amountCents": 0, "currency": "string", "odometerKm": 0, "quantity": 0, "quantityUnit": "string", "pricePerUnit": 0, "fuelType": "string", "fullTank": true, "periodStart": "2019-08-24", "periodEnd": "2019-08-24", "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5", "vendor": "string", "notes": "string", "source": "manual", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Teil-Update; nicht übergebene Felder bleiben unverändert.
bearerAuthAuthorizationBearer <JWT>id*stringuuidapplication/json- body
Bei POST sind vehicleId, category, date und amount Pflicht. Tankfelder gelten nur für fuel/charging.
vehicleId?stringuuidcategory?ExpenseCategory"fuel""charging""insurance""tax""maintenance""repair""tires""leasing""financing""parking""toll""cleaning""inspection""other"date?stringdateamount?numberBruttobetrag in der angegebenen Währung
0 <= valuecurrency?string^[A-Z]{3}$"EUR"odometerKm?|0 <= valuequantity?|0 < valuequantityUnit?|Standard l (fuel) bzw. kwh (charging)
"l""kwh""kg"nullfuelType?|"petrol""diesel""lpg""cng""electric""hydrogen""other"nullfullTank?booleanfalseperiodStart?|dateperiodEnd?|datetripId?|uuidvendor?|length <= 200notes?|length <= 2000Kosteneintrag aktualisiert
application/json- response
id?stringuuidvehicleId?stringuuidvehicleName?stringcategory?ExpenseCategory"fuel""charging""insurance""tax""maintenance""repair""tires""leasing""financing""parking""toll""cleaning""inspection""other"date?stringdateamount?numberamountCents?integercurrency?stringodometerKm?number|nullquantity?number|nullquantityUnit?string|nullpricePerUnit?number|nullfuelType?string|nullfullTank?booleanperiodStart?|dateperiodEnd?|datetripId?|uuidvendor?string|nullnotes?string|nullsource?string"manual""csv_import"createdAt?stringdate-timeupdatedAt?stringdate-timecurl -X PATCH 'https://example.com/api/v1/expenses/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb", "vehicleName": "string", "category": "fuel", "date": "2019-08-24", "amount": 0, "amountCents": 0, "currency": "string", "odometerKm": 0, "quantity": 0, "quantityUnit": "string", "pricePerUnit": 0, "fuelType": "string", "fullTank": true, "periodStart": "2019-08-24", "periodEnd": "2019-08-24", "tripId": "ab93ac19-a7bf-4885-87b6-6dcba80ee2d5", "vendor": "string", "notes": "string", "source": "manual", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}bearerAuthAuthorizationBearer <JWT>id*stringuuidGelöscht
curl -X DELETE 'https://example.com/api/v1/expenses/497f6eca-6276-4993-bfeb-53cbbbba6f08'