Receive stats — POST /api/receive-stats

An endpoint that accepts operational numbers from an external app and records the call. In the current release the payload is written to the audit log and the numbers are not stored in any table — do not build reports on it until storage is announced.

Last updated: 2026-09-21

On this page

Contract

Field Rule Required
app_id required|string
timestamp required|string
metrics required|array
bash
curl -s -X POST "APP_URL/api/receive-stats" \
  -H "X-API-KEY: KEY" -H "Content-Type: application/json" -H "Accept: application/json" \
  -d '{"app_id":"erp-prod","timestamp":"2026-10-15T09:00:00Z","metrics":{"cheques_today":12}}'

200: {"message":"Metrics received"} · 422 in the standard Laravel shape.

What actually happens

تنبيه

The numbers are not stored. The call is written to the audit log with its payload and a line goes to the server log — there is no table and no screen showing metrics. The endpoint exists for compatibility with clients that push stats; no report is built on it. Any change will be announced in What’s new.

No idempotency. The audit row is stamped with the key’s company.

اطلب نسختك التجريبية مجانًا