Skip to content

PATCH /work-order/ ​

Update Work Order​

PATCH
/work-order/{wo_key}

Update editable fields of an existing work order.

Accepts any combination of due date, start date, project code, BOM lines,
output position, and notes. Updates matching Job records for fields that
propagate to jobs (start date, project code). Commits all changes in a
single transaction.

Emits: WORK_ORDER_UPDATED
Required scope: production:work-order:update

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

Parameters​

Path Parameters

wo_key*
Type
string
Required

Request Body​

application/json
JSON
{
  
"new_due_date": "string",
  
"new_from_date": "string",
  
"new_project_code": "string",
  
"new_bom": [
  
  
{
  
  
  
"component_key": "prod-002",
  
  
  
"component_code": "PROD-B-001",
  
  
  
"component_description": "M5 hex bolt, stainless steel",
  
  
  
"qt": 4,
  
  
  
"phase_key": "phase-001",
  
  
  
"phase_name": "Assembly",
  
  
  
"consumption_options": {
  
  
  
  
"consumption_position_key": "pos-002",
  
  
  
  
"consumption_position_mandatory": false,
  
  
  
  
"minimum_quantity_if_negative": false,
  
  
  
  
"minimum_quantity": 1
  
  
  
},
  
  
  
"traceability_level": "form_only",
  
  
  
"extra": "string"
  
  
}
  
],
  
"new_output_position_key": "string",
  
"notes": "string"
}

Responses​

Successful Response

application/json
JSON
{
  
"status": 200,
  
"message": "string",
  
"detail": "string"
}

Samples​

Powered by VitePress OpenAPI

Released under the Apache 2.0 License.