API für Firmen
Erstellen Sie Links + QR-Codes, holen Sie Bewertungen ab und lassen Sie neue Antworten per Webhook pushen.
Authentifizierung
Alle Requests senden den API-Key im Header
Authorization: Bearer or_<prefix>_<secret>.
Endpoints
| Methode | Pfad | Beschreibung |
|---|---|---|
| GET | /api/forms | Verfügbare Formulare inkl. Felder (query: status? = draft/active/archived) |
| GET | /api/forms/{form_id}/replies | Die letzten Antworten eines Formulars (query: limit?≤50, Default 10) |
| POST | /api/forms/{form_id}/submit | Neue Antwort per API (body: { answers: { "<field_id>": <wert> } }, validiert gegen die Felddefinitionen) |
| GET | /api/links | Liste der eigenen Links |
| POST | /api/links | Neue Links erzeugen (body: form_id, count?≤50, order_ref?, note?, ttl_days? (0 = keine Ablauf), multiuse? (nur global/product), qr? (true = SVG je Link)) |
| POST | /api/links/{token}/revoke | Link deaktivieren |
| GET | /api/replies | Bewertungen (query: since? = YYYY-MM-DD, limit≤100; neueste zuerst) |
| GET | /api/stats/{form_id} | Aggregierte Statistik (Ø, Verteilung, Zeitreihen) |
| POST | /api/webhook/{secret}/test | Test-Webhook an die im Account hinterlegte URL |
Webhook-Abladung
Unter Absätze → API → Webhook-URL eine URL hinterlegen.
POST {Ihre-Webhook-URL}
Content-Type: application/json; charset=utf-8
{
"event": "reply.created",
"reply_id": 1234,
"company": "Acme GMBH",
"form": "Lieferung 2026-08-24",
"order_ref": "ORD-12345",
"headline_rating": 5,
"comment": "Super schnell!",
"answers": { "7": 5, "8": "Super schnell!" },
"submitted_at": "2026-08-25 09:30:11"
}
Hinweis: Es wird kein Signatur-Header (z. B. HMAC) gesendet —
der Ereignistyp steht im Feld event,
answers ist ein Objekt Feld-ID → Wert (Checkbox-Werte sind String-Listen).
Beispiel (curl)
# 3 neue Links für Form 42
curl -s -H "Authorization: Bearer ***" \
-H "Content-Type: application/json" \
-d '{"form_id":42,"count":3,"order_ref":"ORD-2026-08"}' \
https://orderrate.de/api/links
# 1 Mehrfach-Link (Global- oder Produkt-Formular) — bleibt nach jeder Bewertung aktiv
curl -s -H "Authorization: Bearer ***" \
-H "Content-Type: application/json" \
-d '{"form_id":43,"count":1,"multiuse":true}' \
https://orderrate.de/api/links
# Antworten seit gestern
curl -s -H "Authorization: Bearer ***" \
"https://orderrate.de/api/replies?since=2026-08-24&limit=50"
Fertige Integrationen
Neben der API stehen fertige Integrationen für gängige Shopsysteme und eine Desktop-App bereit:
- Qt‑6 Desktop‑App (
client/): Link‑Verwaltung, QR‑Code‑Druck, Antworten‑Übersicht — native Windows‑App. - WordPress‑Plugin (
wpplugin/): Shortcodes für Formulare, Antworten, neue Links und Durchschnittswerte. - thirty bees / PrestaShop‑Modul (
thirtybees/): automatischer QR‑Code in der Rechnung mitorder_ref= Bestellnummer.