Create Work Order
POST/organizations/:organizationId/work-orders
Create work order
Request
Path Parameters
The ID of organization.
- application/json
Body
required
The type of work order(Normal, Template).
The subject of work order.
The description of work order.
The expired time of work order(Must be a multiple of 15 minutes).
The workTime of work order, when type is template.
The schedule type of work order.
Days of week, ex: [false, true, false, false, false, true, false] is monday and friday of week.
How many weeks interval, ex: 1 is every week, 2 is interval of one week.
Day of month, ex: 22 is 22th day of every month.
How many months interval, ex: 1 is every month, 2 is interval of one month(1/22, 3/22, 5/22 etc...).
How many years interval, ex: 1 is every year, 2 is interval of one year(2023/01/22, 2025/01/22, 2027/01/22 etc...).
Ahead of time(seconds) to available in the list.
assignee object
The assignee of work order.
The priority of work order.
The ID of work request.
The location ID of work order.
The procedures of work order.
The images of work order.
The files of work order.
The ID list of part.
The ID list of asset.
Enable/Disable notification.
The time tracking type for the status update (manual, automatic).
Responses
- 200
- 401
- 403
- 404
- 422
- application/json
- Schema
- Example (from schema)
- Example
Schema
data objectrequired
Data of the work order.
assignee objectrequired
{
"data": {
"id": "string",
"organizationId": "string",
"type": "string",
"subject": "string",
"description": "string",
"expiredAt": "string",
"workTime": 0,
"scheduleType": "string",
"daysOfWeek": [
true
],
"everyWeeks": 0,
"dayOfMonth": 0,
"everyMonths": 0,
"everyYears": 0,
"locationId": "string",
"aheadOfTime": 0,
"assignee": {},
"priority": "string",
"workRequestId": "string",
"procedures": "string",
"images": [
"string"
],
"files": [
"string"
],
"partIds": [
"string"
],
"assetIds": [
"string"
],
"enableNotify": true,
"status": "string",
"timeTrackingType": "string",
"createdBy": "string",
"createdAtDateString": "string",
"createdAt": 0
}
}
{
"data": {
"id": "o-organizationId-wo-workOrderId",
"organizationId": "o-organizationId",
"type": "Normal",
"subject": "IDT-WorkOrder",
"description": "IDT-WorkOrder-Description",
"expiredAt": "2024-02-01T00:00:00.000Z",
"workTime": 3600000,
"scheduleType": "Daily",
"daysOfWeek": "",
"everyWeeks": "",
"dayOfMonth": "",
"everyMonths": "",
"everyYears": "",
"locationId": "l-locationId",
"aheadOfTime": 3600,
"assignee": [
{
"type": "Team",
"id": "6d708f0e-xxxx-xxxx-xxxx-f0d9c59488ef"
},
{
"type": "User",
"id": "593b34c0-xxxx-xxxx-xxxx-a454c6f9f50d"
}
],
"priority": "Low",
"workRequestId": "wr-workRequestId",
"procedures": [],
"images": [
"Asset-Image.png"
],
"files": [
"Infodeck-Bot-0001.pdf"
],
"partIds": [],
"assetIds": [],
"enableNotify": false,
"status": "Open",
"timeTrackingType": "automatic",
"createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4",
"createdAtDateString": "2024-01-01T00:00:00.000Z",
"createdAt": 1704067200000
}
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The request has not permission.
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Unauthenticated",
"message": "Authentication is required and has failed or has not yet been provided."
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The request has not permission.
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Forbidden",
"message": "Access to the requested resource is forbidden."
}
The resource hasn't found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The resource hasn't found.
The resource hasn't found message.
{
"error": "string",
"message": "string"
}
{
"error": "ResourceNotFound",
"message": "The requested resource could not be found."
}
The input data has invalid.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The input data has invalid.
The input data has invalid message.
{
"error": "string",
"message": "string"
}
{
"error": "ValidationError",
"message": "Input data validation failed."
}