Valuekeep DevelopmentWork
DevelopmentWork
Work
Back | List of Articles

How to create or delete work orders?

Last changed in 26/12/2024

Create WO

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:
  1. Description: Short description of what originated the WO. This field is required.
  2. WorkOrderType: The key of the WO type. This field is required.
  3. AssetType: Work order asset type (1- Location, 2-Equipment, 3- Tool and 4-Route). This field is required.
  4. Location: The location key associated to the WO
  5. Equipment: The equipment key associated to the WO
  6. Tool: The tool key associated to the WO
  7. MaintenanceRoute: The route key associated to the WO
  8. WorkOrderMaintenancePlans: A set of maintenance plans that must be executed in the work order. It is required to define at least one maintenance plan.
  9. MaintenancePlan: Maintenance Plans Key.
  10. Workshop: The key of the WO workshop. If not specified, by default it is the workshop in the work order type.
  11. 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.
  12. Remarks: The WO's observations
  13. ExpectedDate: Date the WO is expected to start. By default, it is the same as the date when the WO was created
  14. Date: WO Date. By default, it is the same as the date when the WO was created

Delete WO

This method allows you to delete a work order.

The method to use for deleting a work order is:

DELETE url/api/mytenant/myorganization/maintenance/workorders/{{companyKey}}/{{workorderKey}}

The parameters to be overridden in the method are:

  1. companykey: the company key
  2. workorderKey: the key of the workorder you want to delete.

When this method is successfully executed it returns an HttpStatusCode.204.

Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.
Related Articles
How to update a work order? How to change the status of the work order? How to create a monitoring? How to get the failure list? How to create or delete a failure?