WebAPI – How do I create work orders?

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

  1. {
    "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