WebAPI – How do I create work orders?
This method offers a simple way of creating a Work Order for a specific Asset, Location, Tool or Route.
The method to be used to create a work order is: POST /api/mytenant/myorganization/maintenance/workorders/newWorkOrderInfo
Json example to create a work order
{
"Description": "Ordem de Trabalho",
"Company": "DEMO",
"WorkOrderType": "MR",
"AssetType": 1,
"Location": "00000000000001",
"Equipment": null,
"Tool": null,
"MaintenanceRoute": null,
"WorkOrderMaintenancePlans": [
{
"MaintenancePlan":"PMR"
}
],
"Workshop": "MN",
"PriorityLevel": "N",
"Responsible": "0002",
"Supplier": "0003",
"Customer": "0015",
"Remarks": "Observações Gerais",
"ExpectedDate": "2021-08-31T11:15:17.477+00:00",
"Date": "2021-08-31T11:15:17.477+00:00"
}
This method allows you to create a work order according to the parameters specified:
- Description: Short description of what originated the WO. This field is required.
- WorkOrderType: The key of the WO type. This field is required.
- AssetType: Work order asset type (1- Location, 2-Equipment, 3- Tool and 4-Route). This field is required.
- Location: The location key associated to the WO
- Equipment: The equipment key associated to the WO
- Tool: The tool key associated to the WO
- MaintenanceRoute: The route key associated to the WO
- WorkOrderMaintenancePlans: A set of maintenance plans that must be executed in the work order. It is required to define at least one maintenance plan.
- MaintenancePlan: Maintenance Plans Key.
- Workshop: The key of the WO workshop. If not specified, by default it is the workshop in the work order type.
- PriorityLevel: The key of the priority level of the WO's requester. If not specified, the priority level is defined by default in the work order type.
- Remarks: The WO's observations
- ExpectedDate: Date the WO is expected to start. By default, it is the same as the date when the WO was created
- Date: WO Date. By default, it is the same as the date when the WO was created