{"swagger": "2.0", "info": {"title": "CrisisCleanup API", "description": "\n## Crisis Cleanup API (v3)\n\nBuild, integrate, and test against our modern, versioned API. The interactive reference below lets you explore endpoints and send real requests.\n\n### Authentication\n- Request an API token by emailing `help@crisiscleanup.org`.\n- Include `Authorization: Token <token>` on requests.\n\n### Usage tips\n- Pagination: `limit` and `offset`\n- Sorting: `ordering=field` or `ordering=-field`\n- Search and filters vary by endpoint (see parameters below)\n\n### Getting help\nQuestions or issues? Email `help@crisiscleanup.org`.\n", "contact": {"url": "https://crisiscleanup.org", "email": "help@crisiscleanup.org"}, "version": "v3"}, "host": "crisiscleanup-3-api-production.up.railway.app", "schemes": ["https"], "basePath": "/", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Token": {"type": "apiKey", "name": "Authorization", "in": "header", "description": "Authenticate using `Token <API_KEY>`"}}, "security": [{"Token": []}], "paths": {"/clear-cache/": {"post": {"operationId": "clear-cache_create", "summary": "Clear user cache", "description": "Invalidate all cached responses scoped to the authenticated user. Under versioned cache keys this bumps the user's scope counter; subsequent reads miss and repopulate with fresh data. Orphan entries age out via TTL.", "parameters": [], "responses": {"200": {"description": "Cache invalidated", "schema": {"type": "object", "properties": {"message": {"description": "Success message", "type": "string"}, "invalidated": {"description": "Scope identifiers whose version counters were bumped, e.g. ['user:42'].", "type": "array", "items": {"type": "string"}}}}}, "401": {"description": "Authentication required"}}, "tags": ["Common - Cache"]}, "parameters": []}, "/incidents": {"get": {"operationId": "incidents_list", "summary": "List disaster incidents", "description": "\nRetrieve a paginated list of disaster incidents with comprehensive filtering options.\n\n**Access Control:**\n- Unauthenticated: Active, non-archived incidents only\n- Authenticated: Incidents accessible to user's organization\n- Phone agents: Recent incidents (60 days) plus organization incidents\n- Admins: All incidents including archived and future-dated\n\n**Performance Optimizations:**\n- Aggressive caching for frequently accessed data\n- Optimized prefetch strategies for form fields and locations\n- Efficient queryset filtering to minimize database load\n\n**Geographic Integration:**\n- Returns incident boundaries for mapping interfaces\n- Includes calculated center points and geofences\n- Work type summaries for resource visualization\n", "parameters": [{"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "name", "required": false, "type": "string"}, {"name": "name__icontains", "in": "query", "description": "name__icontains", "required": false, "type": "string"}, {"name": "start_at__gt", "in": "query", "description": "start_at__gt", "required": false, "type": "string"}, {"name": "start_at__lt", "in": "query", "description": "start_at__lt", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["start_at", "-start_at"]}, {"name": "location", "in": "query", "description": "Filter by location ID to show incidents affecting specific geographic areas", "type": "integer"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "fields", "in": "query", "description": "Comma-separated list of fields to include in response. Supports: id,name,case_label,start_at,form_fields,uuid,short_name,locations,timezone,incident_type,color,is_archived,created_work_types,active_phone_number,incident_center,geofence", "type": "string", "example": "id,name,short_name,locations,created_work_types"}, {"name": "move_case", "in": "query", "description": "When true, expands access to recent incidents for case transfer operations", "type": "boolean"}], "responses": {"200": {"description": "Paginated list of incidents", "schema": {"type": "object", "properties": {"count": {"description": "Total number of incidents", "type": "integer"}, "next": {"description": "Next page URL", "type": "string", "format": "uri"}, "previous": {"description": "Previous page URL", "type": "string", "format": "uri"}, "results": {"type": "array", "items": {"type": "object", "$ref": "#/definitions/Incident"}}}}}, "401": {"description": "Authentication required for full access"}, "403": {"description": "Insufficient permissions"}}, "tags": ["Incidents"]}, "post": {"operationId": "incidents_create", "summary": "Create a new disaster incident", "description": "\nCreate a new disaster incident for emergency response coordination.\n\nThis endpoint establishes a new disaster incident with:\n- Basic incident information (name, type, start date)\n- Geographic boundaries and center point calculation\n- Automatic case label and color assignment\n- Database sequence creation for case numbering\n\n**Required Permissions:**\n- User must have 'CanCreateIncident' permission\n- Typically restricted to Crisis Cleanup administrators\n\n**Automatic Configuration:**\n- Case labels cycle through alphabet (A, B, C...)\n- Colors rotate through predefined sequence\n- Database sequences created for case number generation\n- Initial form templates can be configured separately\n\n**Geographic Setup:**\n- Locations must be defined separately via location endpoints\n- Incident center calculated from location boundaries\n- Supports single or multi-location incidents\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["name", "short_name", "start_at"], "type": "object", "properties": {"name": {"description": "Human-readable incident name", "type": "string", "example": "Hurricane Ian Response"}, "short_name": {"description": "Database-friendly name", "type": "string", "example": "hurricane_ian_2022"}, "start_at": {"description": "Incident start timestamp", "type": "string", "format": "date-time"}, "incident_type": {"description": "Disaster type", "type": "string", "example": "hurricane"}, "timezone": {"description": "Incident timezone", "type": "string", "default": "America/Chicago", "example": "America/New_York"}, "turn_on_release": {"description": "Auto-activate incident on creation", "type": "boolean", "default": false}, "auto_contact": {"description": "Enable automatic contact features", "type": "boolean", "default": false}}}}], "responses": {"201": {"description": "Incident created successfully", "schema": {"type": "object", "$ref": "#/definitions/Incident"}}, "400": {"description": "Invalid input data"}, "401": {"description": "Authentication required"}, "403": {"description": "Insufficient permissions - requires CanCreateIncident"}}, "tags": ["Incidents"]}, "parameters": []}, "/incidents/{id}": {"get": {"operationId": "incidents_read", "summary": "Get single incident by id.", "description": "Get single incident by id.", "parameters": [{"name": "fields", "in": "query", "description": "fields to include in payload, comma-separated", "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Incident"}}}, "tags": ["Incidents"]}, "put": {"operationId": "incidents_update", "summary": "Update incident by id.", "description": "Update incident by id.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Incident"}}, {"name": "fields", "in": "query", "description": "fields to include in payload, comma-separated", "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Incident"}}}, "tags": ["Incidents"]}, "patch": {"operationId": "incidents_partial_update", "summary": "Partial update incident by id.", "description": "Partial update incident by id.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Incident"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Incident"}}}, "tags": ["Incidents"]}, "delete": {"operationId": "incidents_delete", "summary": "Delete incident by id.", "description": "Delete incident by id.", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["Incidents"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/incidents/{id}/files": {"post": {"operationId": "incidents_files_create", "summary": "Attach files to incident", "description": "\nAttach one or more files to this incident.\n\nFiles can include:\n- Documentation and reports\n- Maps and geographic data\n- Resource planning documents\n- Communication materials\n- Administrative records\n\n**Request Body:**\n- file: File ID to attach\n- file_type_t: Optional file type description\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["file"], "type": "object", "properties": {"file": {"description": "File ID to attach", "type": "integer"}, "file_type_t": {"description": "File type description", "type": "string"}}}}], "responses": {"201": {"description": "File attached successfully"}, "400": {"description": "Invalid file data"}, "404": {"description": "Incident or file not found"}}, "tags": ["Incidents"]}, "delete": {"operationId": "incidents_files_delete", "summary": "Detach files from incident", "description": "\nDetach files from this incident.\n\nRemoves the association between the file and incident without deleting the file.\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["file"], "type": "object", "properties": {"file": {"description": "File ID to detach", "type": "integer"}}}}], "responses": {"204": {"description": "File detached successfully"}, "400": {"description": "Invalid file data"}, "404": {"description": "Incident or file not found"}}, "tags": ["Incidents"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/incidents/{id}/handbill": {"get": {"operationId": "incidents_handbill", "summary": "Generate incident handbill PDF", "description": "\nGenerate a printable PDF handbill for public distribution about this incident.\n\nCreates a professionally formatted PDF document containing:\n- Incident name and basic information\n- Contact phone numbers for assistance requests\n- QR codes for online service requests\n- Disaster-specific messaging and instructions\n- Multi-language content when available\n\n**Document Features:**\n- Print-ready PDF format optimized for 8.5x11\" paper\n- High-contrast design for easy reading\n- Professional Crisis Cleanup branding\n- Embeddable in iframe for web display\n\n**Distribution Uses:**\n- Door-to-door survivor outreach\n- Community center posting\n- Emergency shelter distribution\n- Partner organization materials\n- Social media sharing (as image)\n\n**Content Sources:**\n- Incident basic information\n- Active phone numbers from ANI system\n- Customizable messaging templates\n- Geographic boundary information\n\nNote: This endpoint is iframe-exempt to support embedding in external sites.\n", "parameters": [], "responses": {"200": {"description": "PDF handbill document", "schema": {"type": "string", "format": "binary"}, "headers": {"Content-Type": {"type": "string", "default": "application/pdf"}, "Content-Transfer-Encoding": {"type": "string", "default": "binary"}}}, "404": {"description": "Incident not found"}}, "tags": ["Incidents"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/incidents/{id}/locations": {"post": {"operationId": "incidents_locations_create", "summary": "Add location", "description": "Associate a location with this entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/LocationJoin"}}], "responses": {"201": {"description": "Location associated"}, "400": {"description": "Invalid location data"}, "404": {"description": "Entity not found"}}, "tags": ["Locations"]}, "delete": {"operationId": "incidents_locations_delete", "summary": "Remove location", "description": "Remove location association from this entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/LocationJoin"}}], "responses": {"204": {"description": "Location association removed"}, "400": {"description": "Invalid location data"}, "404": {"description": "Entity or location not found"}}, "tags": ["Locations"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/incidents/{id}/organizations": {"get": {"operationId": "incidents_organizations", "summary": "List organizations participating in incident", "description": "\nRetrieve all organizations approved to participate in this incident's response.\n\nReturns comprehensive organizational statistics including:\n- User counts and activity metrics\n- Worksite reporting and claiming statistics\n- Commercial value of completed work\n- Response time and overdue work metrics\n- Contact information for coordination\n\n**Access Levels:**\n- Unauthenticated: Basic organization information only\n- Authenticated: Full statistics and contact information\n\n**Organization Metrics:**\n- **Reported Count**: Worksites initially reported by organization\n- **Claimed Count**: Work types currently claimed by organization\n- **Closed Count**: Completed work types\n- **Overdue Count**: Work claimed >6 days ago but still open\n- **Commercial Value**: Dollar value of completed commercial work\n- **Last Login**: Most recent user activity from organization\n\n**Search Functionality:**\n- Full-text search across organization names\n- Supports pagination for incidents with many participating organizations\n", "parameters": [{"name": "search", "in": "query", "description": "Search organization names using full-text search", "type": "string"}], "responses": {"200": {"description": "Paginated list of participating organizations with statistics", "schema": {"type": "object", "properties": {"count": {"description": "Total participating organizations", "type": "integer"}, "results": {"type": "array", "items": {"type": "object", "$ref": "#/definitions/IncidentOrganization"}}}}}, "404": {"description": "Incident not found"}}, "tags": ["Incidents"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/incidents/{id}/template": {"get": {"operationId": "incidents_template", "summary": "Get incident form template", "description": "\nRetrieve the complete form template configuration for this incident.\n\nReturns all form fields configured for survivor intake, including:\n- Field definitions and validation rules\n- Required/optional field designations\n- Dropdown options and default values\n- Field grouping and display order\n- Work type associations for automatic assignment\n\n**Form Template Structure:**\n- Fields organized by phases (intake, assessment, completion)\n- Parent-child relationships for conditional field display\n- Translated labels and help text\n- Validation rules and input constraints\n\n**Use Cases:**\n- Mobile app form rendering\n- Web interface field generation\n- Third-party integration form setup\n- Training material generation\n\n**Field Types:**\n- Text inputs (single/multi-line)\n- Checkboxes and radio buttons\n- Dropdown selections\n- Date/time pickers\n- Geographic coordinates\n- File uploads\n", "parameters": [], "responses": {"200": {"description": "Complete form template for incident", "schema": {"description": "Array of form fields with full configuration", "type": "array", "items": {"type": "object", "$ref": "#/definitions/IncidentFieldsTemplate"}}}, "404": {"description": "Incident not found"}}, "tags": ["Incidents"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/incidents_list": {"get": {"operationId": "incidents_list_list", "summary": "List public incident information", "description": "\nRetrieve publicly accessible disaster incident information without authentication.\n\nThis endpoint provides basic incident details suitable for:\n- Public emergency information websites\n- Community mapping applications\n- Third-party disaster response tools\n- Media and reporting organizations\n\n**Data Included:**\n- Basic incident identification and timing\n- Geographic boundaries and center points\n- Active contact phone numbers\n- Work type categories available\n- Public communication assets\n\n**Data Excluded:**\n- Sensitive organizational information\n- Detailed form field configurations\n- Internal coordination details\n- Private incident management data\n\n**Performance Features:**\n- Aggressive caching for high-traffic scenarios\n- Optimized database queries with prefetching\n- Geographic data ready for mapping integration\n", "parameters": [{"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "name", "required": false, "type": "string"}, {"name": "name__icontains", "in": "query", "description": "name__icontains", "required": false, "type": "string"}, {"name": "start_at__gt", "in": "query", "description": "start_at__gt", "required": false, "type": "string"}, {"name": "start_at__lt", "in": "query", "description": "start_at__lt", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["start_at", "-start_at"]}, {"name": "location", "in": "query", "description": "location", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "fields", "in": "query", "description": "Comma-separated list of fields to include. Available: id,name,case_label,start_at,uuid,short_name,incident_type,color,locations,created_work_types,active_phone_number,geofence", "type": "string", "example": "id,name,locations,active_phone_number"}], "responses": {"200": {"description": "Paginated list of public incident information", "schema": {"type": "object", "properties": {"count": {"description": "Total number of public incidents", "type": "integer"}, "results": {"type": "array", "items": {"type": "object", "$ref": "#/definitions/IncidentPublic"}}}}}}, "tags": ["Public", "Incidents"]}, "parameters": []}, "/incidents_list/{id}": {"get": {"operationId": "incidents_list_read", "summary": "Get public incident details", "description": "\nRetrieve detailed public information about a specific disaster incident.\n\nProvides comprehensive public information including:\n- Complete incident identification and timeline\n- Geographic boundaries and mapping data\n- All active contact phone numbers\n- Work type categories and descriptions\n- Associated locations and coverage areas\n\n**Geographic Data:**\n- Incident center point for map centering\n- Location boundaries for affected area visualization\n- Geofence information for mobile applications\n\n**Contact Information:**\n- Active phone numbers for requesting assistance\n- Phone number validity periods\n- Multi-language support when available\n\n**Integration Ready:**\n- Structured data for mapping APIs\n- Consistent format for third-party integrations\n- Cached responses for high-performance requirements\n", "parameters": [{"name": "fields", "in": "query", "description": "Comma-separated list of specific fields to return", "type": "string", "example": "id,name,locations,active_phone_number,geofence"}], "responses": {"200": {"description": "Detailed public incident information", "schema": {"type": "object", "$ref": "#/definitions/IncidentPublic"}}, "404": {"description": "Incident not found or not publicly accessible"}}, "tags": ["Public", "Incidents"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this incident.", "required": true, "type": "integer"}]}, "/invitation_requests": {"get": {"operationId": "invitation_requests_list", "summary": "List pending invitation requests", "description": "Retrieve list of pending organization invitation requests", "parameters": [{"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "organization", "in": "query", "description": "organization", "required": false, "type": "string"}, {"name": "organization__in", "in": "query", "description": "organization__in", "required": false, "type": "string"}, {"name": "requested_to", "in": "query", "description": "requested_to", "required": false, "type": "string"}, {"name": "requested_to__in", "in": "query", "description": "requested_to__in", "required": false, "type": "string"}, {"name": "approved_by", "in": "query", "description": "approved_by", "required": false, "type": "string"}, {"name": "approved_by__in", "in": "query", "description": "approved_by__in", "required": false, "type": "string"}, {"name": "approved_by__isnull", "in": "query", "description": "approved_by__isnull", "required": false, "type": "string"}, {"name": "rejected_by", "in": "query", "description": "rejected_by", "required": false, "type": "string"}, {"name": "rejected_by__in", "in": "query", "description": "rejected_by__in", "required": false, "type": "string"}, {"name": "rejected_by__isnull", "in": "query", "description": "rejected_by__isnull", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["rejected_at", "-rejected_at", "approved_at", "-approved_at", "requested_at", "-requested_at"]}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/InvitationRequest"}}}}}}, "tags": ["Users"]}, "post": {"operationId": "invitation_requests_create", "summary": "Submit invitation request to join organization", "description": "\nSubmit a request to join a specific organization.\n\n**Process**:\n1. Validates user information and organization\n2. Checks for existing invitations (auto-approves if found)\n3. Creates invitation request record\n4. Sends notifications to organization admins\n5. Sends confirmation to requesting user\n\n**Auto-Approval**: If the user already has a valid invitation from the\norganization, the request is automatically approved and user account created.\n\n**Request Body**:\n```json\n{\n    \"email\": \"user@example.com\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"mobile\": \"+1234567890\",\n    \"requested_to\": 123,\n    \"organization\": 456,\n    \"password\": \"securepassword\"\n}\n```\n\n**Returns**: Invitation request details or auto-approval confirmation\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/InvitationRequest"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/InvitationRequest"}}}, "tags": ["Users"]}, "parameters": []}, "/invitation_requests/{id}": {"get": {"operationId": "invitation_requests_read", "summary": "Get invitation request details", "description": "Retrieve details of a specific invitation request", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/InvitationRequest"}}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/invitation_requests/{id}/approve": {"post": {"operationId": "invitation_requests_approve", "summary": "Approve invitation request", "description": "\nApprove a pending invitation request and create user account.\n\n**Authentication Required**: Yes (for organization admin)\n**Permissions**: Organization admin or the specifically requested user\n\n**Process**:\n1. Validates admin has permission to approve\n2. Creates user account with provided information\n3. Assigns default organization roles\n4. Sends welcome email to new user\n5. Rejects any other outstanding requests for same email\n\n**Request Body**:\n```json\n{\n    \"approved_rejected_reason\": \"Welcome to our organization!\"\n}\n```\n\n**Side Effects**:\n- Creates new user account\n- Rejects other pending requests for same email\n- Sends notification emails\n- Creates audit trail\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/InvitationRequestAction"}}], "responses": {"200": {"description": "{\"status\": \"invitation_accepted\"}"}, "403": {"description": "Permission denied"}, "404": {"description": "Invitation request not found"}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/invitation_requests/{id}/reject": {"post": {"operationId": "invitation_requests_reject", "summary": "Reject invitation request", "description": "\nReject a pending invitation request.\n\n**Authentication Required**: Yes (for organization admin)\n**Permissions**: Organization admin or the specifically requested user\n\n**Process**:\n1. Validates admin has permission to reject\n2. Updates request status to rejected\n3. Records rejection reason and admin\n4. Sends rejection notification to requester\n\n**Request Body**:\n```json\n{\n    \"approved_rejected_reason\": \"Organization is at capacity\"\n}\n```\n\n**Effect**: Request is marked as rejected and removed from pending lists.\nUser will be notified of the rejection with the provided reason.\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/InvitationRequestAction"}}], "responses": {"200": {"description": "{\"status\": \"invitation_rejected\"}"}, "403": {"description": "Permission denied"}, "404": {"description": "Invitation request not found"}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/invitations": {"get": {"operationId": "invitations_list", "summary": "List sent organization invitations", "description": "Retrieve list of invitations sent by the organization", "parameters": [{"name": "invitee_email", "in": "query", "description": "invitee_email", "required": false, "type": "string"}, {"name": "invitee_email__in", "in": "query", "description": "invitee_email__in", "required": false, "type": "string"}, {"name": "organization", "in": "query", "description": "organization", "required": false, "type": "string"}, {"name": "organization__in", "in": "query", "description": "organization__in", "required": false, "type": "string"}, {"name": "activated", "in": "query", "description": "activated", "required": false, "type": "string"}, {"name": "activated__in", "in": "query", "description": "activated__in", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["created_at", "-created_at", "expires_at", "-expires_at"]}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/user_invitations_serializer"}}}}}}, "tags": ["Users"]}, "post": {"operationId": "invitations_create", "summary": "Send invitation to new user", "description": "Create and send an invitation for a new user to join your organization.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/user_invitations_serializer"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/user_invitations_serializer"}}}, "tags": ["Users"]}, "parameters": []}, "/invitations/accept": {"post": {"operationId": "invitations_accept", "summary": "Accept organization invitation", "description": "Accept an invitation to join an organization.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/InvitationAccept"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/InvitationAccept"}}}, "tags": ["Users"]}, "parameters": []}, "/invitations/reject": {"post": {"operationId": "invitations_reject", "summary": "Reject organization invitation", "description": "Reject an invitation to join an organization.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/InvitationReject"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/InvitationReject"}}}, "tags": ["Users"]}, "parameters": []}, "/invitations/send_invitation_report": {"post": {"operationId": "invitations_send_invitation_report", "summary": "Send invitation error report", "description": "Send a report about invitation-related errors to the admin team.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"type": "object", "properties": {}}}], "responses": {"201": {"description": "", "schema": {"type": "object", "properties": {}}}}, "tags": ["Users"]}, "parameters": []}, "/invitations/{id}": {"get": {"operationId": "invitations_read", "summary": "Retrieve invitation by ID or token", "description": "\nRetrieve invitation details using either numeric ID or secure token.\n\n**ID Lookup**: Standard numeric ID for internal references\n**Token Lookup**: Secure token for public invitation links\n\n**Token Format**: UUID-based secure token from invitation email links\n**Security**: Only active, non-expired invitations are returned\n\n**Use Cases**:\n- Displaying invitation details on acceptance page\n- Verifying invitation validity\n- Pre-filling user registration forms\n", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/user_invitations_serializer"}}, "404": {"description": "Invitation not found or expired"}}, "tags": ["Users"]}, "put": {"operationId": "invitations_update", "summary": "Update invitation", "description": "Update an existing invitation (admin only).", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/user_invitations_serializer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/user_invitations_serializer"}}}, "tags": ["Users"]}, "patch": {"operationId": "invitations_partial_update", "summary": "Partially update invitation", "description": "Partially update an existing invitation (admin only).", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/user_invitations_serializer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/user_invitations_serializer"}}}, "tags": ["Users"]}, "delete": {"operationId": "invitations_delete", "summary": "Cancel invitation", "description": "Cancel an existing invitation, preventing it from being accepted.", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/invitations/{id}/resend": {"post": {"operationId": "invitations_resend", "summary": "Resend invitation email", "description": "Resend the invitation email to the invitee.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"type": "object", "properties": {}}}], "responses": {"201": {"description": "", "schema": {"type": "object", "properties": {}}}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/layers": {"get": {"operationId": "layers_list", "summary": "List geographic layers", "description": "Retrieve a list of geographic layers available to the authenticated user. Layers are collections of related locations organized for mapping, analysis, or administrative purposes. \n\n**Access Control:** \n- Public layers: Available to all authenticated users \n- Shared layers: Available to specified organizations \n- Organization layers: Available to creator and affiliates \n\n**Use Cases:** \n- Emergency response zone organization \n- Service delivery territory management \n- Custom geographic collections for incidents \n- Administrative boundary groupings", "parameters": [{"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/Layer"}}}, "401": {"description": "Authentication required"}}, "tags": ["Locations"]}, "post": {"operationId": "layers_create", "summary": "Create a new geographic layer", "description": "Create a new layer containing a collection of related locations. Layers are useful for organizing locations into logical groups for mapping, analysis, or administrative purposes. \n\n**Layer Configuration:** \n- **locations:** Array of location IDs to include \n- **type:** Optional location type for categorization \n- **shared:** Access level (public, shared, private) \n- **available_to:** Specific organizations with access \n\n**Access Control:** \n- Creator organization has full management access \n- Sharing settings control broader access \n- Available_to field enables granular permissions", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Layer"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Layer"}}, "400": {"description": "Validation error - check required fields and location IDs"}, "401": {"description": "Authentication required"}, "403": {"description": "Permission denied - insufficient organization permissions"}}, "tags": ["Locations"]}, "parameters": []}, "/layers/{id}": {"get": {"operationId": "layers_read", "summary": "Retrieve a specific layer", "description": "Get detailed information about a specific geographic layer including metadata, location collection, and access permissions. \n\n**Included Data:** \n- Layer title and description \n- Array of location IDs in the collection \n- Sharing and access control settings \n- Layer type and categorization \n- Creation and modification metadata", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Layer"}}, "404": {"description": "Layer not found"}, "403": {"description": "Permission denied - no access to this layer"}}, "tags": ["Locations"]}, "put": {"operationId": "layers_update", "summary": "Update a layer", "description": "Update all fields of an existing geographic layer. Useful for reorganizing location collections, updating descriptions, or modifying access permissions. \n\n**Updatable Fields:** \n- Title and description \n- Location array (add/remove locations) \n- Sharing level and access permissions \n- Layer type classification \n\n**Permission Requirements:** \n- Layer created by user's organization or affiliates \n- OR user has explicit access via available_to settings", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Layer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Layer"}}, "400": {"description": "Validation error - check location IDs and permissions"}, "403": {"description": "Permission denied - cannot modify this layer"}, "404": {"description": "Layer not found"}}, "tags": ["Locations"]}, "patch": {"operationId": "layers_partial_update", "summary": "Partially update a layer", "description": "Update specific fields of a geographic layer without affecting other configuration. Commonly used for updating metadata or modifying the location collection. \n\n**Common Use Cases:** \n- Add or remove locations from collection \n- Update layer title or description \n- Modify sharing permissions \n- Change layer type classification", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Layer"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Layer"}}, "400": {"description": "Validation error - check provided fields"}, "403": {"description": "Permission denied - cannot modify this layer"}, "404": {"description": "Layer not found"}}, "tags": ["Locations"]}, "delete": {"operationId": "layers_delete", "summary": "Delete a layer", "description": "Soft delete a geographic layer by setting invalidated_at timestamp. This removes the layer from active use while preserving the record for audit purposes. The individual locations in the layer are not affected - only the layer grouping is removed. \n\n**Note:** This is a soft delete - layer data remains in database for historical tracking and audit purposes.", "parameters": [], "responses": {"204": {"description": "Layer successfully deleted"}, "403": {"description": "Permission denied - not authorized to delete this layer"}, "404": {"description": "Layer not found"}}, "tags": ["Locations"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/lists": {"get": {"operationId": "lists_list", "summary": "List shared lists", "description": "List shared lists based on user permissions and sharing levels", "parameters": [{"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "incident", "in": "query", "description": "incident", "required": false, "type": "string"}, {"name": "incident__in", "in": "query", "description": "incident__in", "required": false, "type": "string"}, {"name": "model", "in": "query", "description": "model", "required": false, "type": "string"}, {"name": "model__in", "in": "query", "description": "model__in", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "name", "required": false, "type": "string"}, {"name": "name__icontains", "in": "query", "description": "name__icontains", "required": false, "type": "string"}, {"name": "created_by", "in": "query", "description": "Filter by creator user ID", "type": "integer"}, {"name": "created_by__in", "in": "query", "description": "created_by__in", "required": false, "type": "string"}, {"name": "object_ids__contains", "in": "query", "description": "object_ids__contains", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "shared", "in": "query", "description": "Filter by sharing level (personal, team, organization, groups_affiliates, all, public)", "type": "string"}], "responses": {"200": {"description": "List of accessible lists", "schema": {"type": "array", "items": {"$ref": "#/definitions/List"}}}}, "tags": ["Lists"]}, "post": {"operationId": "lists_create", "summary": "Create list", "description": "Create a new shared list", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/List"}}], "responses": {"201": {"description": "List created", "schema": {"$ref": "#/definitions/List"}}, "400": {"description": "Invalid list data"}}, "tags": ["Lists"]}, "parameters": []}, "/lists/{id}": {"get": {"operationId": "lists_read", "summary": "Retrieve list", "description": "Get detailed information about a shared list", "parameters": [], "responses": {"200": {"description": "List details", "schema": {"$ref": "#/definitions/List"}}, "404": {"description": "List not found or access denied"}}, "tags": ["Lists"]}, "put": {"operationId": "lists_update", "summary": "Update list", "description": "Update a shared list you have access to", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/List"}}], "responses": {"200": {"description": "List updated", "schema": {"$ref": "#/definitions/List"}}, "403": {"description": "Cannot update lists you don't own"}, "404": {"description": "List not found"}}, "tags": ["Lists"]}, "patch": {"operationId": "lists_partial_update", "summary": "ViewSet for managing shared lists and collections.", "description": "Provides CRUD operations for lists that can be shared at different\nlevels (personal, team, organization, public). Lists can contain\nvarious types of entities and support different sharing permissions.\n\nSharing levels:\n- personal: Only visible to creator\n- team: Visible to team members\n- organization: Visible to organization members\n- groups_affiliates: Visible to affiliated organizations\n- all: Visible to all authenticated users\n- public: Visible to everyone including unauthenticated users", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/List"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/List"}}}, "tags": ["Lists"]}, "delete": {"operationId": "lists_delete", "summary": "Delete list", "description": "Delete a shared list you own", "parameters": [], "responses": {"204": {"description": "List deleted"}, "403": {"description": "Cannot delete lists you don't own"}, "404": {"description": "List not found"}}, "tags": ["Lists"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this list.", "required": true, "type": "integer"}]}, "/locations": {"get": {"operationId": "locations_list", "summary": "List locations with geographic filtering", "description": "Retrieve a paginated list of geographic locations with advanced filtering capabilities. Locations include administrative boundaries, service areas, and custom geographic regions used throughout the Crisis Cleanup platform. \n\n**Access Control:** \n- Unauthenticated: Only public locations \n- Authenticated: Organization locations + public/shared locations \n\n**Geographic Filtering:** \n- Type-based filtering (city, county, state boundaries) \n- Geographic intersection queries \n- Incident area containment \n- Full-text name search \n\n**Coordinate Systems:** All geometries returned in WGS84 (EPSG:4326) \n\n**Performance:** Optimized with spatial indexes and select_related queries", "parameters": [{"name": "type__key", "in": "query", "description": "Filter by location type key (e.g. boundary_political_home_city)", "type": "string"}, {"name": "type__key__in", "in": "query", "description": "Filter by multiple location type keys (comma-separated)", "type": "string"}, {"name": "type", "in": "query", "description": "Filter by location type ID", "type": "integer"}, {"name": "type__isnull", "in": "query", "description": "type__isnull", "required": false, "type": "string"}, {"name": "type__in", "in": "query", "description": "type__in", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "Exact name match", "type": "string"}, {"name": "name__in", "in": "query", "description": "name__in", "required": false, "type": "string"}, {"name": "name__contains", "in": "query", "description": "Name contains substring (case-sensitive)", "type": "string"}, {"name": "name__istartswith", "in": "query", "description": "Name starts with (case-insensitive)", "type": "string"}, {"name": "id__in", "in": "query", "description": "Filter by multiple location IDs (comma-separated)", "type": "string"}, {"name": "created_by__organization", "in": "query", "description": "Filter by creating organization ID", "type": "integer"}, {"name": "created_by__organization__in", "in": "query", "description": "Filter by multiple organization IDs (comma-separated)", "type": "string"}, {"name": "search", "in": "query", "description": "Full-text search of location names", "type": "string"}, {"name": "incident_area", "in": "query", "description": "Filter to locations within specified incident area (incident ID)", "type": "integer"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["name", "-name"]}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/Location"}}}, "400": {"description": "Invalid filter parameters"}}, "tags": ["Locations"]}, "post": {"operationId": "locations_create", "summary": "Create a new geographic location", "description": "Create a new geographic location with point, polygon, or multipolygon geometry. Only one geometry type is allowed per location. \n\n**Geometry Types:** \n- **point:** Exact coordinates for facilities, landmarks \n- **poly:** Single polygon boundaries (cities, counties) \n- **geom:** Multiple polygon regions (complex boundaries) \n\n**Location Types:** Must reference valid location type from /location_types/ \n\n**Sharing Levels:** \n- **public:** Available to all users and public APIs \n- **shared:** Available to organization and affiliates \n- **private:** Only creating organization can access \n\n**Coordinate System:** All geometries must use WGS84 (EPSG:4326) \n\n**Additional Features:** \n- What3Words and Plus Code integration \n- Custom attributes in JSON format \n- Accuracy metadata for quality assessment", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Location"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/Location"}}, "400": {"description": "Validation error - check geometry and required fields"}, "403": {"description": "Permission denied - insufficient organization permissions"}}, "tags": ["Locations"]}, "parameters": []}, "/locations/{id}": {"get": {"operationId": "locations_read", "summary": "Retrieve a specific location", "description": "Get detailed information about a specific geographic location including geometry data, attributes, and related object associations. \n\n**Access Control:** \n- Public and shared locations: Available to all authenticated users \n- Private locations: Only available to creating organization and affiliates \n\n**Included Data:** \n- Complete geometry information (point/polygon/multipolygon) \n- Location type and metadata \n- Custom attributes and notes \n- What3Words and Plus Code if available \n- Related object joins (worksites, organizations, etc.) \n\n**Coordinate System:** All geometries in WGS84 (EPSG:4326)", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}, "404": {"description": "Location not found"}, "403": {"description": "Permission denied - no access to this location"}}, "tags": ["Locations"]}, "put": {"operationId": "locations_update", "summary": "Update a location", "description": "Update all fields of an existing location. Requires organization ownership or appropriate permissions. \n\n**Validation Rules:** \n- Only one geometry type allowed (point, poly, or geom) \n- Location type must be valid \n- Coordinate system must be WGS84 \n\n**Permission Requirements:** \n- Location created by user's organization or affiliates \n- OR location is shared and user has edit permissions \n\n**Impact:** Updating shared locations affects all organizations using them", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Location"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}, "400": {"description": "Validation error - check geometry and fields"}, "403": {"description": "Permission denied - cannot modify this location"}, "404": {"description": "Location not found"}}, "tags": ["Locations"]}, "patch": {"operationId": "locations_partial_update", "summary": "Partially update a location", "description": "Update specific fields of an existing location without affecting other data. Useful for updating location metadata, sharing settings, or attributes without modifying geometry. \n\n**Common Use Cases:** \n- Update location name or notes \n- Change sharing level (private/shared/public) \n- Modify custom attributes \n- Update What3Words or Plus Code data \n\n**Validation:** Same geometry and type rules apply as full update", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Location"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}, "400": {"description": "Validation error - check provided fields"}, "403": {"description": "Permission denied - cannot modify this location"}, "404": {"description": "Location not found"}}, "tags": ["Locations"]}, "delete": {"operationId": "locations_delete", "summary": "Delete a location", "description": "Soft deletes a location by setting invalidated_at timestamp. Also removes references from LocationsJoin table and organizations using this location as primary or secondary location. \n\n**Note:** This is a soft delete - the location data remains in the database for audit purposes.", "parameters": [], "responses": {"204": {"description": "Location successfully deleted"}, "403": {"description": "Permission denied - not authorized to delete this location"}, "404": {"description": "Location not found"}}, "tags": ["Locations"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/locations/{id}/download": {"get": {"operationId": "locations_download", "summary": "Download location as shapefile", "description": "Downloads a single location as an ESRI Shapefile in ZIP format. The shapefile contains the location's geometry (Point, Polygon, or MultiPolygon) along with basic properties including name, notes, and location type. \n\n**Coordinate System:** WGS84 (EPSG:4326) \n**Format:** ZIP archive containing .shp, .shx, .dbf, .prj files \n\n**Use Cases:** \n- GIS software import (ArcGIS, QGIS) \n- Mapping applications and analysis \n- Geographic data exchange \n- Emergency management system integration", "parameters": [], "responses": {"200": {"description": "Shapefile ZIP download", "schema": {"type": "file"}, "examples": {"application/x-zip-compressed": {"description": "ZIP file containing ESRI Shapefile components"}}}, "404": {"description": "Location not found"}, "403": {"description": "Permission denied - no access to this location"}}, "tags": ["Locations"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/tools/volunteer-photos/api/download/": {"post": {"operationId": "tools_volunteer-photos_api_download_create", "summary": "Download volunteer photos as a ZIP file.", "description": "POST body should contain:\n{\n    \"photo_ids\": [1, 2, 3],\n    \"incident_id\": 123 (optional)\n}", "parameters": [], "responses": {"201": {"description": ""}}, "tags": ["tools"]}, "parameters": []}, "/tools/volunteer-photos/api/list/": {"get": {"operationId": "tools_volunteer-photos_api_list_list", "summary": "List volunteer photos with optional incident filtering.", "description": "Query parameters:\n- incident_id: Filter by specific incident (optional)", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["tools"]}, "parameters": []}, "/users": {"get": {"operationId": "users_list", "summary": "List users", "description": "\nRetrieve a paginated list of users with optional filtering.\n\n**Filtering Options**:\n- Organization membership\n- User roles and permissions\n- Geographic location/states\n- Activity status\n- Search by name or email\n\n**Access Control**:\n- Public: Basic user information only\n- Authenticated: Organization members visible with more detail\n- Admin: All users with full details\n\n**Query Parameters**:\n- `organization`: Filter by organization ID\n- `roles`: Filter by user roles\n- `search`: Search by name or email\n- `states`: Filter by enabled states\n- `is_active`: Filter by active status\n", "parameters": [{"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "organization", "in": "query", "description": "organization", "required": false, "type": "string"}, {"name": "organization__in", "in": "query", "description": "organization__in", "required": false, "type": "string"}, {"name": "referring_user", "in": "query", "description": "referring_user", "required": false, "type": "string"}, {"name": "referring_user__in", "in": "query", "description": "referring_user__in", "required": false, "type": "string"}, {"name": "current_sign_in_at__gt", "in": "query", "description": "current_sign_in_at__gt", "required": false, "type": "string"}, {"name": "current_sign_in_at__lt", "in": "query", "description": "current_sign_in_at__lt", "required": false, "type": "string"}, {"name": "current_sign_in_at__lte", "in": "query", "description": "current_sign_in_at__lte", "required": false, "type": "string"}, {"name": "current_sign_in_at__gte", "in": "query", "description": "current_sign_in_at__gte", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "lineage", "in": "query", "description": "lineage", "required": false, "type": "string"}, {"name": "roles", "in": "query", "description": "roles", "required": false, "type": "string"}, {"name": "role", "in": "query", "description": "role", "required": false, "type": "string"}, {"name": "has_team", "in": "query", "description": "has_team", "required": false, "type": "string"}, {"name": "no_team_incident", "in": "query", "description": "no_team_incident", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["created_at", "-created_at", "updated_at", "-updated_at"]}, {"name": "recent_phone_users", "in": "query", "description": "recent_phone_users", "required": false, "type": "string"}, {"name": "team_ids", "in": "query", "description": "team_ids", "required": false, "type": "string"}, {"name": "equipment", "in": "query", "description": "equipment", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/UserBasic"}}}}}}, "tags": ["Users"]}, "parameters": []}, "/users/beta_features": {"get": {"operationId": "users_beta_features", "summary": "Get user's enabled beta features", "description": "\nRetrieve all beta features that the current user has access to.\n\nBeta features are experimental functionality that users can opt into.\nOnly features where the user has been granted access or has opted in\nare returned.\n\n**Authentication Required**: Yes\n\n**Returns**: List of beta features available to the user\n", "parameters": [{"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "organization", "in": "query", "description": "organization", "required": false, "type": "string"}, {"name": "organization__in", "in": "query", "description": "organization__in", "required": false, "type": "string"}, {"name": "referring_user", "in": "query", "description": "referring_user", "required": false, "type": "string"}, {"name": "referring_user__in", "in": "query", "description": "referring_user__in", "required": false, "type": "string"}, {"name": "current_sign_in_at__gt", "in": "query", "description": "current_sign_in_at__gt", "required": false, "type": "string"}, {"name": "current_sign_in_at__lt", "in": "query", "description": "current_sign_in_at__lt", "required": false, "type": "string"}, {"name": "current_sign_in_at__lte", "in": "query", "description": "current_sign_in_at__lte", "required": false, "type": "string"}, {"name": "current_sign_in_at__gte", "in": "query", "description": "current_sign_in_at__gte", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "lineage", "in": "query", "description": "lineage", "required": false, "type": "string"}, {"name": "roles", "in": "query", "description": "roles", "required": false, "type": "string"}, {"name": "role", "in": "query", "description": "role", "required": false, "type": "string"}, {"name": "has_team", "in": "query", "description": "has_team", "required": false, "type": "string"}, {"name": "no_team_incident", "in": "query", "description": "no_team_incident", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["created_at", "-created_at", "updated_at", "-updated_at"]}, {"name": "recent_phone_users", "in": "query", "description": "recent_phone_users", "required": false, "type": "string"}, {"name": "team_ids", "in": "query", "description": "team_ids", "required": false, "type": "string"}, {"name": "equipment", "in": "query", "description": "equipment", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"type": "array", "items": {"$ref": "#/definitions/BetaFeature"}}}, "401": {"description": "Authentication required"}}, "tags": ["Users"]}, "parameters": []}, "/users/me": {"get": {"operationId": "users_me", "summary": "Get current authenticated user", "description": "\nRetrieve the current authenticated user's profile information.\n\nThis endpoint returns comprehensive user information including:\n- Basic profile data (name, email, phone)\n- Organization details and affiliates\n- User roles and permissions\n- Profile settings and preferences\n- Associated files and documents\n\n**Authentication Required**: Yes\n\n**Returns**: Detailed user profile with organization relationships\n", "parameters": [{"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "organization", "in": "query", "description": "organization", "required": false, "type": "string"}, {"name": "organization__in", "in": "query", "description": "organization__in", "required": false, "type": "string"}, {"name": "referring_user", "in": "query", "description": "referring_user", "required": false, "type": "string"}, {"name": "referring_user__in", "in": "query", "description": "referring_user__in", "required": false, "type": "string"}, {"name": "current_sign_in_at__gt", "in": "query", "description": "current_sign_in_at__gt", "required": false, "type": "string"}, {"name": "current_sign_in_at__lt", "in": "query", "description": "current_sign_in_at__lt", "required": false, "type": "string"}, {"name": "current_sign_in_at__lte", "in": "query", "description": "current_sign_in_at__lte", "required": false, "type": "string"}, {"name": "current_sign_in_at__gte", "in": "query", "description": "current_sign_in_at__gte", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "lineage", "in": "query", "description": "lineage", "required": false, "type": "string"}, {"name": "roles", "in": "query", "description": "roles", "required": false, "type": "string"}, {"name": "role", "in": "query", "description": "role", "required": false, "type": "string"}, {"name": "has_team", "in": "query", "description": "has_team", "required": false, "type": "string"}, {"name": "no_team_incident", "in": "query", "description": "no_team_incident", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["created_at", "-created_at", "updated_at", "-updated_at"]}, {"name": "recent_phone_users", "in": "query", "description": "recent_phone_users", "required": false, "type": "string"}, {"name": "team_ids", "in": "query", "description": "team_ids", "required": false, "type": "string"}, {"name": "equipment", "in": "query", "description": "equipment", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/CurrentUser"}}, "401": {"description": "Authentication credentials not provided"}}, "tags": ["Users"]}, "parameters": []}, "/users/{id}": {"get": {"operationId": "users_read", "summary": "Retrieve user by ID", "description": "\nGet detailed information about a specific user.\n\n**Data Returned**: The amount of information returned depends on:\n- Whether the request is authenticated\n- The requesting user's permissions\n- Whether the user is viewing their own profile\n\n**Serializers Used**:\n- `CurrentUserSerializer`: For user's own profile (most detailed)\n- `UserSerializer`: For users with contact viewing permissions\n- `UserBasicSerializer`: For public/limited access\n", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/UserBasic"}}}, "tags": ["Users"]}, "put": {"operationId": "users_update", "summary": "User management endpoints for Crisis Cleanup.", "description": "This ViewSet provides comprehensive user management functionality including:\n- User profile retrieval and updates\n- Current user information access\n- Beta feature management\n- User state management\n- User orphaning operations\n\n**Authentication**: Most operations require authentication. List and retrieve\noperations are publicly accessible with limited data.\n\n**Permissions**: Users can typically only update their own profiles unless\nthey have administrative permissions.\n\n**Filtering**: Users can be filtered by various fields including organization,\nroles, and other attributes using query parameters.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/UserBasic"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/UserBasic"}}}, "tags": ["Users"]}, "patch": {"operationId": "users_partial_update", "summary": "Partially update user profile", "description": "\nUpdate specific fields of a user's profile.\n\n**Special Handling**: If only 'states' is provided in the request,\nthis will redirect to the states update endpoint for proper processing.\n\n**Authentication Required**: Yes\n**Permissions**: Users can update their own profile, admins can update any user\n\n**Updatable Fields**:\n- Personal information (name, email, phone)\n- Profile settings and preferences\n- Organization affiliation (admin only)\n- User roles (with proper permissions)\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/UserBasic"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/UserBasic"}}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this user.", "required": true, "type": "integer"}]}, "/users/{id}/files": {"post": {"operationId": "users_files_create", "summary": "Attach files", "description": "Attach files to entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/FileJoin"}}], "responses": {"201": {"description": "File attached successfully"}, "400": {"description": "Invalid file data"}, "404": {"description": "Entity not found"}}, "tags": ["Users"]}, "delete": {"operationId": "users_files_delete", "summary": "Detach files", "description": "Detach files from entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/FileJoin"}}], "responses": {"204": {"description": "File detached successfully"}, "400": {"description": "Invalid file data"}, "404": {"description": "Entity or file not found"}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this user.", "required": true, "type": "integer"}]}, "/users/{id}/orphan": {"patch": {"operationId": "users_orphan", "summary": "Orphan a user from their organization", "description": "\nRemove a user from their current organization and assign them orphan status.\n\nThis operation:\n- Removes the user from their current organization\n- Invalidates all current user roles\n- Assigns the 'orphaned_user' role\n- Preserves user account for potential future organization assignment\n\n**Authentication Required**: Yes\n**Permissions**: Administrative permissions required\n\n**Use Cases**:\n- User leaving an organization\n- Administrative account cleanup\n- Preparing user for organization transfer\n\n**Warning**: This is a destructive operation that affects user access.\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/UserBasic"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/User"}}, "403": {"description": "Permission denied"}, "404": {"description": "User not found"}}, "tags": ["Administration - Users"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this user.", "required": true, "type": "integer"}]}, "/users/{id}/states": {"get": {"operationId": "users_states_read", "summary": "Get user's enabled states", "description": "\nRetrieve the list of states (geographic regions) that a user is enabled to work in.\n\n**Authentication Required**: Yes\n**Permissions**: User can read their own states or have admin permissions\n", "parameters": [], "responses": {"200": {"description": "States retrieved successfully"}, "403": {"description": "Permission denied"}, "404": {"description": "User not found"}}, "tags": ["Users"]}, "post": {"operationId": "users_states_create", "summary": "Update user's enabled states", "description": "\nUpdate the list of states (geographic regions) that a user is enabled to work in.\n\n**Authentication Required**: Yes\n**Permissions**: User must be updating their own states or have admin permissions\n\n**Request Body**:\n```json\n{\n    \"states\": [\"state1\", \"state2\", \"state3\"]\n}\n```\n\n**Process**:\n1. Validates the states data\n2. Immediately updates cache\n3. Writes to database immediately if worksite filters changed,\n   otherwise schedules a flush task (USER_STATES_FLUSH_DELAY)\n4. Returns immediate confirmation\n\n**Note**: Updates are cached immediately. Filter changes are\npersisted to the database immediately; other changes are persisted\nby a delayed flush task.\n", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/UpdateUserStates"}}], "responses": {"200": {"description": "States updated successfully"}, "400": {"description": "Invalid states data"}, "403": {"description": "Permission denied"}, "404": {"description": "User not found"}}, "tags": ["Users"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this user.", "required": true, "type": "integer"}]}, "/worksites": {"get": {"operationId": "worksites_list", "summary": "List worksites", "description": "List worksites with advanced filtering and export capabilities", "parameters": [{"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "reported_by", "in": "query", "description": "reported_by", "required": false, "type": "string"}, {"name": "case_number", "in": "query", "description": "case_number", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "name", "required": false, "type": "string"}, {"name": "name__startswith", "in": "query", "description": "name__startswith", "required": false, "type": "string"}, {"name": "address", "in": "query", "description": "address", "required": false, "type": "string"}, {"name": "address__startswith", "in": "query", "description": "address__startswith", "required": false, "type": "string"}, {"name": "city", "in": "query", "description": "city", "required": false, "type": "string"}, {"name": "city__startswith", "in": "query", "description": "city__startswith", "required": false, "type": "string"}, {"name": "county", "in": "query", "description": "county", "required": false, "type": "string"}, {"name": "county__startswith", "in": "query", "description": "county__startswith", "required": false, "type": "string"}, {"name": "state", "in": "query", "description": "state", "required": false, "type": "string"}, {"name": "state__startswith", "in": "query", "description": "state__startswith", "required": false, "type": "string"}, {"name": "postal_code", "in": "query", "description": "postal_code", "required": false, "type": "string"}, {"name": "postal_code__startswith", "in": "query", "description": "postal_code__startswith", "required": false, "type": "string"}, {"name": "created_at__gt", "in": "query", "description": "created_at__gt", "required": false, "type": "string"}, {"name": "created_at__lt", "in": "query", "description": "created_at__lt", "required": false, "type": "string"}, {"name": "updated_at__gt", "in": "query", "description": "Filter to worksites updated after this timestamp", "type": "string", "format": "date-time"}, {"name": "updated_at__lt", "in": "query", "description": "Filter to worksites updated before this timestamp", "type": "string", "format": "date-time"}, {"name": "phone1_dnis", "in": "query", "description": "phone1_dnis", "required": false, "type": "string"}, {"name": "phone1_dnis__in", "in": "query", "description": "phone1_dnis__in", "required": false, "type": "string"}, {"name": "phone2_dnis", "in": "query", "description": "phone2_dnis", "required": false, "type": "string"}, {"name": "phone2_dnis__in", "in": "query", "description": "phone2_dnis__in", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "Full-text search across name, address, case number, and other text fields", "type": "string"}, {"name": "incident", "in": "query", "description": "Filter by incident ID", "type": "integer"}, {"name": "organization_bounds", "in": "query", "description": "organization_bounds", "required": false, "type": "string"}, {"name": "organization_primary_location", "in": "query", "description": "organization_primary_location", "required": false, "type": "string"}, {"name": "organization_secondary_location", "in": "query", "description": "organization_secondary_location", "required": false, "type": "string"}, {"name": "work_type", "in": "query", "description": "Filter by work type key (e.g. 'debris', 'ash')", "type": "string"}, {"name": "missing_work_type", "in": "query", "description": "Filter to worksites missing specific work types", "type": "boolean"}, {"name": "my_team", "in": "query", "description": "Filter to worksites assigned to user's teams", "type": "boolean"}, {"name": "member_of_my_organization", "in": "query", "description": "Filter to worksites where user's organization has work types", "type": "boolean"}, {"name": "form_data", "in": "query", "description": "Filter by form field values. Format: 'field_name:value' or JSON object", "type": "string"}, {"name": "flags", "in": "query", "description": "Filter by flag reason (comma-separated for multiple flags)", "type": "string"}, {"name": "locations", "in": "query", "description": "locations", "required": false, "type": "string"}, {"name": "teams", "in": "query", "description": "Filter by team IDs (comma-separated)", "type": "string"}, {"name": "phone_number", "in": "query", "description": "Search by phone number (exact or partial match)", "type": "string"}, {"name": "sort", "in": "query", "description": "Sort field. Prefix with '-' for descending. Options: id, case_number, address, name, city, county, state, postal_code, created_at, updated_at", "type": "string"}, {"name": "center_coordinates", "in": "query", "description": "Filter by distance from point. Format: 'lng,lat' or 'lng,lat,radius_meters'", "type": "string"}, {"name": "has_files", "in": "query", "description": "Filter by presence of file attachments", "type": "boolean"}, {"name": "feed", "in": "query", "description": "Special feed filter. Format: 'lng,lat,incident_id'", "type": "string"}, {"name": "include_lists", "in": "query", "description": "Include only worksites from specified list IDs (comma-separated)", "type": "string"}, {"name": "exclude_lists", "in": "query", "description": "Exclude worksites from specified list IDs (comma-separated)", "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "fields", "in": "query", "description": "Fields to include in response (comma-separated). Improves performance by reducing payload size.", "type": "string"}, {"name": "status", "in": "query", "description": "Filter by work status (e.g. 'open_unassigned', 'in_progress', 'completed')", "type": "string"}, {"name": "claimed_by", "in": "query", "description": "Filter by organization ID that claimed the work", "type": "integer"}, {"name": "geofence", "in": "query", "description": "Filter by polygon coordinates. Format: [[lat,lng],[lat,lng],...]", "type": "string"}], "responses": {"200": {"description": "List of worksites", "schema": {"type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri"}, "previous": {"type": "string", "format": "uri"}, "results": {"type": "array", "items": {"type": "object"}}}}}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "post": {"operationId": "worksites_create", "summary": "Create worksite", "description": "Create a new worksite for disaster response work", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["name", "address", "incident", "location"], "type": "object", "properties": {"name": {"description": "Property owner name", "type": "string"}, "address": {"description": "Street address", "type": "string"}, "city": {"description": "City", "type": "string"}, "state": {"description": "State/province", "type": "string"}, "postal_code": {"description": "Postal/ZIP code", "type": "string"}, "phone1": {"description": "Primary phone number", "type": "string"}, "incident": {"description": "Incident ID this worksite belongs to", "type": "integer"}, "location": {"type": "object", "properties": {"type": {"type": "string", "enum": ["Point"]}, "coordinates": {"description": "[longitude, latitude]", "type": "array", "items": {"type": "number"}}}}, "work_types": {"type": "array", "items": {"type": "object", "properties": {"work_type": {"description": "Work type key (e.g., \"debris\", \"ash\")", "type": "string"}, "status": {"description": "Work status", "type": "string"}}}}}}}], "responses": {"201": {"description": "Worksite created successfully"}, "400": {"description": "Invalid input data"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": []}, "/worksites/count": {"get": {"operationId": "worksites_count", "summary": "Count filtered worksites", "description": "Get the total count of worksites matching the current filters", "parameters": [{"name": "id__in", "in": "query", "description": "id__in", "required": false, "type": "string"}, {"name": "id", "in": "query", "description": "id", "required": false, "type": "string"}, {"name": "reported_by", "in": "query", "description": "reported_by", "required": false, "type": "string"}, {"name": "case_number", "in": "query", "description": "case_number", "required": false, "type": "string"}, {"name": "name", "in": "query", "description": "name", "required": false, "type": "string"}, {"name": "name__startswith", "in": "query", "description": "name__startswith", "required": false, "type": "string"}, {"name": "address", "in": "query", "description": "address", "required": false, "type": "string"}, {"name": "address__startswith", "in": "query", "description": "address__startswith", "required": false, "type": "string"}, {"name": "city", "in": "query", "description": "city", "required": false, "type": "string"}, {"name": "city__startswith", "in": "query", "description": "city__startswith", "required": false, "type": "string"}, {"name": "county", "in": "query", "description": "county", "required": false, "type": "string"}, {"name": "county__startswith", "in": "query", "description": "county__startswith", "required": false, "type": "string"}, {"name": "state", "in": "query", "description": "state", "required": false, "type": "string"}, {"name": "state__startswith", "in": "query", "description": "state__startswith", "required": false, "type": "string"}, {"name": "postal_code", "in": "query", "description": "postal_code", "required": false, "type": "string"}, {"name": "postal_code__startswith", "in": "query", "description": "postal_code__startswith", "required": false, "type": "string"}, {"name": "created_at__gt", "in": "query", "description": "created_at__gt", "required": false, "type": "string"}, {"name": "created_at__lt", "in": "query", "description": "created_at__lt", "required": false, "type": "string"}, {"name": "updated_at__gt", "in": "query", "description": "updated_at__gt", "required": false, "type": "string"}, {"name": "updated_at__lt", "in": "query", "description": "updated_at__lt", "required": false, "type": "string"}, {"name": "phone1_dnis", "in": "query", "description": "phone1_dnis", "required": false, "type": "string"}, {"name": "phone1_dnis__in", "in": "query", "description": "phone1_dnis__in", "required": false, "type": "string"}, {"name": "phone2_dnis", "in": "query", "description": "phone2_dnis", "required": false, "type": "string"}, {"name": "phone2_dnis__in", "in": "query", "description": "phone2_dnis__in", "required": false, "type": "string"}, {"name": "search", "in": "query", "description": "search", "required": false, "type": "string"}, {"name": "incident", "in": "query", "description": "incident", "required": false, "type": "string"}, {"name": "organization_bounds", "in": "query", "description": "organization_bounds", "required": false, "type": "string"}, {"name": "organization_primary_location", "in": "query", "description": "organization_primary_location", "required": false, "type": "string"}, {"name": "organization_secondary_location", "in": "query", "description": "organization_secondary_location", "required": false, "type": "string"}, {"name": "work_type", "in": "query", "description": "work_type", "required": false, "type": "string"}, {"name": "missing_work_type", "in": "query", "description": "missing_work_type", "required": false, "type": "string"}, {"name": "my_team", "in": "query", "description": "my_team", "required": false, "type": "string"}, {"name": "member_of_my_organization", "in": "query", "description": "member_of_my_organization", "required": false, "type": "string"}, {"name": "form_data", "in": "query", "description": "form_data", "required": false, "type": "string"}, {"name": "flags", "in": "query", "description": "flags", "required": false, "type": "string"}, {"name": "locations", "in": "query", "description": "locations", "required": false, "type": "string"}, {"name": "teams", "in": "query", "description": "teams", "required": false, "type": "string"}, {"name": "phone_number", "in": "query", "description": "phone_number", "required": false, "type": "string"}, {"name": "sort", "in": "query", "description": "Ordering", "required": false, "type": "string", "enum": ["id", "-id", "case_number", "-case_number", "address", "-address", "name", "-name", "city", "-city", "county", "-county", "state", "-state", "postal_code", "-postal_code", "created_at", "-created_at", "updated_at", "-updated_at"]}, {"name": "center_coordinates", "in": "query", "description": "center_coordinates", "required": false, "type": "string"}, {"name": "has_files", "in": "query", "description": "has_files", "required": false, "type": "string"}, {"name": "feed", "in": "query", "description": "feed", "required": false, "type": "string"}, {"name": "include_lists", "in": "query", "description": "include_lists", "required": false, "type": "string"}, {"name": "exclude_lists", "in": "query", "description": "exclude_lists", "required": false, "type": "string"}, {"name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}], "responses": {"200": {"description": "Count result", "schema": {"type": "object", "properties": {"count": {"type": "integer"}}}}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": []}, "/worksites/{id}": {"get": {"operationId": "worksites_read", "summary": "Get single worksite by id.", "description": "Get single worksite by id.", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Worksite"}}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "put": {"operationId": "worksites_update", "summary": "Update worksite", "description": "Update all fields of a worksite", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Worksite"}}], "responses": {"200": {"description": "Worksite updated successfully"}, "400": {"description": "Invalid input data"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "patch": {"operationId": "worksites_partial_update", "summary": "Partially update worksite", "description": "Partially update specific fields of a worksite", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Worksite"}}], "responses": {"200": {"description": "Worksite updated successfully"}, "400": {"description": "Invalid input data"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "delete": {"operationId": "worksites_delete", "summary": "Delete worksite", "description": "Delete a worksite (soft delete - sets invalidated_at timestamp)", "parameters": [], "responses": {"204": {"description": "Worksite deleted successfully"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/claim": {"post": {"operationId": "worksites_claim", "summary": "Claim worksite work types", "description": "Claim work types on a worksite for your organization to perform the work", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"type": "object", "properties": {"work_types": {"description": "Array of work type keys to claim (e.g. [\"debris\", \"ash\"]). If empty, claims all unclaimed work types.", "type": "array", "items": {"type": "string"}}}}}], "responses": {"201": {"description": "Work types claimed successfully"}, "400": {"description": "Invalid input data or claim restrictions violated"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/download": {"post": {"operationId": "worksites_download", "summary": "Download worksite PDF", "description": "Download a worksite as a PDF case form, optionally claiming unclaimed work types", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"type": "object", "properties": {"no_claim_reason_text": {"description": "If provided, will not auto-claim work types and includes this text in the PDF", "type": "string"}}}}], "responses": {"200": {"description": "PDF file", "schema": {"type": "file"}, "headers": {"Content-Disposition": {"description": "attachment; filename=case_number.pdf", "type": "string"}, "Content-Type": {"description": "application/pdf", "type": "string"}}}, "404": {"description": "Worksite not found"}}, "produces": ["application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/favorite": {"post": {"operationId": "worksites_favorite_create", "summary": "Manage favorites", "description": "Favorite or unfavorite a particular entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Favorite"}}], "responses": {"201": {"description": "Entity favorited (POST)"}, "204": {"description": "Favorite removed (DELETE)"}, "400": {"description": "Invalid favorite data"}, "404": {"description": "Entity not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["System"]}, "delete": {"operationId": "worksites_favorite_delete", "summary": "Manage favorites", "description": "Favorite or unfavorite a particular entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/Favorite"}}], "responses": {"201": {"description": "Entity favorited (POST)"}, "204": {"description": "Favorite removed (DELETE)"}, "400": {"description": "Invalid favorite data"}, "404": {"description": "Entity not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["System"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/files": {"post": {"operationId": "worksites_files_create", "summary": "Attach files", "description": "Attach files to entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/FileJoin"}}], "responses": {"201": {"description": "File attached successfully"}, "400": {"description": "Invalid file data"}, "404": {"description": "Entity not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "delete": {"operationId": "worksites_files_delete", "summary": "Detach files", "description": "Detach files from entity", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/FileJoin"}}], "responses": {"204": {"description": "File detached successfully"}, "400": {"description": "Invalid file data"}, "404": {"description": "Entity or file not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/history": {"get": {"operationId": "worksites_history", "summary": "Get worksite history", "description": "Get the complete event history for a worksite and its work types", "parameters": [], "responses": {"200": {"description": "Event history retrieved successfully", "schema": {"type": "array", "items": {"$ref": "#/definitions/EventLogs"}}}, "404": {"description": "Worksite not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/notes": {"post": {"operationId": "worksites_notes", "summary": "Add worksite note", "description": "Add a note to a worksite for tracking communication and updates", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["note"], "type": "object", "properties": {"note": {"description": "Note content", "type": "string"}, "note_type": {"description": "Type of note being added", "type": "string", "enum": ["survivor", "volunteer_note"]}}}}], "responses": {"201": {"description": "Note added successfully"}, "400": {"description": "Invalid input data"}, "404": {"description": "Worksite not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/release": {"post": {"operationId": "worksites_release", "summary": "Release worksite work types", "description": "Release work types on a worksite, making them available for other organizations (only for incidents with release enabled)", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["work_types"], "type": "object", "properties": {"work_types": {"description": "Array of work type keys to release", "type": "array", "items": {"type": "string"}}, "status": {"description": "Status to set when releasing work types", "type": "string"}}}}], "responses": {"201": {"description": "Work types released successfully"}, "400": {"description": "Invalid input data or release not allowed for this incident"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/request_take": {"post": {"operationId": "worksites_request_take", "summary": "Request to take work types", "description": "Request to take over work types that are claimed by other organizations", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["requested_reason"], "type": "object", "properties": {"work_types": {"description": "Array of work type IDs to request. If empty, requests all work types claimed by others.", "type": "array", "items": {"type": "integer"}}, "requested_reason": {"description": "Reason for requesting these work types", "type": "string"}}}}], "responses": {"201": {"description": "Request submitted successfully"}, "400": {"description": "Invalid input data"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/send_survivor_email": {"post": {"operationId": "worksites_send_survivor_email", "summary": "Send survivor email", "description": "Send an email to a survivor with a secure link to view/update their worksite information", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["email"], "type": "object", "properties": {"email": {"description": "Email address to send message to", "type": "string", "format": "email"}}}}], "responses": {"204": {"description": "Email sent successfully"}, "400": {"description": "Invalid email address"}, "404": {"description": "Worksite not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/send_survivor_sms": {"post": {"operationId": "worksites_send_survivor_sms", "summary": "Send survivor SMS", "description": "Send an SMS to a survivor with a secure link to view/update their worksite information", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["phone"], "type": "object", "properties": {"phone": {"description": "Phone number to send SMS to", "type": "string"}}}}], "responses": {"204": {"description": "SMS sent successfully"}, "400": {"description": "Invalid phone number"}, "404": {"description": "Worksite not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/share": {"post": {"operationId": "worksites_share", "summary": "Share worksite case", "description": "Share a worksite case by email with PDF attachment", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["emails"], "type": "object", "properties": {"emails": {"description": "Email addresses to share the case with", "type": "array", "items": {"type": "string", "format": "email"}}, "share_message": {"description": "Optional message to include in the email", "type": "string"}}}}], "responses": {"204": {"description": "Case shared successfully"}, "400": {"description": "Invalid input data"}, "404": {"description": "Worksite not found"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/unclaim": {"post": {"operationId": "worksites_unclaim", "summary": "Unclaim worksite work types", "description": "Unclaim work types on a worksite, releasing them for other organizations to claim", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["work_types"], "type": "object", "properties": {"work_types": {"description": "Array of work type keys to unclaim", "type": "array", "items": {"type": "string"}}, "reason": {"description": "Reason for unclaiming the work types", "type": "string"}}}}], "responses": {"200": {"description": "Work types unclaimed successfully"}, "400": {"description": "Invalid input data"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites/{id}/update_status": {"post": {"operationId": "worksites_update_status", "summary": "Update work type status", "description": "Update the status of work types on a worksite (e.g., mark as completed, in progress)", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"required": ["status"], "type": "object", "properties": {"work_types": {"description": "Array of work type keys to update status for. If empty, updates all work types.", "type": "array", "items": {"type": "string"}}, "status": {"description": "New status to set (e.g., \"completed\", \"in_progress\", \"open_unassigned\")", "type": "string"}}}}], "responses": {"201": {"description": "Status updated successfully"}, "400": {"description": "Invalid input data"}, "404": {"description": "Worksite not found"}, "403": {"description": "Permission denied"}}, "produces": ["application/json", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf"], "tags": ["Worksites"]}, "parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}]}, "/worksites_changes": {"get": {"operationId": "worksites_changes_list", "summary": "Get worksites updated or invalidated since a datetime", "description": "Get worksites updated or invalidated since a datetime", "parameters": [{"name": "since", "in": "query", "description": "ISO datetime string (e.g., 2023-12-01T10:00:00Z). Returns worksites updated or invalidated since this datetime.", "required": true, "type": "string", "format": "date-time"}], "responses": {"200": {"description": "Worksites updated or invalidated since a datetime", "schema": {"type": "array", "items": {"$ref": "#/definitions/WorksiteChanges"}}}, "400": {"description": "Invalid datetime format"}}, "tags": ["Worksites"]}, "parameters": []}}, "definitions": {"LocationJoin": {"description": "List of all locations associated with the incident", "required": ["location"], "type": "object", "properties": {"tag": {"title": "Tag", "description": "User-generated tag(s) or description.", "type": "string", "x-nullable": true}, "title": {"title": "Title", "description": "A user-generated title.", "type": "string", "x-nullable": true}, "notes": {"title": "Notes", "description": "User-specific notes, caption, or description for the file.", "type": "string", "x-nullable": true}, "created_at": {"title": "Created at", "description": "Timestamp when the location was attached to the object.", "type": "string", "format": "date-time", "readOnly": true}, "id": {"title": "ID", "type": "integer", "readOnly": true}, "location": {"title": "Location", "description": "The location being attached to the object.", "type": "integer"}, "object_id": {"title": "Object id", "description": "The object ID (such as a library, worksite, organization, user, or incident).", "type": "integer", "readOnly": true, "x-nullable": true}}}, "Incident": {"required": ["name", "start_at", "short_name"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "name": {"title": "Name", "description": "Full name of the incident", "type": "string", "minLength": 1}, "case_label": {"title": "Case label", "description": "Case label for this incident (A-Z)", "type": "string", "minLength": 1}, "start_at": {"title": "Start at", "description": "Datetime of when the incident was started", "type": "string", "format": "date-time"}, "form_fields": {"title": "Form fields", "description": "Form fields available for this incident", "type": "string", "readOnly": true}, "uuid": {"title": "Uuid", "description": "A global (GUID), or universally unique identifier for the incident. This is in anticipation of a future federated incident service.", "type": "string", "format": "uuid", "readOnly": true}, "short_name": {"title": "Short name", "description": "Short name of the incident", "type": "string", "minLength": 1}, "locations": {"description": "List of all locations associated with the incident", "type": "array", "items": {"$ref": "#/definitions/LocationJoin"}, "readOnly": true}, "timezone": {"title": "Timezone", "description": "The timezone of the incident.", "type": "string", "x-nullable": true}, "incident_type": {"title": "Incident type", "description": "A lower-case normalized text description of the type of disaster. E.g. Fire, flood, hurricane, tornado, wind, tropical storm, straight-line winds, Rebuild/LTR, Volcano, Snowstorm, mudslides, Thunderstorm, Thunderstorm with wind and flood and tornado, hail, contaminated water, etc. This field is used to populate the descriptive icon at the top left corner of the screen near the incident name.", "type": "string", "x-nullable": true}, "color": {"title": "Color", "description": "A hexadecimal value defining the color of the incident identifier in the top-left corner of the screen next to the incident name and dropdown.", "type": "string", "readOnly": true, "minLength": 1, "x-nullable": true}, "is_archived": {"title": "Is archived", "description": "Boolean indicating whether the incident has been archived.", "type": "boolean", "x-nullable": true}, "turn_on_release": {"title": "Turn on release", "description": "Boolean indicating whether the incident should be turned on release.", "type": "boolean", "x-nullable": true}, "created_work_types": {"title": "Created work types", "description": "List of work type categories that have been created for worksites in this incident", "type": "string", "readOnly": true}, "auto_contact": {"title": "Auto contact", "description": "Boolean indicating whether auto contact is enabled for the incident.", "type": "boolean"}, "active_phone_number": {"description": "Currently active phone numbers assigned to this incident for survivor contact", "type": "array", "items": {"description": "Currently active phone numbers assigned to this incident for survivor contact", "type": "string"}, "readOnly": true, "default": [], "uniqueItems": true}, "incident_center": {"title": "Incident center", "description": "Calculated center point of incident for map centering and geographic reference", "type": "object", "readOnly": true, "x-nullable": true, "properties": {"type": {"title": "TYPE", "type": "string", "enum": ["MultiPolygon", "Polygon", "Point"]}, "coordinates": {"title": "Coordinates", "type": "array", "items": "number"}}}, "geofence": {"title": "Geofence", "description": "Geographic boundary point for mobile app geofencing and location services", "type": "object", "readOnly": true, "x-nullable": true, "properties": {"type": {"title": "TYPE", "type": "string", "enum": ["MultiPolygon", "Polygon", "Point"]}, "coordinates": {"title": "Coordinates", "type": "array", "items": "number"}}}, "ignore_claiming_thresholds": {"title": "Ignore claiming thresholds", "description": "When True, users can claim work types regardless of their claiming statistics thresholds", "type": "boolean", "readOnly": true, "default": false}}}, "InvitationRequest": {"required": ["email", "first_name", "last_name", "requested_to", "password1", "password2"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "email": {"title": "Email", "description": "Email address of the would-be user.", "type": "string", "maxLength": 254, "minLength": 1}, "mobile": {"title": "Mobile", "description": "Cell phone number of the would-be user.", "type": "string", "x-nullable": true}, "first_name": {"title": "First name", "description": "First name of the would-be user.", "type": "string", "maxLength": 60, "minLength": 1}, "last_name": {"title": "Last name", "description": "Last name of the would-be user.", "type": "string", "maxLength": 30, "minLength": 1}, "requested_to": {"title": "Requested to", "type": "string", "minLength": 1}, "requested_to_organization": {"title": "Requested to organization", "type": "string", "readOnly": true, "minLength": 1}, "password1": {"title": "Password1", "type": "string", "minLength": 1}, "password2": {"title": "Password2", "type": "string", "minLength": 1}, "requested_at": {"title": "Requested at", "description": "Timestamp when the would-be user requested access.", "type": "string", "format": "date-time", "readOnly": true, "x-nullable": true}, "approved_at": {"title": "Approved at", "description": "Timestamp when the would-be user was approved.", "type": "string", "format": "date-time", "readOnly": true, "x-nullable": true}, "rejected_at": {"title": "Rejected at", "description": "Timestamp when the would-be user was rejected.", "type": "string", "format": "date-time", "readOnly": true, "x-nullable": true}}}, "InvitationRequestAction": {"type": "object", "properties": {"approved_rejected_reason": {"title": "Approved rejected reason", "type": "string", "minLength": 1}}}, "UserContact": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "first_name": {"title": "First name", "description": "User first name.", "type": "string", "readOnly": true, "minLength": 1}, "last_name": {"title": "Last name", "description": "User last name.", "type": "string", "readOnly": true, "minLength": 1}, "email": {"title": "Email", "description": "User email address. Unique identifier.", "type": "string", "format": "email", "readOnly": true, "minLength": 1}, "mobile": {"title": "Mobile", "description": "User cell phone number.", "type": "string", "readOnly": true, "minLength": 1, "x-nullable": true}}}, "user_invitations_serializer": {"required": ["invitee_email"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "invitee_email": {"title": "Invitee email", "type": "string", "maxLength": 255}, "invitation_token": {"title": "Invitation token", "type": "string", "readOnly": true}, "expires_at": {"title": "Expires at", "description": "Timestamp when the invitation will expire.", "type": "string", "format": "date-time", "readOnly": true}, "organization": {"title": "Organization", "type": "integer"}, "created_at": {"title": "Created at", "description": "Timestamp when the invitation was created.", "type": "string", "format": "date-time", "readOnly": true}, "invited_by": {"$ref": "#/definitions/UserContact"}, "existing_user": {"title": "Existing user", "type": "string", "readOnly": true}, "organization_does_not_exist": {"title": "Organization does not exist", "type": "boolean", "default": false}, "invitation_unique_key": {"title": "Invitation unique key", "type": "string", "minLength": 1}}}, "InvitationAccept": {"required": ["invitation_token", "first_name", "last_name", "password"], "type": "object", "properties": {"invitation_token": {"title": "Invitation token", "type": "string", "minLength": 1}, "first_name": {"title": "First name", "type": "string", "minLength": 1}, "last_name": {"title": "Last name", "type": "string", "minLength": 1}, "title": {"title": "Title", "type": "string"}, "password": {"title": "Password", "type": "string", "minLength": 1}, "mobile": {"title": "Mobile", "type": "string", "minLength": 1}}}, "InvitationReject": {"required": ["invitation_token"], "type": "object", "properties": {"invitation_token": {"title": "Invitation token", "type": "string", "minLength": 1}}}, "Layer": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "title": {"title": "Title", "description": "Descriptive title for the layer (e.g., 'Emergency Response Zones', 'Service Areas', 'County Boundaries')", "type": "string", "x-nullable": true}, "description": {"title": "Description", "description": "Detailed description of the layer's purpose, contents, and intended use", "type": "string", "x-nullable": true}, "locations": {"title": "Locations", "description": "Array of location IDs included in this layer collection", "type": "object"}, "available_to": {"title": "Available to", "description": "JSON object specifying which organizations or users have access to this layer", "type": "object"}, "type": {"title": "Type", "description": "Optional location type for categorizing this layer (references location type)", "type": "integer", "x-nullable": true}, "shared": {"title": "Shared", "description": "Basic sharing level: 'public' (all users), 'shared' (organization + affiliates), 'private' (organization only)", "type": "string", "enum": ["shared", "public", "private", "hidden"], "x-nullable": true}}}, "List": {"required": ["name", "model", "shared", "permissions"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "created_by": {"title": "Created by", "description": "User ID of the user who created the row.", "type": "integer", "readOnly": true, "default": 10778, "x-nullable": true}, "updated_by": {"title": "Updated by", "description": "User ID of the user who last updated the row.", "type": "integer", "readOnly": true, "default": 10778, "x-nullable": true}, "created_at": {"title": "Created at", "description": "Timestamp when the row was created.", "type": "string", "format": "date-time", "readOnly": true}, "updated_at": {"title": "Updated at", "description": "Timestamp when the row was last updated.", "type": "string", "format": "date-time", "readOnly": true}, "parent": {"title": "Parent", "description": "Used for branching lists. If shared_permission = read_copy and someone branches the list, this is the id of the parent list from which it was branched. This information might be useful for later comparison and syncing.", "type": "integer", "x-nullable": true}, "name": {"title": "Name", "description": "User-generated name of a list, like Old Ladies, My Worksites, Favorite Users, Worksites in Perry FL, etc.", "type": "string", "maxLength": 255, "minLength": 1}, "description": {"title": "Description", "description": "User-generated description of the list.", "type": "string", "x-nullable": true}, "list_order": {"title": "List order", "description": "An optional number indicating the order in which the library should be listed in any dropdown menu or other presentation. If an integer, then it floats to the top, ordered by integer. If null, then alphabetical order will win.", "type": "integer", "maximum": 2147483647, "minimum": -2147483648, "x-nullable": true}, "tags": {"title": "Tags", "description": "jsonb list of user-generated tags to allow for easier sharing and browsing.", "type": "object", "x-nullable": true}, "model": {"title": "Model", "description": "The table containing the object to which object_ids refers. Valid values include worksite_worksites, user_users, organization_organizations, incident_incidents, file_files, list_lists, organization_organizations_incidents_teams, or any other object. Some objects like wwwtsp are not suited for lists, since they are regularly invalidated and replaced. Thus, a list of wwwtsp objects would quickly become out of date.", "type": "string", "maxLength": 255, "minLength": 1}, "object_ids": {"description": "integer array of pseudo foreign key to the id field of the table identified in the model column.", "type": "array", "items": {"title": "Object ids", "type": "integer", "maximum": 2147483647, "minimum": -2147483648}, "x-nullable": true}, "shared": {"title": "Shared", "description": "Degree to which the list is visible to or searchable by others. Valid values include private (only visible to the creating user), team (visible to all members of teams to which the creating user belongs), organization (only visible to the organization to which the creating user belongs), groups_affiliates (visible to all group or affiliated organizations), all (visible to all crisis cleanup users), public (available to the public, if that option is ever appropriate).", "type": "string", "enum": ["private", "team", "organization", "groups_affiliates", "all", "public"]}, "permissions": {"title": "Permissions", "description": "The creating user always has read/write/delete access to their lists. This sets the level of management for others to which the list is shared. For example, if shared = team, and shared_permission = read_write, then all other users within the creating users team has read_write access to the list. Valid values include, read_write_delete_copy, read_write_copy, read_copy (i.e., branch or copy to another users list), and read_only. Note: individual-level permissions are not allowed, e.g., sharing to individual users, organizations, teams, etc., is not permitted. Permissions are specifically designed to be coarse, as creating individual permissions in a environment as temporary as a disaster creates more problems than it solves.", "type": "string", "enum": ["read_write_delete_copy", "read_write_copy", "read_copy", "read_only"]}, "incident": {"title": "Incident", "description": "The incident to which the list refers. If null, then the list is not incident-specific.", "type": "integer", "x-nullable": true}, "invalidate_at": {"title": "Invalidate at", "type": "string", "format": "date-time", "readOnly": true}}}, "Location": {"type": "object", "properties": {"id": {"title": "Id", "type": "integer", "readOnly": true}, "geom": {"title": "Geom", "type": "object", "x-nullable": true, "properties": {"type": {"title": "TYPE", "type": "string", "enum": ["MultiPolygon", "Polygon", "Point"]}, "coordinates": {"title": "Coordinates", "type": "array", "items": "number"}}}, "poly": {"title": "Poly", "type": "object", "x-nullable": true, "properties": {"type": {"title": "TYPE", "type": "string", "enum": ["MultiPolygon", "Polygon", "Point"]}, "coordinates": {"title": "Coordinates", "type": "array", "items": "number"}}}, "point": {"title": "Point", "type": "object", "x-nullable": true, "properties": {"type": {"title": "TYPE", "type": "string", "enum": ["MultiPolygon", "Polygon", "Point"]}, "coordinates": {"title": "Coordinates", "type": "array", "items": "number"}}}, "name": {"title": "Name", "description": "Human-readable name for the location (e.g., 'Jefferson County', 'FEMA Region 7', 'Downtown Service Area')", "type": "string", "x-nullable": true}, "accuracy": {"title": "Accuracy", "description": "Assessment of location data quality (e.g., 'GPS surveyed', 'approximate', 'preliminary', '±400m')", "type": "string", "x-nullable": true}, "notes": {"title": "Notes", "description": "Additional context, description, or metadata about this geographic location", "type": "string", "x-nullable": true}, "what3words": {"title": "What3words", "description": "What3Words address for point locations (e.g., 'index.home.raft') for easy sharing and navigation", "type": "string", "x-nullable": true}, "pluscode": {"title": "Pluscode", "description": "Google Plus Code for point locations (e.g., '9G3JWFXR+XR') for precise location sharing", "type": "string", "x-nullable": true}, "attr": {"title": "Attr", "description": "JSON object containing additional structured data from source systems (census data, import attributes, etc.)", "type": "object", "x-nullable": true}, "type": {"title": "Type", "description": "Location type classification (required) - see /location_types/ for available options", "type": "integer", "x-nullable": true}, "shared": {"title": "Shared", "description": "Access level: 'public' (available to all), 'shared' (organization + affiliates), 'private' (organization only), 'hidden' (not in listings)", "type": "string", "enum": ["shared", "public", "private", "hidden"], "x-nullable": true}, "joins": {"title": "Joins", "description": "List of all locations associated with the incident", "type": "string", "readOnly": true}}}, "FileJoin": {"required": ["file"], "type": "object", "properties": {"tag": {"title": "Tag", "description": "User-generated tag(s) or desription.", "type": "string", "x-nullable": true}, "title": {"title": "Title", "description": "A user-generated title, such as exterior_front, exterior_rear, interior, basement, friends, headquarters, user manual, tornado path, furthest extent, etc. Note: file_files.title and location_locations.name are the default titles. However, this field allows the user to create their own title if it is shared. It may or may not be implemented.", "type": "string", "x-nullable": true}, "notes": {"title": "Notes", "description": "Any user-specific notes, caption, or description for the file. Note: file_files.notes is the default captions. However, this field allows the user to create their own caption if they wish, e.g. if someone else shares it with them. It may or may not be implemented.", "type": "string", "x-nullable": true}, "created_at": {"title": "Created at", "description": "Timestamp when the file was attached to the object.", "type": "string", "format": "date-time", "readOnly": true}, "file_updated_at": {"title": "File updated at", "type": "string", "readOnly": true}, "id": {"title": "ID", "type": "integer", "readOnly": true}, "file": {"title": "File", "description": "The file.id of the file being attached to object_id.", "type": "integer", "x-nullable": true}, "filename": {"title": "Filename", "type": "string", "readOnly": true}, "url": {"title": "Url", "type": "string", "readOnly": true}, "full_url": {"title": "Full url", "type": "string", "readOnly": true}, "general_file_url": {"title": "General file url", "type": "string", "readOnly": true}, "blog_url": {"title": "Blog url", "type": "string", "readOnly": true}, "large_blog_url": {"title": "Large blog url", "type": "string", "readOnly": true}, "large_thumbnail_url": {"title": "Large thumbnail url", "type": "string", "readOnly": true}, "small_thumbnail_url": {"title": "Small thumbnail url", "type": "string", "readOnly": true}, "filename_original": {"title": "Filename original", "type": "string", "readOnly": true}, "file_type_t": {"title": "File type t", "type": "string", "readOnly": true}, "mime_content_type": {"title": "Mime content type", "type": "string", "readOnly": true}, "attr": {"title": "Attr", "type": "string", "readOnly": true}, "image_exif": {"title": "Image exif", "type": "string", "readOnly": true}}}, "UserBasic": {"required": ["first_name", "last_name"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "first_name": {"title": "First name", "description": "User first name.", "type": "string", "maxLength": 60, "minLength": 1}, "last_name": {"title": "Last name", "description": "User last name.", "type": "string", "maxLength": 30, "minLength": 1}, "referring_user": {"title": "Referring user", "description": "User who referred this user.", "type": "integer", "readOnly": true, "x-nullable": true}, "organization": {"title": "Organization", "description": "Organization to which the user belongs.", "type": "integer", "readOnly": true, "x-nullable": true}, "files": {"type": "array", "items": {"$ref": "#/definitions/FileJoin"}, "readOnly": true}}}, "BetaFeature": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "name": {"title": "Name", "description": "Database-friendly name of the feature or module.", "type": "string", "maxLength": 255, "x-nullable": true}, "description": {"title": "Description", "description": "Human-readable description of the feature or module.", "type": "string", "x-nullable": true}, "opt_in": {"title": "Opt in", "description": "Indicates whether users can opt-in to the beta feature.", "type": "boolean", "x-nullable": true}}}, "UserProfileOrganization": {"description": "User's primary organization with complete affiliate information", "required": ["name"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "name": {"title": "Name", "description": "Name of the organization.", "type": "string", "minLength": 1}, "is_active": {"title": "Is active", "description": "Indicates whether the organization is active. If false, the organization and its users lose access to all incidents.", "type": "boolean", "x-nullable": true}, "roles": {"title": "Roles", "description": "User-specific roles within this organization", "type": "string", "readOnly": true}, "type_t": {"title": "Type t", "description": "Translated string indicating the type of organization.", "type": "string", "x-nullable": true}, "affiliates": {"title": "Affiliates", "description": "List of organization IDs that are direct affiliates of this organization", "type": "string", "readOnly": true}, "all_affiliates_and_groups": {"title": "All affiliates and groups", "description": "Complete list of related organization IDs including affiliates and group members", "type": "string", "readOnly": true}, "primary_location": {"title": "Primary location", "description": "The primary area in which the organization operates, granting increased access to survivor data.", "type": "integer", "x-nullable": true}, "secondary_location": {"title": "Secondary location", "description": "The secondary areas in which the organization operates, used for receiving alerts outside the primary working area.", "type": "integer", "x-nullable": true}}}, "CurrentUser": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "email": {"title": "Email", "description": "User's email address (used for login and communications)", "type": "string", "format": "email", "minLength": 1}, "permissions": {"title": "Permissions", "description": "Complete permissions mapping for the user based on roles", "type": "object", "readOnly": true}, "first_name": {"title": "First name", "description": "User's first name", "type": "string", "minLength": 1}, "last_name": {"title": "Last name", "description": "User's last name", "type": "string", "minLength": 1}, "states": {"title": "States", "description": "Geographic states/regions where user is authorized to work", "type": "string", "readOnly": true}, "preferences": {"title": "Preferences", "description": "User preferences and application settings", "type": "object"}, "internal_state": {"title": "Internal state", "description": "Internal state for limits, quotas, and admin-managed settings. Admin-only field.", "type": "object", "readOnly": true, "x-nullable": true}, "organization": {"$ref": "#/definitions/UserProfileOrganization"}, "roles": {"description": "Roles associated with the user.", "type": "array", "items": {"description": "Roles associated with the user.", "type": "integer"}, "readOnly": true, "uniqueItems": true}, "active_roles": {"title": "Active roles", "type": "string", "readOnly": true}, "pending_roles": {"title": "Pending roles", "type": "string", "readOnly": true}, "mobile": {"title": "Mobile", "description": "User cell phone number.", "type": "string", "x-nullable": true}, "social": {"title": "Social", "description": "Social media account information.", "type": "object", "x-nullable": true}, "lineage": {"description": "Lineage of user IDs who referred the current user.", "type": "array", "items": {"title": "Lineage", "type": "integer", "maximum": 2147483647, "minimum": -2147483648}, "readOnly": true, "x-nullable": true}, "primary_language": {"title": "Primary language", "description": "Primary language of the user.", "type": "integer", "x-nullable": true}, "secondary_language": {"title": "Secondary language", "description": "Secondary language of the user.", "type": "integer", "x-nullable": true}, "files": {"description": "Files associated with the user (profile images, documents, etc.)", "type": "array", "items": {"$ref": "#/definitions/FileJoin"}, "readOnly": true}, "referring_user": {"title": "Referring user", "description": "User who referred this user.", "type": "integer", "readOnly": true, "x-nullable": true}, "accepted_terms": {"title": "Accepted terms", "description": "Indicates whether the user has accepted the terms.", "type": "boolean", "x-nullable": true}, "accepted_terms_timestamp": {"title": "Accepted terms timestamp", "description": "Timestamp when the user accepted the terms.", "type": "string", "format": "date-time", "x-nullable": true}, "beta_features": {"description": "Beta features the user has access to", "type": "array", "items": {"description": "Beta features the user has access to", "type": "string"}, "readOnly": true, "uniqueItems": true}, "approved_incidents": {"description": "Incidents the user is approved to work on", "type": "array", "items": {"description": "Incidents the user is approved to work on", "type": "string"}, "readOnly": true, "uniqueItems": true}, "mobile_dnis_verified_at": {"title": "Mobile dnis verified at", "description": "Timestamp when the dnis (user_users.dnis_id, referencing the sanitized version of user_users.mobile) was verified via text message. Verification must happen whenever a user updates their mobile number. Note: This should be able to happen via text AND phone call. For example, if a phone volunteer changes their number to an office line to take phone calls, a sucessful phone call delivery qualifies as verification.", "type": "string", "format": "date-time", "readOnly": true, "x-nullable": true}}}, "User": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "email": {"title": "Email", "description": "User's email address (used for login and communications)", "type": "string", "format": "email", "minLength": 1}, "first_name": {"title": "First name", "description": "User's first name", "type": "string", "minLength": 1}, "last_name": {"title": "Last name", "description": "User's last name", "type": "string", "minLength": 1}, "organization": {"$ref": "#/definitions/UserProfileOrganization"}, "roles": {"description": "Roles associated with the user.", "type": "array", "items": {"description": "Roles associated with the user.", "type": "integer"}, "readOnly": true, "uniqueItems": true}, "active_roles": {"title": "Active roles", "description": "Approved active role IDs for this user", "type": "string", "readOnly": true}, "pending_roles": {"title": "Pending roles", "description": "Role IDs the user has requested but not yet been approved/rejected", "type": "string", "readOnly": true}, "mobile": {"title": "Mobile", "description": "User cell phone number.", "type": "string", "x-nullable": true}, "social": {"title": "Social", "description": "Social media account information.", "type": "object", "x-nullable": true}, "lineage": {"description": "Lineage of user IDs who referred the current user.", "type": "array", "items": {"title": "Lineage", "type": "integer", "maximum": 2147483647, "minimum": -2147483648}, "readOnly": true, "x-nullable": true}, "states": {"title": "States", "description": "Application state for the user etc map viewport, etc.", "type": "string", "readOnly": true}, "preferences": {"title": "Preferences", "description": "User preferences and settings (write-only)", "type": "object"}, "internal_state": {"title": "Internal state", "description": "Internal state for limits, quotas, and admin-managed settings. Admin-only field.", "type": "object", "readOnly": true, "x-nullable": true}, "files": {"description": "Files associated with the user (profile images, documents, etc.)", "type": "array", "items": {"$ref": "#/definitions/FileJoin"}, "readOnly": true}, "primary_language": {"title": "Primary language", "description": "Primary language of the user.", "type": "integer", "x-nullable": true}, "secondary_language": {"title": "Secondary language", "description": "Secondary language of the user.", "type": "integer", "x-nullable": true}, "referring_user": {"title": "Referring user", "description": "User who referred this user.", "type": "integer", "readOnly": true, "x-nullable": true}, "accepted_terms": {"title": "Accepted terms", "description": "Indicates whether the user has accepted the terms.", "type": "boolean", "x-nullable": true}, "accepted_terms_timestamp": {"title": "Accepted terms timestamp", "description": "Timestamp when the user accepted the terms.", "type": "string", "format": "date-time", "x-nullable": true}, "last_sign_in_at": {"title": "Last sign in at", "description": "Timestamp of the previous login.", "type": "string", "format": "date-time", "x-nullable": true}, "current_sign_in_at": {"title": "Current sign in at", "description": "Timestamp of the current login.", "type": "string", "format": "date-time", "x-nullable": true}, "sign_in_count": {"title": "Sign in count", "description": "Total number of times the user has logged in.", "type": "integer", "maximum": 2147483647, "minimum": -2147483648}}}, "UpdateUserStates": {"required": ["states"], "type": "object", "properties": {"states": {"title": "States", "type": "object"}}}, "WorksiteData": {"required": ["field_value"], "type": "object", "properties": {"field_value": {"title": "Field value", "type": "string"}, "field_key": {"title": "Field key", "description": "The machine-friendly HTML field key of the data point.", "type": "string", "x-nullable": true}}}, "WorksiteTypes": {"required": ["work_type"], "type": "object", "properties": {"id": {"title": "Id", "type": "integer"}, "work_type": {"title": "Work type", "type": "integer"}, "claimed_by": {"title": "Claimed by", "description": "The organization that claimed this work type.", "type": "integer", "readOnly": true, "x-nullable": true}, "phase": {"title": "Phase", "description": "The incident phase associated with this work type.", "type": "integer", "x-nullable": true}, "status": {"title": "Status", "description": "The status associated with this work type.", "type": "string", "x-nullable": true}, "recur": {"title": "Recur", "description": "The recurring pattern associated with this work type.", "type": "string", "readOnly": true, "minLength": 1, "x-nullable": true}, "next_recur_at": {"title": "Next recur at", "description": "The next timestamp for the recurring pattern of this work type.", "type": "string", "format": "date-time", "readOnly": true, "x-nullable": true}, "created_at": {"title": "Created at", "description": "The timestamp when this work type was created.", "type": "string", "format": "date-time", "readOnly": true}}}, "Flag": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "reason_t": {"title": "Reason t", "description": "Reason why this entity is being flagged", "type": "string", "maxLength": 255, "x-nullable": true}, "is_high_priority": {"title": "Is high priority", "description": "This flag, applied to a worksite, will make the case stand out on the map or in other ways. Applied to another model, it indicates that the flag is high priority.", "type": "boolean", "x-nullable": true}, "notes": {"title": "Notes", "type": "string"}, "requested_action": {"title": "Requested action", "description": "You may request a particular action, but there is no guarantee that action will be taken. Requested actions might include organization kicked out, trained, reported to law enforcement, reported to emergency management, behavior shared with other voluntary organizations.", "type": "string", "x-nullable": true}, "action": {"title": "Action", "description": "The action taken by an administrator.", "type": "string", "x-nullable": true}, "created_at": {"title": "Created at", "description": "Timestamp when the flag was created.", "type": "string", "format": "date-time", "readOnly": true}, "flag_id": {"title": "Flag id", "type": "integer"}, "attr": {"title": "Attr", "description": "A bucket to store arbitrary data generated in the flagging process.", "type": "object", "x-nullable": true}}}, "WorksiteNotes": {"required": ["note"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "note": {"title": "Note", "type": "string", "minLength": 1}, "created_by": {"title": "Created by", "type": "integer", "default": 10778}, "created_at": {"title": "Created at", "description": "The timestamp when the note was created.", "type": "string", "format": "date-time", "readOnly": true}, "is_survivor": {"title": "Is survivor", "type": "string", "readOnly": true}, "note_type": {"title": "Note type", "description": "The type of note: AI generated call summary, survivor note, or volunteer note.", "type": "string", "enum": ["ai_generated_call_summary", "survivor_note", "volunteer_note", "auto_generated_flag_note"], "readOnly": true}}}, "WorksiteUsersTime": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "worksite": {"title": "Worksite", "description": "The worksite to which the volunteered time is attached.", "type": "integer", "x-nullable": true}, "volunteers": {"title": "Volunteers", "description": "The number of volunteers participating.", "type": "integer", "maximum": 2147483647, "minimum": -2147483648, "x-nullable": true}, "created_by_name": {"title": "Created by name", "type": "string", "readOnly": true}, "created_by_org": {"title": "Created by org", "type": "string", "readOnly": true}, "seconds": {"title": "Seconds", "description": "The time volunteered in seconds.", "type": "integer", "maximum": 2147483647, "minimum": -2147483648, "x-nullable": true}}}, "Worksite": {"required": ["location", "form_data", "incident"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "name": {"title": "Name", "type": "string", "readOnly": true}, "address": {"title": "Address", "type": "string", "readOnly": true}, "case_number": {"title": "Case number", "description": "Case number, which is an alpha character assigned to the incident, plus an incrementing number.", "type": "string", "readOnly": true, "minLength": 1}, "phone1": {"title": "Phone1", "type": "string", "readOnly": true}, "phone2": {"title": "Phone2", "type": "string", "readOnly": true}, "phone1_notes": {"title": "Phone1 notes", "description": "Notes associated with phone1.", "type": "string", "x-nullable": true}, "phone2_notes": {"title": "Phone2 notes", "description": "Notes associated with phone2.", "type": "string", "x-nullable": true}, "email": {"title": "Email", "type": "string", "readOnly": true}, "location": {"title": "Location", "description": "Values in this column have been de-identified or randomized. The geocordinates of the worksite.", "type": "string", "x-nullable": true}, "blurred_location": {"title": "Blurred location", "description": "Values in this column have been de-identified or randomized. Geocordinates of the worksite, randomized to within a 400 meter range. These are calculated whenever the location is updated, but are not randomized each time for two reasons: 1. It is costly. 2. An attacker could narrow in on the precise location by repeatedly asking the system to randomly generate a new location.", "type": "string", "readOnly": true, "x-nullable": true}, "form_data": {"type": "array", "items": {"$ref": "#/definitions/WorksiteData"}}, "postal_code": {"title": "Postal code", "type": "string", "readOnly": true}, "incident": {"title": "Incident", "description": "incident.id to which the worksite belongs.", "type": "integer", "x-nullable": true}, "work_types": {"type": "array", "items": {"$ref": "#/definitions/WorksiteTypes"}, "readOnly": true}, "city": {"title": "City", "type": "string", "readOnly": true}, "language": {"title": "Language", "description": "Language of the primary language spoken by the resident.", "type": "integer", "x-nullable": true}, "state": {"title": "State", "type": "string", "readOnly": true}, "county": {"title": "County", "type": "string", "readOnly": true}, "skip_duplicate_check": {"title": "Skip duplicate check", "type": "boolean", "default": false}, "send_sms": {"title": "Send sms", "type": "boolean", "default": false}, "flags": {"type": "array", "items": {"$ref": "#/definitions/Flag"}, "readOnly": true}, "notes": {"type": "array", "items": {"$ref": "#/definitions/WorksiteNotes"}, "readOnly": true}, "what3words": {"title": "What3words", "description": "Values in this column have been de-identified or randomized. If a point type location, then the what3words equivalent goes here.", "type": "string", "x-nullable": true}, "pluscode": {"title": "Pluscode", "description": "If a point type location, then the Google pluscode equivalent goes here.", "type": "string", "x-nullable": true}, "reported_by": {"title": "Reported by", "description": "organization.id of the reporting organization.", "type": "integer", "readOnly": true, "x-nullable": true}, "updated_at": {"title": "Updated at", "description": "Timestamp when the worksite was last updated.", "type": "string", "format": "date-time", "readOnly": true}, "events": {"title": "Events", "type": "string", "readOnly": true}, "key_work_type": {"title": "Key work type", "type": "string", "readOnly": true}, "time": {"type": "array", "items": {"$ref": "#/definitions/WorksiteUsersTime"}, "readOnly": true}, "files": {"type": "array", "items": {"$ref": "#/definitions/FileJoin"}, "readOnly": true}, "favorite": {"title": "Favorite", "type": "string", "readOnly": true}, "svi": {"title": "Svi", "description": "Float between 0-1 indicating the relative social vulnerability of the worksite. This number is calculated based upon SVI polygons and data at the time of worksite creation and stored permanently with the worksite.", "type": "string", "format": "decimal", "readOnly": true, "x-nullable": true}, "auto_contact_frequency_t": {"title": "Auto contact frequency t", "type": "string", "default": "formOptions.never", "minLength": 1, "x-nullable": true}}}, "Favorite": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "favorite_id": {"title": "Favorite id", "type": "integer"}, "type_t": {"title": "Type t", "description": "A translated string indicating the type of favorite relationship. For example, pin describes the special type of favorite between an incident and a file, where the file is pinned in a conspicuous location within the incident; or to an organization and a message, where the message is pinned or promoted. member_of_organization describes the special type of favorite between an organization and a worksite, where the resident at the worksite is a member of that organization. Where there is no specialized type of favorite, then this value is simply favorite, for example, to identify a favorite report, another favorite user, or a favorite affiliate.", "type": "string", "x-nullable": true}, "created_at": {"title": "Created at", "description": "Timestamp when the favorite was created.", "type": "string", "format": "date-time", "readOnly": true}}}, "EventLogs": {"type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "event_key": {"title": "Event key", "description": "References event_events.event_key. Entered every time a system event occurs. If this table gets large, it may need to be moved to a NOSQL db at some point.", "type": "string", "x-nullable": true}, "attr": {"title": "Attr", "type": "string", "readOnly": true}, "created_at": {"title": "Created at", "description": "Timestamp when the event was logged.", "type": "string", "format": "date-time", "readOnly": true}, "created_by": {"title": "Created by", "description": "user.id of the user who created the event. This is usually the actor_id unless an administrator manually creates events.", "type": "integer", "x-nullable": true}, "actor_id": {"title": "Actor id", "description": "The ID of the actor, if the actor is a database object. This is usually, but not necessarily, a reference to the user_id. The table reference is contained in actor_model. If the actor is not a database object (e.g., an external resource like a client or caller), then use actor_external_id and actor_external_resource to identify the actor.", "type": "integer", "maximum": 2147483647, "minimum": -2147483648, "x-nullable": true}, "actor_blurred_location": {"title": "Actor blurred location", "description": "A randomized version of actor_location, suitable for use on public maps.", "type": "string", "x-nullable": true}, "actor_location_name": {"title": "Actor location name", "description": "A plain-text name from location_locations of the polygon in which the actor_location exists.", "type": "string", "x-nullable": true}, "patient_blurred_location": {"title": "Patient blurred location", "description": "A randomized version of patient_location, suitable for use on public maps.", "type": "string", "x-nullable": true}, "patient_location_name": {"title": "Patient location name", "description": "A plain-text name from location_locations of the polygon in which the patient_location exists.", "type": "string", "x-nullable": true}, "recipient_blurred_location": {"title": "Recipient blurred location", "description": "A randomized version of recipient_location, suitable for use on public maps.", "type": "string", "x-nullable": true}, "recipient_location_name": {"title": "Recipient location name", "description": "A plain-text name from location_locations of the polygon in which the recipient_location exists.", "type": "string", "x-nullable": true}, "name_t": {"title": "Name t", "type": "string", "readOnly": true}, "past_tense_t": {"title": "Past tense t", "type": "string", "readOnly": true}, "present_progressive_t": {"title": "Present progressive t", "type": "string", "readOnly": true}, "map_destination": {"title": "Map destination", "type": "string", "readOnly": true}}}, "WorksiteChanges": {"required": ["worksite_id", "incident_id", "invalidated_at"], "type": "object", "properties": {"worksite_id": {"title": "Worksite id", "type": "integer"}, "incident_id": {"title": "Incident id", "type": "integer"}, "invalidated_at": {"title": "Invalidated at", "type": "string", "format": "date-time"}}}}, "tags": [{"name": "Administration - Users", "description": "Administrative user management operations requiring elevated permissions."}, {"name": "Common - Cache"}, {"name": "Incidents", "description": "Disaster incident management, incident creation, updates, and incident-related operations."}, {"name": "Lists", "description": "List management for various Crisis Cleanup data collections and categorizations."}, {"name": "Locations", "description": "Geographic data, mapping layers, location search, and spatial operations."}, {"name": "Public", "description": "Public-facing endpoints that don't require authentication."}, {"name": "System", "description": "System utilities, favorites, webhooks, common operations, and platform-wide functionality."}, {"name": "Users", "description": "User management, authentication, profiles, roles, and permissions. Includes user registration, invitations, and account settings."}, {"name": "Worksites", "description": "Worksite management for disaster response including damage assessment, work orders, and site coordination."}, {"name": "tools"}]}