# Frontend integration checklist (Flutter & Dashboard)

1. Configure base URL and `/api/v1` prefix per environment; send `Accept: application/json`.
2. Parse HTTP status first; 204/205 and downloads do not have a JSON envelope.
3. For 2xx JSON, parse top-level `message` and object-valued `data`.
4. For 4xx/5xx JSON, parse `message`, `errors`, `code`, `correlation_id`, `details`.
5. Render validation messages by field name and preserve nested keys such as `items.0.quantity`.
6. Handle missing/unknown `code` and nullable endpoint fields without crashing.
7. Read `X-Correlation-Id` for support tickets; never treat it as a business record ID.
8. Support Arabic/English using `Accept-Language`; do not branch on localized strings.
9. Respect 401 vs 403, 409 conflicts, 429 retry hints, and transient 5xx failures.
10. Validate each endpoint's role, filters, sorting, pagination, idempotency and attachments from its module file.

**Release gate:** do not ship the new parser against an environment that still serves the old envelope. Coordinate backend rollout and both clients. No staging verification has been recorded.
