Skip to content

Work Orders

Role names and user_group_id values are listed in User groups.

The tasks of a maintenance job. Each work order belongs to one job and is numbered within it (n_id).

Requires a club, premium or unlimited subscription plan; on any other plan every call answers 404.

Action Who can call it
View Every group except Student Pilot (200), Cabin Crew (240) and Specialist (245)
Create, edit, reorder, delete user_group_id 1, 100, 105, 110 and 300 (Mechanic)

Anyone else gets 403. The job must belong to an aircraft of the caller’s company, otherwise the write calls answer 404.

Every change to a work order (ADD, EDIT, DELETE) is recorded in the history of its job (see Maintenance Jobs).

GET /maintenance/workorder/view/{id}.json

Retrieve one work order with its job, the job’s aircraft, the assigned user and the inventory units fitted under it.

Parameter Type Description
id string Work order UUID
{
"WorkOrder": {
"id": "98fb67bd-36af-45c3-93e2-d0607294d312",
"job_id": "2da78891-64a9-4065-b456-b4a8f902d579",
"n_id": "1",
"sort_order": "1",
"status": "pending",
"name": "Check oil",
"ata": "72",
"description": "Check level and top up.",
"time": null,
"user_id": null,
"supervisor_id": null,
"signature_id": null,
"created": "1745855373"
},
"Job": {
"id": "2da78891-64a9-4065-b456-b4a8f902d579",
"deleted": false,
"n_id": "2",
"user_id": "3",
"aircraft_id": "45",
"maintenance_plan_id": null,
"completed": false,
"oncondition": false,
"type": "Scheduled",
"repeat": "NEVER",
"name": "50 hour check",
"start": "1645186500",
"finish": "1645272900",
"hours_now": "134.65",
"hours_added": "50.00",
"created": "1644574569",
"modified": "1775372832",
"release_reference": null,
"Aircraft": {
"id": "45",
"company_id": "5eb83b98-16a8-4e19-aa62-603bb22030ad",
"registration": "EC-ABC",
"aircraft_model_id": "1132",
"hours": "101.78335",
"landings": "249",
"log_reference": "1794056940",
"AircraftModel": {
"name": "C172",
"aircraft_manufacturer_id": "292",
"AircraftManufacturer": { "name": "CESSNA" }
}
}
},
"User": {
"id": "123",
"UserDetail": { "name": "John", "surname": "Doe", "id": "122" }
},
"InventoryUnit": [
{
"id": "148968b1-c886-4a96-9c3f-1485d6625feb",
"workorder_id": "98fb67bd-36af-45c3-93e2-d0607294d312",
"inventory_id": "98901804-a498-4399-b040-604678d0cfbe",
"aircraft_id": "45",
"status": "installed",
"condition": "NEW",
"serial_number": "1",
"installation_date": "2026-04-28",
"Inventory": {
"id": "98901804-a498-4399-b040-604678d0cfbe",
"name": "Air filter",
"part_number": "99-5050"
}
}
]
}

created is Unix time. time is the time spent, in decimal hours. User carries only "id": null when nobody is assigned. Each InventoryUnit carries every field of an inventory unit (trimmed above). 404 when the work order does not exist.


POST /maintenance/workorder/edit.json

Create a work order (no id) or update one (with id). Only the keys sent are changed. The fields may be sent under WorkOrder or at the top level of the body.

Parameter Type Required Description
WorkOrder[id] string no Work order UUID. Omit to create a new one.
WorkOrder[job_id] string to create Parent maintenance job UUID (400 Missing job_id when creating without it)
WorkOrder[name] string yes Work order name
WorkOrder[status] string yes pending, open, completed, accomplished or closed
WorkOrder[ata] string no ATA chapter code
WorkOrder[description] string no Work description
WorkOrder[time] string no Time spent: decimal hours (1.5) or HH:MM (01:30, stored as 1.5)
WorkOrder[user_id] number no Assigned user ID
WorkOrder[sort_order] number no Position within the job. A new work order goes last by default; see Reorder Work Orders.

A new work order gets the next n_id of its job.

{
"result": {
"WorkOrder": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Oil change",
"status": "completed",
"n_id": 3,
"sort_order": 3
}
},
"message": "Work order saved",
"errors": [],
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}

id is the id of the saved work order (null when nothing was saved). On validation failure:

{
"result": false,
"message": "Could not save work order due to validation errors",
"errors": {
"name": ["Please enter a name"],
"status": ["Invalid status"]
},
"id": null
}

An empty body answers result: false with message: "Missing post data".


POST /maintenance/workorder/reorder.json

Set the order of the work orders of one job.

{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"order": [
"b2c3d4e5-f6a7-8901-bcde-f12345678901",
"98fb67bd-36af-45c3-93e2-d0607294d312"
]
}

order lists the work order ids in their new order; the first gets sort_order 1. Ids that are not work orders of that job are ignored. Missing job_id or order: 400.

{ "result": true }

result is false when an id in order was not updated.


POST /maintenance/workorder/delete.json

Delete a work order.

Parameter Type Required Description
id string yes Work order UUID (400 without it)
{
"result": true,
"job": {
"WorkOrder": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
},
"Job": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"Aircraft": { "company_id": "5eb83b98-16a8-4e19-aa62-603bb22030ad" }
}
}
}

Value Description
pending Work order created but not started
open Work in progress
completed Work completed, awaiting review
accomplished Work accomplished and verified
closed Work order closed