Webhooks
Webhooks
Section titled “Webhooks”Status Implementasi
Section titled “Status Implementasi”Webhooks belum diimplementasikan di Merq.
Audit terhadap merq-backend/internal/ tidak menemukan handler, route, atau infrastruktur webhook apapun. Tidak ada referensi ke “webhook” di seluruh codebase backend.
Alternatif: Polling API
Section titled “Alternatif: Polling API”Untuk integrasi eksternal yang membutuhkan data real-time, gunakan polling terhadap endpoint yang ada.
Contoh: Cek visit terbaru
Section titled “Contoh: Cek visit terbaru”# Ambil daftar visit dengan filter statusGET /api/office/v1/outlet-visits?workspace_id=1&status=completed&page=1&limit=50Authorization: Bearer <token>Contoh: Cek submission terbaru
Section titled “Contoh: Cek submission terbaru”GET /api/office/v1/outlet-visits/submissions?workspace_id=1&page=1&limit=50Authorization: Bearer <token>Semua list endpoint mendukung pagination via page dan limit. Filter yang tersedia berbeda per modul — lihat Postman Collection untuk daftar lengkap parameter per endpoint.
Catatan untuk Developer
Section titled “Catatan untuk Developer”Jika webhook dibutuhkan di masa mendatang, implementasi perlu:
- Tabel
webhooksdi database (URL target, secret, event filter, workspace scope) - Event dispatcher yang dipanggil dari service layer setelah operasi write
- Worker/goroutine untuk pengiriman HTTP async dengan retry
- HMAC-SHA256 signing pada payload
- Admin UI untuk manajemen webhook per workspace
Saat ini tidak ada timeline untuk implementasi fitur ini.