Installations API ================= Installations ------------- .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/installations/`` - GET - central_ops, field_team (assigned only) - List installations. Filters: ``status``, ``scheduled_date``, ``material_ready``, ``zone`` * - ``/api/v1/installations/`` - POST - central_ops - Create installation from approved survey. Body: ``{survey, scheduled_date, scheduled_time_slot}`` * - ``/api/v1/installations/{id}/`` - GET - central_ops, field_team (assigned) - Get installation detail with assignments, materials, report * - ``/api/v1/installations/{id}/`` - PATCH - central_ops - Update: scheduled_date, scheduled_time_slot, status, material_ready * - ``/api/v1/installations/{id}/assign/`` - POST - central_ops - Assign team. Body: ``{team}`` * - ``/api/v1/installations/{id}/confirm/`` - POST - central_ops - Pre-installation customer confirmation. Updates ``customer_confirmed=True`` * - ``/api/v1/installations/{id}/close/`` - POST - central_ops - Close installation. Validates report submitted + demo completed Installation Reports -------------------- .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/installations/{id}/report/`` - GET - central_ops, field_team (assigned) - Get installation report * - ``/api/v1/installations/{id}/report/`` - POST - field_team (assigned) - Submit report. Body: ``{charger_serial_number, charger_model, installation_successful, demo_given, issues_encountered, general_notes}`` Installation Media ------------------ .. list-table:: :header-rows: 1 :widths: 30 10 20 40 * - Endpoint - Method - Permission - Description * - ``/api/v1/installations/{id}/media/`` - GET - central_ops, field_team (assigned) - List installation media * - ``/api/v1/installations/{id}/media/`` - POST - field_team (assigned) - Upload media. Body (multipart): ``{media_type, file, caption}`` * - ``/api/v1/installations/{id}/media/{media_id}/`` - DELETE - central_ops - Remove media file