POST maintenance/work-orders: Add assignees, procedure completion, and part demand
7 days ago by ReadMe API
The POST maintenance/work-orders endpoint has some new features! Added optional fields on each part:
- requestedQuantity - total quantity needed in the part's predefined unit of measure, including shortage. Omitted unless total part quantity is enabled for the organization.
- maintenanceSiteId - maintenance site that stocks the part. Uses the same ID as GET /maintenance/sites. This is not the Places API placeId. Omitted when the part has no maintenance site, and unless total part quantity is enabled.
quantityremains the stock-backed quantity in the part's predefined unit of measure. A shortage request is reconciled asynchronously after the work order is saved.
Added optional request fields:
- assignedUserIds - dashboard user IDs assigned to the work order. Mutually exclusive with assignedUserId. On update, omit this field to keep assignments, or send an empty array to clear them. The first ID is the primary assignee. More than one ID is accepted only when multi-assignee is enabled.
- serviceTaskInstances.procedures - the complete stored procedure list, in the rank order GET returns inside subtasks. Each entry has name and isCompleted. Forms and procedure metadata are preserved. A list that does not match the stored names in that rank order is rejected.
- parts.requestedQuantity - total demand. When both quantity and requestedQuantity are sent, requestedQuantity is the total demand and quantity is the stock amount. Send 0 for zero demand.
- parts.maintenanceSiteId - maintenance site for the part line. Uses the same ID as GET /maintenance/sites.
requestedQuantity and maintenanceSiteId are accepted only when total part quantity is enabled. A request that sends quantity and omits requestedQuantity keeps the previous write behavior.