Emergency API ============= Emergency Events ---------------- .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/emergencies/`` - GET - central_ops - List emergencies. Filters: ``status``, ``event_type``, ``date_range`` * - ``/api/v1/emergencies/`` - POST - field_team, central_ops - Report emergency. Body: ``{event_type, survey (or installation), reason}`` * - ``/api/v1/emergencies/{id}/`` - GET - central_ops - Get emergency detail with backup searches, assignment/reschedule * - ``/api/v1/emergencies/{id}/`` - PATCH - central_ops - Update status Backup Search & Resolution --------------------------- .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/emergencies/{id}/search-backup/`` - POST - central_ops - Trigger backup team search. Returns available teams in zone with availability status. Creates BackupSearch records. * - ``/api/v1/emergencies/{id}/assign-backup/`` - POST - central_ops - Assign backup team. Body: ``{backup_team}``. Creates EmergencyAssignment + SurveyAssignment/InstallationAssignment * - ``/api/v1/emergencies/{id}/reschedule/`` - POST - central_ops - Priority reschedule. Body: ``{new_date, new_time_slot}``. Creates PriorityReschedule record. Sends notification to customer.