Work Order Endpoints
Diagnose Work Order
POST /work-order/enrich
Our most advanced AI endpoint for diagnosing work orders. This endpoint analyzes work order details and provides comprehensive diagnostic insights, cost estimates, and resolution steps.
This endpoint accepts work order data from your property management system. While only the issue description is required, providing additional fields like property and location enables Inspectr to leverage contextual data from your historical work orders.
The diagnosis endpoint analyzes the work order and returns a detailed response containing:
-
Top 5 Previous Fixes
- Historical solutions that worked for similar issues
- Includes cost data, success rates, and which vendors performed the work
- Shows frequency of each fix across your portfolio
-
Top 3 Diagnoses
- AI-generated potential diagnoses ranked by likelihood
- Each diagnosis includes:
- Detailed assessment of the issue
- Step-by-step resolution guide
- Recommended vendor type
- Severity level
- Cost estimates broken down by labor and parts
- Required parts list
- Relevant asset specifications
-
Manual Insights
- Additional observations and recommendations from the AI
-
Contextual Information
- Similar historical work orders
- Average resolution times
- Typical costs for comparable issues
This rich output helps property managers make informed decisions about repairs and maintenance by combining historical data with AI-powered analysis.
Request Body
{ "issue_description": "string", // Required - Description of the issue "client_id": "string", // Optional - Client identifier "client_number": "string", // Optional - Client number "ticket_open_date": 0, // Optional - Date ticket was opened "ticket_close_date": 0, // Optional - Date ticket was closed "location": "string", // Optional - Location of the issue "title": "string", // Optional - Work order title "property_id": 0, // Optional - Property identifier "unit_id": 0, // Optional - Unit identifier "vendor_comments": "string", // Optional - Comments from vendors "closing_description": "string", // Optional - Description at closing "resolution": "string", // Optional - Resolution details "estimated_cost": 0, // Optional - Estimated cost "actual_cost": 0, // Optional - Actual cost if known "work_order_status": "string", // Optional - Current status "urgency": "string", // Optional - Issue urgency level "assigned_vendors": "string", // Optional - Current assigned vendors "tags": "string", // Optional - Work order tags "invoices": "string", // Optional - Associated invoices "property_detail": "string", // Optional - Property details "unit_detail": "string", // Optional - Unit details "work_start_date": "string", // Optional - When work started "work_complete_date": "string", // Optional - When work completed "estimated_complete_date": "string", // Optional - Estimated completion date "last_updated": "string", // Optional - Last update timestamp "asset": "string" // Optional - Asset identifier}
Response
{ "top_5_previous_fixes": [ { "fix": "string", // Description of previous fix "average_cost": 0, // Average cost of this fix "frequency": 0, // Number of times this fix was used "percent_fix": 0, // Success rate of this fix "tickets_effected": [ // Related work order IDs "string" ], "vendor": "string" // Vendor who performed the fix } ], "top_3_diagnosis": [ { "diagnosis": "string", // Diagnosis name "assessment": "string", // Detailed assessment "likelihood": 0, // Confidence score (0-1) "vendor": "string", // Recommended vendor type "severity": "string", // Issue severity "resolution_steps": [ // Step-by-step resolution guide "string" ], "cost_score": "string", // Relative cost indicator "pricing": { "labor_cost_per_hour": "string", "time": "string", "total_parts": "string", "total_labor": "string", "total": "string" }, "parts": [ // Required parts "string" ], "asset_specs": [ // Relevant asset specifications "string" ] } ], "manual_insights": [ // Additional insights "string" ], "context": { "relevant_work_orders": [], // Similar historical work orders "average_close_time": 0, // Average resolution time "average_cost": 0 // Average cost for similar issues }}
Example Request
curl -X POST https://api.inspectr.ai/work-order/enrich \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "issue_description": "AC not cooling, unit running but warm air", "location": "Unit 200", "asset": "RTU-1", "property_id": 123, "urgency": "High" }'
import requests
# Initialize the API clientapi_key = 'YOUR_API_TOKEN'url = 'https://api.inspectr.ai/work-order/enrich'
# Create work order datawork_order = { "issue_description": "AC not cooling, unit running but warm air", "location": "Unit 200", "asset": "RTU-1", "property_id": 123, "urgency": "High"}
# Send requestresponse = requests.post( url, headers={ 'Authorization': f'Bearer {api_key}', 'Content-Type': 'application/json' }, json=work_order)
# Handle responseif response.status_code == 200: diagnosis = response.json() print(f"Top diagnosis: {diagnosis['top_3_diagnosis'][0]['diagnosis']}")else: print(f"Error: {response.status_code}") print(response.json())
Need Help?
- Email: support@inspectr.ai
- Visit: inspectr.ai