Webapi - Creating a consumption report in a work order

Webapi - Creating a consumption report in a work order

This method allows you to create a consumption report in a work order in a simplified way.
 
The method used to create a consumption report in a work order is:
 
POST {{url}}/api/{{tenant}}/{{organization}}/maintenance/workOrderReportConsumptions
 
Json example to create a consumption report in a work order:
  1. {
    "ReportDate" : "2021-06-10T09:48:28+01:00",
    "AssetType" : 1,
    "Location" : "AM",
    "Equipment" : null,
    "Tool" : null,
    "WorkOrder" : "0000000008",
    "Company" : "DEMO",
    "employee" : "0014",
    "remarks"null,
    "WOConsumptionLines": [{
        "Date""2021-06-10T09:52:28+01:00",
        "Quantity"1,
        "Remarks""teste oleo",
        "Part""0004",
        "Unit""UN",
        "WareHouse""W1"
    },{
        "Date""2021-06-10T09:52:28+01:00",
        "Quantity"2,
        "Remarks""teste",
        "Part""I-0005",
        "Unit""UN",
        "WareHouse""W1"
    }]}
This method allows to create a consumption report in a work order, according to the parameters filled in:
  1. reportDate: The report date. Mandatory field.
  2. assetType: The asset type (2- equipment; 3- tool). Mandatory field.
  3. location: The location's key.
  4. equipment: The equipment key..
  5. tool: The tool's key.
  6. workOrder: The key of the work order the misc cost will be recorded to. Mandatory field.
  7. company: The company's key. Mandatory field.
  8. employee: Employee key. Mandatory field.
  9. remarks: Remarks.
  10. ConsumptionLines: Consumption lines:
    1. Date: Consumption date, mandatory field.
    2. Quantity: The quantity, mandatory field.
    3. Remarks: The remarks.
    4. Part: The part key, mandatory field.
    5. Unit: The unit key, mandatory field.
    6. Warehouse: The warehouse key, mandatory field.

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