Valuekeep DevelopmentWork
DevelopmentWork
Work
Back | List of Articles

How to create or delete a labor record in a work order?

Last changed in 26/12/2024

Create Record

This method allows you to create a labor report in a work order in a simplified way.

The method used to create a labor report in a work order is: POST {{url}}/api/{{tenant}}/{{organization}}/maintenance/workOrderReportLabors
Json example to create a labor report in a work order:
{
    "workOrderReportLaborKey": "L0001",
    "reportDate": "2021-08-17T14:38:36.8969313+00:00",
    "tárdate": "2021-08-17T07:38:52+00:00",
    "endDate": "2021-08-17T14:38:59+00:00",
    "totalTime": 25207,
    "remarks": null,
    "workOrder": "0001",
    "assetType": 2,
    "location": null,
    "equipment": "ATC01",
    "tool": null,
    "employee": "0007",
    "schedulingLaborCost": "1",
    "expertise": null,
    "expertiseTier": null,
    "currency": "EUR",
    "company": "DEMO",
    "workOrderMaintenancePlan": "MP-000001_1",
    "task": "T_00001"
}
This method allows to create a WO labor report, according to the parameters filled in:
  1.  reportDate: The report date. Mandatory field.
  2. startDate: The report start date. Mandatory field.
  3. endDate: The report end date. Mandatory field.
  4. totalTime: The total time, in seconds. Mandatory field.
  5. remarks: Remarks.
  6. workOrder: The key of the work order the labor will be recorded to. Mandatory field.
  7. assetType: The asset type (2- equipment; 3- tool). Mandatory field.
  8. location: The location's key.
  9. equipment: The equipment key.
  10. tool: The tool's key.
  11. employee: Employee key. Mandatory field.
  12. schedulingLaborCost: The key of the scheduling group. Mandatory field, when the expertise has not been defined. If you fill in this field, it is not mandatory to define the expertise.
  13. Expertise: The expertise key. Mandatory field, when the scheduling labor cost has not been defined. If you fill in this field, it is not mandatory to define the scheduling labor cost.
  14. expertiseTier: The key of the expertise level. Mandatory field, if the expertise field has been previously defined.
  15. currency: The currency's key. Mandatory field.
  16. company: The company's key. Mandatory field.
  17. workorderMaintenancePlan: The maintenance plan key.
  18. task: The task key.

When this method is executed successfully, it returns HttpStatusCode.201Created.

Delete Record

This method allows you to delete a work order labor report.

 The method used to delete a work order labor report is:

DELETE  url/api/mytenant/myorganization/maintenance/workorderreportlabors/{{companyKey}}/{{workorderreportlaborKey}}

The parameters being replaced on the method are:

  1. companyKey: The company key
  2. workorderreportlaborKey: The key of the labor report you wish to delete.
 When this method is executed successfully, it returns HttpStatusCode.204.
Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.
Related Articles
How to create or delete work orders? 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?