Dokumentation für Entwickler
Die API trennt allStats für alles zusammen, generalStats für Allgemein und projectStats für Projekte. Gleiche projectId wird über alle Tablets summiert.
1. Authentifizierung
Sende den API-Schlüssel bei jedem Request im Authorization Header.
2. Zeitraum
Nutze from und to im Format YYYY-MM-DD. Maximal 366 Tage pro Request.
3. Daten lesen
totalCents ist der Betrag in Cent. Mit includeDevices=1 kommt die Aufteilung je Tablet.
Endpoints
| GET /client-api/v1/me | Prüft, ob der Schlüssel funktioniert. |
| GET /client-api/v1/live-status | Live-Status für Bildschirme: heutige Summen je Projekt, letzte Spenden und Tablet-Status. |
| GET /client-api/v1/project-stats | Liefert Spendenstatistiken gruppiert nach Projekt. |
Beispiel-Antwort
{
"ok": true,
"range": { "from": "2026-10-01", "to": "2026-10-31" },
"allStats": { "count": 124, "totalCents": "582000", "currency": "EUR" },
"generalStats": { "projectId": "__general__", "label": "Allgemein", "count": 12, "totalCents": "52000", "currency": "EUR" },
"projectStats": [
{ "projectId": "sadaqa", "label": "Sadaqa", "totalCents": "410000" },
{ "projectId": "moschee", "label": "Moschee", "totalCents": "120000" }
],
"totals": { "count": 124, "totalCents": "582000", "currency": "EUR" },
"projects": [
{
"projectId": "sadaqa",
"label": "Sadaqa",
"kind": "project",
"count": 80,
"totalCents": "410000",
"currency": "EUR",
"devices": [
{ "deviceId": "tablet_1", "deviceName": "Tablet Eingang", "count": 45, "totalCents": "240000", "currency": "EUR" }
]
}
]
}
projectId ist die stabile Projekt-ID. Gleiche ID bedeutet: zusammenrechnen.
label ist der sichtbare Projektname.
totalCents ist der Gesamtbetrag in Cent als String.
devices ist nur gefüllt, wenn includeDevices=1 gesendet wird.
Mehrere Projekte
Wenn mehrere Projekte aktiv sind, kommt jedes Projekt als eigener Eintrag in projectStats[]. Derselbe projectId wird automatisch über alle Tablets summiert. Mit includeDevices=1 sieht man zusätzlich, welches Tablet wie viel gesammelt hat.
Allgemein und Projekte getrennt
allStats ist alles zusammen. generalStats ist nur der Bereich Allgemein. projectStats enthält die Projekte getrennt. totals/projects bleiben aus Kompatibilität ebenfalls vorhanden.