Skip to content

PATCH /work-order/{wo_key}/update-quantities

Update Work Order Quantities

PATCH
/work-order/{wo_key}/update-quantities

Update the planned quantity of a work order and its jobs.

Accepts a new work order quantity and a list of job-level updates (insert,
update, or close). Recalculates progress for affected jobs; closes jobs whose
completed quantity meets or exceeds the new planned quantity. Removes or
re-adds the work order from the site queue based on resulting status.

Emits: (direct transaction — no event class)
Required scope: production:work-order:update-quantities

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_quantity": 0,
  
"job_updates": [
  
  
{
  
  
  
"action": "update",
  
  
  
"data": {
  
  
  
  
"additionalProperties": "string"
  
  
  
}
  
  
}
  
]
}

Responses

Successful Response

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

Samples

Powered by VitePress OpenAPI

Emits: JobClosed — when a job's completed quantity meets or exceeds the new planned quantity

Released under the Apache 2.0 License.