Reporting API ============= Closure Packs ------------- .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/closure-packs/`` - GET - oem_reporting, central_ops - List closure packs. Filters: ``status``, ``oem``, ``date_range`` * - ``/api/v1/closure-packs/`` - POST - oem_reporting - Compile closure pack. Body: ``{installation}``. Auto-links survey report + installation report * - ``/api/v1/closure-packs/{id}/`` - GET - oem_reporting, central_ops, oem (own) - Get closure pack detail with all linked reports and media * - ``/api/v1/closure-packs/{id}/`` - PATCH - oem_reporting - Update: status, confirmation_call_completed * - ``/api/v1/closure-packs/{id}/submit/`` - POST - oem_reporting - Submit pack to OEM. Creates ReportSubmission record Periodic Reports ---------------- .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/reports/weekly/`` - GET - oem_reporting, central_ops - List weekly reports. Filters: ``oem``, ``date_range`` * - ``/api/v1/reports/weekly/`` - POST - oem_reporting - Generate weekly report. Body: ``{oem, week_start, week_end}`` * - ``/api/v1/reports/monthly/`` - GET - oem_reporting, central_ops - List monthly reports. Filters: ``oem``, ``year``, ``month`` * - ``/api/v1/reports/monthly/`` - POST - oem_reporting - Generate monthly report. Body: ``{oem, month}`` * - ``/api/v1/reports/{id}/submit/`` - POST - oem_reporting - Submit report to OEM Dashboard --------- .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/reports/dashboard/`` - GET - central_ops, oem_reporting - Reporting dashboard: pending closure packs, upcoming report deadlines, submission stats