Work orders
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| GET | /api/v1/work-orders | Get work orders |
| POST | /api/v1/work-orders | Create work order |
| GET | /api/v1/work-orders/{workOrderId} | Get work order |
| PUT | /api/v1/work-orders/{workOrderId} | Update work order |
| GET | /api/v1/work-orders/{workOrderId}/revisions | Get work order revisions |
| POST | /api/v1/work-orders/{workOrderId}/start | Start work order |
| POST | /api/v1/work-orders/{workOrderId}/steps | Add work order step |
| PUT | /api/v1/work-orders/{workOrderId}/steps/{stepId} | Update work order step |
| DELETE | /api/v1/work-orders/{workOrderId}/steps/{stepId} | Delete work order step |
| POST | /api/v1/work-orders/{workOrderId}/complete | Complete work order |
| POST | /api/v1/work-orders/{workOrderId}/cancel | Cancel work order |
| POST | /api/v1/work-orders/{workOrderId}/attachments | Add work order file attachment |
| DELETE | /api/v1/work-orders/{workOrderId}/attachments/{attachmentId} | Remove work order file attachment |
| POST | /api/v1/work-orders/{workOrderId}/traces | Add work order trace |
| GET | /api/v1/work-orders/{workOrderId}/comments | Get work order comments |
| POST | /api/v1/work-orders/{workOrderId}/comments | Add work order comment |
| DELETE | /api/v1/work-orders/{workOrderId}/comments/{commentId} | Delete work order comment |
Get work orders
GET/api/v1/work-orders
Access. Send a bearer token or an API key. The caller needs the WorkOrders view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Page | query | integer (int32) | No | Limits: minimum 1. |
PageSize | query | integer (int32) | No | Limits: minimum 1, maximum 100. |
$orderby | query | string | No | Example: "created_at desc" or "name asc" |
$filter | query | string | No | Apply a ODATA style filter to the query to add a fixed constraint. For example, if you want to filter by the creation date, you would set the filter to "created_at ge 2022-01-01". Or if you want to filter by a specific status, you would set the filter to "status eq 'active'". |
$search | query | string | No | Provide a search value which would inherit the 'CONTAINS' behaviour. |
productId | query | string (uuid) | No | |
status | query | enum WorkOrderStatus | No | One of: Planned, InProgress, Completed, Cancelled. |
fromDate | query | string (date-time) | No | |
toDate | query | string (date-time) | No |
Response
200. Returns a PagedResult envelope. Each item in data is WorkOrderResponse.
curl -X GET "https://api.miridia.io/api/v1/work-orders" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Create work order
POST/api/v1/work-orders
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Request body
Send JSON with the shape CreateWorkOrderCommand.
| Field | Type | Required | Description |
|---|---|---|---|
outputProductId | string (uuid) | No | |
reference | string | No | |
productionLocationId | string (uuid) | No | |
assignedToUserId | string (uuid) | No | The user who should run this work order. Optional; null leaves it unassigned. |
plannedQuantity | number (double) | No | |
scheduledStart | string (date-time) | No | |
description | string | No | Rich-text (HTML) description entered by a person. Not sanitized server-side. |
templateId | string (uuid) | No | Optional work order template. When given, its description prefills the work order's description if the request supplies none, and its steps are appended after the process-snapshot steps with continuing step numbers. |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"outputProductId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reference": "string",
"productionLocationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"assignedToUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"plannedQuantity": 0,
"scheduledStart": "2026-09-29T08:00:00Z",
"description": "string",
"templateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'Get work order
GET/api/v1/work-orders/{workOrderId}
Access. Send a bearer token or an API key. The caller needs the WorkOrders view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X GET "https://api.miridia.io/api/v1/work-orders/{workOrderId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Update work order
PUT/api/v1/work-orders/{workOrderId}
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateWorkOrderCommand. Edits a work order while it is still Planned. Every successful edit records the prior state as a revision and bumps the work order's revision number.
| Field | Type | Required | Description |
|---|---|---|---|
workOrderId | string (uuid) | No | |
plannedQuantity | number (double) | No | |
scheduledStart | string (date-time) | No | |
productionLocationId | string (uuid) | No | |
assignedToUserId | string (uuid) | No | The user who should run this work order. Null clears the assignment. |
description | string | No | |
changeNote | string | No | |
steps | WorkOrderStepEditRequest[] | No | Title/instructions edits to apply to existing steps. To add or remove a step, use POST /api/v1/work-orders/{workOrderId}/steps or DELETE /api/v1/work-orders/{workOrderId}/steps/{stepId} instead. |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X PUT "https://api.miridia.io/api/v1/work-orders/{workOrderId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"plannedQuantity": 0,
"scheduledStart": "2026-09-29T08:00:00Z",
"productionLocationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"assignedToUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "string",
"changeNote": "string",
"steps": [
{
"stepId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"instructions": "string"
}
]
}'Get work order revisions
GET/api/v1/work-orders/{workOrderId}/revisions
Access. Send a bearer token or an API key. The caller needs the WorkOrders view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Response
200. Returns a JSON array. Each item is WorkOrderRevisionResponse.
curl -X GET "https://api.miridia.io/api/v1/work-orders/{workOrderId}/revisions" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revisionNumber": 0,
"snapshot": "string",
"changeNote": "string",
"changedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"changedByUserName": "string",
"dateCreated": "2026-09-29T08:00:00Z"
}
]Start work order
POST/api/v1/work-orders/{workOrderId}/start
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders/{workOrderId}/start" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Add work order step
POST/api/v1/work-orders/{workOrderId}/steps
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Request body
Send JSON with the shape AddWorkOrderStepCommand. Adds a step to a work order that is still Planned. The new step starts pending, the same status a create-time step starts in.
| Field | Type | Required | Description |
|---|---|---|---|
workOrderId | string (uuid) | No | |
title | string | No | |
instructions | string | No | Rich-text (HTML) instructions entered by a person. Not sanitized server-side. |
position | integer (int32) | No | The 1-based step number the new step should take. Every existing step at or after this position moves one place later. Omit to append the step at the end. |
assignedToUserId | string (uuid) | No | The user who should carry out this step. Optional; null leaves it unassigned. |
requiresQualityCheck | boolean | No | Marks the new step as a quality checkpoint. Defaults to false. A new step never starts with a recorded result. |
changeNote | string | No |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders/{workOrderId}/steps" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"instructions": "string",
"position": 0,
"assignedToUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"requiresQualityCheck": true,
"changeNote": "string"
}'Update work order step
PUT/api/v1/work-orders/{workOrderId}/steps/{stepId}
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes | |
stepId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateWorkOrderStepCommand.
| Field | Type | Required | Description |
|---|---|---|---|
workOrderId | string (uuid) | No | |
stepId | string (uuid) | No | |
status | enum WorkOrderStepStatus | No | One of: Pending, InProgress, Done, Skipped. |
startedAt | string (date-time) | No | |
completedAt | string (date-time) | No | |
completedByUserId | string (uuid) | No | |
assignedToUserId | string (uuid) | No | The user who should carry out this step. Null clears the assignment. |
requiresQualityCheck | boolean | No | Marks this step as a quality checkpoint. Null leaves the current value unchanged. |
qualityCheckPassed | boolean | No | Records the pass/fail result of the quality check. Null leaves the current value unchanged; the step must already require a quality check (after this update is applied) for a non-null value to be accepted. |
notes | string | No |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X PUT "https://api.miridia.io/api/v1/work-orders/{workOrderId}/steps/{stepId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"stepId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "Pending",
"startedAt": "2026-09-29T08:00:00Z",
"completedAt": "2026-09-29T08:00:00Z",
"completedByUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"assignedToUserId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"requiresQualityCheck": true,
"qualityCheckPassed": true,
"notes": "string"
}'Delete work order step
DELETE/api/v1/work-orders/{workOrderId}/steps/{stepId}
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes | |
stepId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X DELETE "https://api.miridia.io/api/v1/work-orders/{workOrderId}/steps/{stepId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Complete work order
POST/api/v1/work-orders/{workOrderId}/complete
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Request body
Send JSON with the shape CompleteWorkOrderCommand.
| Field | Type | Required | Description |
|---|---|---|---|
workOrderId | string (uuid) | No | |
producedQuantity | number (double) | No | |
scrappedQuantity | number (double) | No | |
scrapReason | string | No | Explains the scrapped quantity. Required when scrappedQuantity is greater than zero; must be left blank when it is zero. |
actualEnd | string (date-time) | No | |
productionLocationId | string (uuid) | No | Optional production location. Used when the work order has no location set (or to override it). A location is required to post inventory movements on completion. |
materialConsumption | WorkOrderMaterialConsumptionRequest[] | No | Optional per-material actual consumption. Materials not listed here are backflushed at their planned quantity. |
outputLotNumber | string | No | Optional lot number for the produced output. |
outputLotExpiryDate | string (date-time) | No | Optional expiry date for the lot named by outputLotNumber. |
serialNumbers | string[] | No | Optional serial numbers for the produced output. Must not exceed producedQuantity and must not contain a duplicate value. Linked to the lot when outputLotNumber is also given. |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders/{workOrderId}/complete" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"producedQuantity": 0,
"scrappedQuantity": 0,
"scrapReason": "string",
"actualEnd": "2026-09-29T08:00:00Z",
"productionLocationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"materialConsumption": [
{
"workOrderMaterialId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"consumedQuantity": 0
}
],
"outputLotNumber": "string",
"outputLotExpiryDate": "2026-09-29T08:00:00Z",
"serialNumbers": [
"string"
]
}'Cancel work order
POST/api/v1/work-orders/{workOrderId}/cancel
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders/{workOrderId}/cancel" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Add work order file attachment
POST/api/v1/work-orders/{workOrderId}/attachments
Step 2 of file attachment: associates a previously uploaded file with this work order. Upload the file first via POST /api/files/single, then pass the returned FileAttachment id here.
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Request body
Send JSON with the shape AddFileAttachmentRequest. Adds an attachment to an entity's metadata attachment collection. Two shapes, discriminated by Type: - File (default). title and url are required and taken as-is from the request; FileAttachmentId on the resulting metadata entry stays Guid.Empty.
| Field | Type | Required | Description |
|---|---|---|---|
type | enum MetadataAttachmentType | No | One of: File, Link. |
fileId | string (uuid) | No | Required when Type is File. |
title | string | No | Required when Type is Link. Ignored for File. |
url | string | No | Required when Type is Link. Ignored for File. |
description | string | No |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders/{workOrderId}/attachments" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"type": "File",
"fileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"url": "string",
"description": "string"
}'Remove work order file attachment
DELETE/api/v1/work-orders/{workOrderId}/attachments/{attachmentId}
Removes a previously associated attachment (file or link) from this work order by its metadata attachment entry id.
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes | |
attachmentId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X DELETE "https://api.miridia.io/api/v1/work-orders/{workOrderId}/attachments/{attachmentId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Add work order trace
POST/api/v1/work-orders/{workOrderId}/traces
Records a manual activity trace against the work order. The four lifecycle points (create, start, complete, cancel) already write their own trace automatically.
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Request body
Send JSON with the shape AddActivityTraceRequest.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
message | string | Yes | |
code | string | No | |
source | string | No | |
actionLink | string | No | |
level | enum NotificationLevel | No | One of: Standard, Info, Warning, Error, Success, Recommendation. |
icon | enum MdiIcon | No | One of: None, SyncAlert, Autorenew, Check, CheckMarkedCircle, AlertCircle, TruckDeliveryOutline, TruckFastOutline, PackageCheck, Warehouse, SwapHorizontal, AccountCheck, AccountRemove, AccountCancel, Delete. |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders/{workOrderId}/traces" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"message": "string",
"code": "string",
"source": "string",
"actionLink": "string",
"level": "Standard",
"icon": "SyncAlert"
}'Get work order comments
GET/api/v1/work-orders/{workOrderId}/comments
Returns the user-authored comments on this work order, oldest first.
Access. Send a bearer token or an API key. The caller needs the WorkOrders view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Response
200. Returns a PagedResult envelope. Each item in data is WorkOrderCommentResponse.
curl -X GET "https://api.miridia.io/api/v1/work-orders/{workOrderId}/comments" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"count": 0,
"totalCount": 0,
"page": 0,
"finalPage": 0,
"pageSize": 0,
"hasMore": true,
"statusCode": "OK",
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"comment": "string",
"user": {},
"dateCreated": "2026-09-29T08:00:00Z"
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Add work order comment
POST/api/v1/work-orders/{workOrderId}/comments
Adds a comment to the work order, attributed to the authenticated user.
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes |
Request body
Send JSON with the shape WorkOrderCommentRequest.
| Field | Type | Required | Description |
|---|---|---|---|
comment | string | Yes | Limits: maximum 4000 characters. |
Response
200. Returns a SingleResult envelope. The data field is WorkOrderCommentResponse.
curl -X POST "https://api.miridia.io/api/v1/work-orders/{workOrderId}/comments" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"comment": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workOrderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"comment": "string",
"user": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"displayName": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string"
},
"dateCreated": "2026-09-29T08:00:00Z"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Delete work order comment
DELETE/api/v1/work-orders/{workOrderId}/comments/{commentId}
Deletes a comment from the work order.
Access. Send a bearer token or an API key. The caller needs the WorkOrders modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workOrderId | path | string (uuid) | Yes | |
commentId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is boolean.
curl -X DELETE "https://api.miridia.io/api/v1/work-orders/{workOrderId}/comments/{commentId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": true,
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Models
The operations on this page use these object types. Select a type to see its fields.
ActivityTrace
Refer to ActionMessage. An activity trace becomes an action message once the response to the client is sent.
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
activityType | enum ActivityType | One of: System, User. |
userId | string (uuid) | |
code | string | |
title | string | |
message | string | |
source | string | |
actionLink | string | |
level | enum NotificationLevel | One of: Standard, Info, Warning, Error, Success, Recommendation. |
dateOfActivity | string (date-time) | |
isDashboardOnly | boolean | |
icon | enum MdiIcon | One of: None, SyncAlert, Autorenew, Check, CheckMarkedCircle, AlertCircle, TruckDeliveryOutline, TruckFastOutline, PackageCheck, Warehouse, SwapHorizontal, AccountCheck, AccountRemove, AccountCancel, Delete. |
MetadataFileAttachment
Not quite as complete as the normal FileAttachment aggregate.
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
type | enum MetadataAttachmentType | One of: File, Link. |
fileAttachmentId | string (uuid) | Left as Guid.Empty for Link entries. |
title | string | |
url | string | |
contentType | string | |
description | string |
PrimitiveUserResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
displayName | string | |
firstName | string | |
lastName | string | |
email | string | |
phoneNumber | string |
WorkOrderCommentResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
workOrderId | string (uuid) | |
comment | string | |
user | PrimitiveUserResponse | |
dateCreated | string (date-time) |
WorkOrderMaterialConsumptionRequest
Per-material actual consumption supplied at completion. Materials not listed are backflushed at their planned quantity.
| Field | Type | Description |
|---|---|---|
workOrderMaterialId | string (uuid) | |
consumedQuantity | number (double) |
WorkOrderMaterialResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
componentProductId | string (uuid) | |
componentTitle | string | |
componentCode | string | |
componentSku | string | |
componentType | enum ProductType | One of: FinishedGood, RawMaterial, Component, Consumable, Service. |
plannedQuantity | number (double) | |
consumedQuantity | number (double) | |
unit | enum UnitOfMeasure | One of: Each, Kilogram, Gram, Litre, Millilitre, Metre, Centimetre, SquareMetre, CubicMetre, Pair, Pack, Box, Roll, Sheet. |
WorkOrderProducedLotResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
lotNumber | string | |
expiryDate | string (date-time) |
WorkOrderResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
reference | string | |
description | string | |
revisionNumber | integer (int32) | |
outputProductId | string (uuid) | |
outputProductTitle | string | |
outputProductCode | string | |
bomId | string (uuid) | |
bomRevisionNumber | integer (int32) | |
processId | string (uuid) | |
processRevisionNumber | integer (int32) | |
productionLocationId | string (uuid) | |
productionLocationTitle | string | |
assignedToUserId | string (uuid) | The user who should run this work order. Null when unassigned. |
assignedToName | string | |
status | enum WorkOrderStatus | One of: Planned, InProgress, Completed, Cancelled. |
plannedQuantity | number (double) | |
producedQuantity | number (double) | |
scrappedQuantity | number (double) | |
scrapReason | string | Explains the scrapped quantity. Null when nothing was scrapped. |
scheduledStart | string (date-time) | |
actualStart | string (date-time) | |
actualEnd | string (date-time) | |
totalCost | number (double) | |
unitCost | number (double) | |
materials | WorkOrderMaterialResponse[] | |
steps | WorkOrderStepResponse[] | |
producedLot | WorkOrderProducedLotResponse | |
serialNumbers | WorkOrderSerialNumberResponse[] | |
attachments | MetadataFileAttachment[] | File attachments associated with the work order (batch records, quality certificates, photographs). |
traces | ActivityTrace[] | Activity traces recorded against the work order. |
WorkOrderRevisionResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
revisionNumber | integer (int32) | |
snapshot | string | |
changeNote | string | |
changedByUserId | string (uuid) | |
changedByUserName | string | |
dateCreated | string (date-time) |
WorkOrderSerialNumberResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
serialNumber | string | |
status | enum SerialNumberStatus | One of: Available, Consumed, Shipped, Scrapped. |
WorkOrderStepEditRequest
An edit to an existing work order step's title and/or instructions, supplied when updating a work order. A null field leaves that field unchanged; steps cannot be added or removed here.
| Field | Type | Description |
|---|---|---|
stepId | string (uuid) | |
title | string | |
instructions | string |
WorkOrderStepResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
stepNumber | integer (int32) | |
title | string | |
instructions | string | |
status | enum WorkOrderStepStatus | One of: Pending, InProgress, Done, Skipped. |
startedAt | string (date-time) | |
completedAt | string (date-time) | |
completedByUserId | string (uuid) | |
completedByName | string | |
assignedToUserId | string (uuid) | The user who should carry out this step. Null when unassigned. |
assignedToName | string | |
requiresQualityCheck | boolean | Marks this step as a quality checkpoint. |
qualityCheckPassed | boolean | The recorded pass/fail result of the quality check. Null until recorded. |
notes | string |