Create work order
create_work_orderCreate a new work order. Requires work_orders:write scope. REQUIRED fields: title, site_id, building_id, AND at least one association (asset_id OR location_id). A work order with no asset/location association is not valid - ask the user which one applies before calling. RECOMMENDED: work_category_id (look up via list_work_categories; omit only if no reasonable match exists). Location hierarchy: always resolve top-down by calling list_sites first, then list_buildings filtered by site_id, then list_locations filtered by building_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Work order type | |
| title | Yes | Work order title (required) | |
| status | No | Status | |
| site_id | No | Site ID - resolve first via list_sites | |
| asset_id | No | Asset this work order is for - resolve via list_assets. The server mirrors it into asset_ids. | |
| due_date | No | Due date (ISO 8601) | |
| priority | No | Priority level | |
| asset_ids | No | Assets this work order covers - use instead of asset_id when there is more than one. | |
| assignees | No | Array of assigned user IDs (alternative to assigned_to for multiple assignees) | |
| image_url | No | Image storage path (upload via create_upload_url with bucket "attachments", then set this to the returned path) | |
| meter_unit | No | Meter unit (km, miles, hours, cycles) | |
| start_date | No | Start date (ISO 8601) | |
| system_ids | No | Systems this work order covers - resolve via list_systems. Systems have no singular field; this array is the only way to associate them. | |
| assigned_to | No | Assigned user ID (mapped to assignees array) | |
| building_id | No | Building ID - resolve second via list_buildings filtered by site_id | |
| description | No | Detailed description | |
| location_id | No | Location this work order is for - resolve last via list_locations filtered by building_id. The server mirrors it into location_ids, so send this OR location_ids, not a conflicting pair. | |
| location_ids | No | Locations this work order covers - use instead of location_id when there is more than one. Sending location_id alone replaces this with that single id. | |
| meter_reading | No | Meter/odometer reading at time of service | |
| estimated_cost | No | Estimated cost | |
| estimated_time | No | Estimated time in hours | |
| work_category_id | No | Work category ID | |
| purchase_order_id | No | Purchase order that paid this work order's actual cost - resolve via list_purchase_orders. Counts against the order's remaining balance. | |
| infrastructure_asset_ids | No | Infrastructure features this work order covers - resolve via list_infrastructure_assets. Use this when one job covers several features (a round of hydrant flushing); the whole selection is one work order with one completion and one cost, split across the features. Mutually exclusive with asset/location/system targets. |