WebAPI

WebAPI – Consumptions Report

24 views 28 April, 2017 8 February, 2018 Valuekeep 0

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

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

Get Consumption Reports

GET /api/mytenant/myorganization/maintenancemanagementcore/workorderreportconsumptions/GetWorkOrderReportConsumptionByFilter

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

All filters are optional. The list of consumption reports returned is sorted by version ascendingly.

Examples:

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

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

GET /api/mytenant/myorganization/maintenancemanagementcore/workorderreportconsumptions/GetWorkOrderReportConsumptionByFilter?workorderkey=WO001

Retrieves consumption reports for WO “WO001”.

Create Consumption Report

POST /api/mytenant/myorganization/maintenancemanagementcore/workorderreportconsumptions

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

Example:

{
“Description”: “Example of Consumption”,
“ReportDate”: “2017-03-20T00:33:47.4007+00:00”,
“WorkOrder”: “WO4237”,
“Location”: null,
“Asset”: “SSPDF P0”,
“WorkOrderTaskReportConsumptions”:
[
{
“Date”: “2017-03-20T00:33:37.3937668+00:00”,
“Quantity”: 1,
“Remarks”: “”,
“MaintenancePlan”: “LIMPTAP-000012.1”,
“Warehouse”: “A1”,
“Unit”: “UN”,
“Task”: “EC.3”,
“Item”: “A0001”
}
],
“Currency”: “EUR”,
“Company”: “ORG1”,
“ReportingExchangeRate”: 0,
“CostCenter”: null,
“Remarks”: “No Remarks.”
}

Change Consumption Report

PUT /api/mytenant/myorganization/maintenancemanagementcore/workorderreportconsumptions?sequencekey=<sequencekey>

This method allows you to change consumption reports in the work order. The value of <sequencekey> must be the consumption report’s identifier and the “body” of the message must follow the structure for the WorkOrderReportConsumption resource.

Example:

PUT /api/mytenant/myorganization/maintenancemanagementcore/workorderreportconsumptions?sequencekey=I00002

{
“SequenceKey”: “I00002”,
“Description”: “1112”,
“ReportDate”: “2017-03-17T18:22:47.0205025+00:00”,
“IsPrinted”: null,
“StockIssueEmitted”: true,
“ExchangeRate”: 1,

}

This request can be used to update the consumption report with SequenceKey “I00002”.
After the request, the “Version” field will be updated in the returned resource.

Tags:

Foi útil?