WebAPI

WebAPI – Report Contract Consumptions

43 views 25 May, 2017 28 February, 2018 Valuekeep 0

This service allows you to retrieve and handle Contract Consumptions in Valuekeep.

Below you can find an analysis of the methods available through the service.

Get Contract Consumption Reports

GET /api/mytenant/myorganization/maintenancemanagementcore/workorderreportcontracts/GetWorkOrderReportContractsByFilter?version={version}&maxrecords={maxrecords}

This method allows you to retrieve the list of consumption reports applying several filters. You can retrieve this list using the following filters:

  • StateKey: List of states (see the numeric part of the natural key of values in the States section, on Create a Work Order)
  • CreatedBy: User login for the employee who created the consumption report
  • WorkOrderKey: Work Order code
  • MaxRecords: Maximum number of records (you can request 200 records at a time)
  • Version: Version
  • WOResponsible: Person in Charge of WO
  • WCResponsible: Person in Charge of the Work Center
  • WOOrWCResponsible: Person in Charge of the WO or Work Center

The Version and MaxRecords filters are required. The list of contract consumption reports returned is sorted by version ascendingly.

Examples:

GET /api/mytenant/myorganization/maintenancemanagementcore/workorderreportcontracts/GetWorkOrderReportContractsByFilter?stateKey=001&stateKey=002&maxRecords=50&createdBy=myuser&version=AAAAAAAAAAA=

Retrieves a maximum of 50 work orders reports in the “Pending” and “Waiting for Approval” states, reported by the employee with the “myuser” username and using version “AAAAAAAAAAA=” or later.

GET /api/mytenant/myorganization/maintenancemanagementcore/workorderreportcontracts/GetWorkOrderReportContractsByFilter?workorderkey=WO001&maxRecords=50&version=AAAAAAAAAAA=

Retrieves consumption reports for WO “WO001”.

Create a Contract Consumption Report

POST /api/mytenant/myorganization/maintenancemanagementcore/workorderreportcontracts

This method allows you to create a Contract Consumption Report for a specific Work Order. The “body” of the message must follow the structure for the WorkOrderReportContractResource.

Example:

{
“Description”: “”,
“ReportDate”: “2017-05-11T18:10:23.9912424+01:00”,
“WorkOrder”: “OT0016”,
“Location”: null,
“Asset”: “AC0001”,
“WorkOrderTaskReportContracts”: [
{
“Date”: “2017-05-10T16:30:37.398604+01:00”,
“Quantity”: 1,
“Remarks”: “”,
“ItemType”: “Item”,
“WorkOrderPlanTask”: “OT0016.E25C66BA-9426-4055-9972-D7C5637A49C2”,
“MaintenancePlan”: “PM-000002.1”,
“Warehouse”: “A1”,
“Unit”: “UN”,
“Task”: “T-000002”,
“Item”: “A0001”,
“Index”: 0
}
],
“Company”: “20170411”,
“CostCenter”: null,
“Remarks”: null
}

Tags:

Foi útil?