POST /work-order
Create Work Order
POST
/work-order
Create a new work order with its associated job records.
Validates the product by key or code, generates a work order code via the
configured counter if not provided, and inserts the WorkOrder, Job, and Queue
records in a single ArangoDB transaction.
Emits: (direct transaction — no event class)
Required scope: production:work-order:create
Authorizations
OAuth2PasswordBearer
password Flow
Token URL
"/api/auth"Scopes:
"admin"User can access and edit users and system settings"library"User can access and edit products"production"User can access and edit production plans"operator"User can access the operator panel and make production declarations
Request Body
application/json
JSON "wo_code": "WO-2026-001", "product_key": "Product/12345", "product_code": "PRD-GEAR-42", "product_description": "Planetary gear assembly 42mm", "phase_sequence": [ [ "default" ] ], "qt_planned": 100, "priority": false, "project_code": "PROJ-2026-Q1", "start_from": "2026-05-01T06:00:00Z", "due_by": "2026-05-15T17:00:00Z", "wo_bom": [ { "component_key": "prod-002", "qt": 4, "phase_key": "phase-001", "consumption_options": { "consumption_position_key": "pos-002", "consumption_position_mandatory": false, "minimum_quantity_if_negative": false, "minimum_quantity": 1 }, "extra": "string" } ], "output_position_key": "Position/67890", "traceability_level": "serial", "serial_code_on_creation": false, "notes": "Urgent — customer delivery 2026-05-16", "extra": "string"
{
}
Responses
Successful Response
application/json
JSON "status": 200, "message": "string", "detail": "string"
{
}