Valuekeep Developers - Web API Reference

Assets | Meter Reading

Service to manage entities of type 'MeterValue'.

Overview


URL api/{tenantKey}/{orgKey}/assetManagement/meterValues
Methods Supported GET, POST, PUT, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

All Enumerations

This service uses the following enumerations:

GET Operations

GET MeterValues (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See MeterValueResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /assetManagement/meterValues/odata

GET MeterValue by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See MeterValueResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /assetManagement/meterValues/{id}

GET MeterValue by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
meterValueKey (string) Meter Reading.

Response:

When successful, the response body contains the entity record. See MeterValueResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /assetManagement/meterValues/{companyKey}/{meterValueKey}

POST Operations

POST MeterValues

Creates a new entity record.

The following elements are required:

meterValueResource (ApiMeterValueResource) The request body should contain the entity record that should be created.
See ApiMeterValueResource.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiMeterValueResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /assetManagement/meterValues

POST Insert Meter Values Set

Custom operation 'InsertMeterValuesSet'.

The following elements are required:

meterValuesSet (List) MeterValuesSet.
company (string) Company.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains a string.

Resource URL:

POST /assetManagement/meterValues/insertMeterValuesSet/{company}

PUT Operations

PUT Set AssetType MeterValue

Updates the value of attribute 'AssetType' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (enum ReportAssetType) The request body should contain the new value for the attribute.
See ReportAssetType.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/assetType

PUT Set AverageValue MeterValue

Updates the value of attribute 'AverageValue' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/averageValue

PUT Set AverageWindowSize MeterValue

Updates the value of attribute 'AverageWindowSize' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (int) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/averageWindowSize

PUT Set BlockAsset MeterValue

Updates the value of attribute 'BlockAsset' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/blockAsset

PUT Set Company MeterValue

Updates the value of attribute 'Company' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/company

PUT Set Currency MeterValue

Updates the value of attribute 'Currency' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/currency

PUT Set Date MeterValue

Updates the value of attribute 'Date' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (DateTimeOffset) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/date

PUT Set Equipment MeterValue

Updates the value of attribute 'Equipment' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/equipment

PUT Set ExchangeRate MeterValue

Updates the value of attribute 'ExchangeRate' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/exchangeRate

PUT Set ExchangeRateDate MeterValue

Updates the value of attribute 'ExchangeRateDate' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/exchangeRateDate

PUT Set FromMeter MeterValue

Updates the value of attribute 'FromMeter' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/fromMeter

PUT Set IncrementValue MeterValue

Updates the value of attribute 'IncrementValue' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/incrementValue

PUT Set IsActive MeterValue

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/isActive

PUT Set Location MeterValue

Updates the value of attribute 'Location' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/location

PUT Set MaxValue MeterValue

Updates the value of attribute 'MaxValue' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (int) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/maxValue

PUT Set Meter MeterValue

Updates the value of attribute 'Meter' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/meter

PUT Set MeterCumulativeReading MeterValue

Updates the value of attribute 'MeterCumulativeReading' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/meterCumulativeReading

PUT Set MeterForAsset MeterValue

Updates the value of attribute 'MeterForAsset' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/meterForAsset

PUT Set MeterReading MeterValue

Updates the value of attribute 'MeterReading' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/meterReading

PUT Set MeterType MeterValue

Updates the value of attribute 'MeterType' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (int) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/meterType

PUT Set MeterValueKey MeterValue

Updates the value of attribute 'MeterValueKey' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/meterValueKey

PUT Set Origin MeterValue

Updates the value of attribute 'Origin' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (enum MeterValueOrigin) The request body should contain the new value for the attribute.
See MeterValueOrigin.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/origin

PUT Set ParentMeterValue MeterValue

Updates the value of attribute 'ParentMeterValue' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/parentMeterValue

PUT Set Remarks MeterValue

Updates the value of attribute 'Remarks' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/remarks

PUT Set StartValue MeterValue

Updates the value of attribute 'StartValue' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/startValue

PUT Set Tool MeterValue

Updates the value of attribute 'Tool' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/tool

PUT Set TotalCost MeterValue

Updates the value of attribute 'TotalCost' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/totalCost

PUT Set UnitCost MeterValue

Updates the value of attribute 'UnitCost' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/unitCost

PUT Set WorkOrder MeterValue

Updates the value of attribute 'WorkOrder' in the specified entity record.

The following elements are required:

meterValueKey (string) Meter Reading.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/workOrder

PUT Set Custom Attribute MeterValue

Updates the value of 'CustomAttribute' in the specified entity record.

The following elements are required:

companyKey (string) The company key.
meterValueKey (string) Meter Reading
customAttributeName (string) The custom attribute name.
value (ExtensibilityCustomAttributeValueResource) The request body should contain the new value for the custom attribute.
See ExtensibilityCustomAttributeValueResource.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /assetManagement/meterValues/{companyKey}/{meterValueKey}/{customAttributeName}

DELETE Operations

DELETE MeterValue by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /assetManagement/meterValues/{id}

DELETE MeterValue by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
meterValueKey (string) Meter Reading.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /assetManagement/meterValues/{companyKey}/{meterValueKey}

Resources


ApiMeterValueResource

The following elements are required:

meterValueKey (string) Meter Reading.
meter (string) Meter.
date (DateTimeOffset) Date.
meterCumulativeReading (decimal) Cumulative Reading.
origin (enum MeterValueOrigin) Origin.
See MeterValueOrigin.
totalCost (MoneyResource) Total Cost.
See MoneyResource .
unitCost (MoneyResource) Unit Cost.
See MoneyResource .
company (string) Company.
currency (string) Currency.
exchangeRate (decimal) Exchange Rate.
averageWindowSize (int) Average Window Size.
fromMeter (bool) From Meter.
meterForAsset (bool) Meter For Asset.
meterType (int) Meter Type.
blockAsset (bool) Block Asset.

The following elements are optional:

incrementValue (decimal) Increment.
meterReading (decimal) Reading.
remarks (string) Remarks.
parentMeterValue (string) Parent Meter Value.
workOrder (string) Work Order.
exchangeRateDate (DateTime) Exchange Rate Date.
averageValue (decimal) Average Value.
assetType (enum ReportAssetType) Asset Type.
See ReportAssetType.
equipment (string) Equipment.
location (string) Location.
tool (string) Tool.
startValue (decimal) Start Value.
maxValue (int) Max Value.


MeterValueResource

The following elements are required:

meterValueKey (string) Meter Reading.
meter (string) Meter.
(fk) Allowed value: the natural key of a record of type Meter. These records are accessibly through the Meters service.
date (DateTimeOffset) Date.
meterCumulativeReading (decimal) Cumulative Reading.
origin (enum MeterValueOrigin) Origin.
See MeterValueOrigin.
totalCost (MoneyResource) Total Cost.
See MoneyResource .
unitCost (MoneyResource) Unit Cost.
See MoneyResource .
company (string) Company.
(fk) Allowed value: the natural key of a record of type Company. These records are accessibly through the Companies service.
currency (string) Currency.
(fk) Allowed value: the natural key of a record of type Currency. These records are accessibly through the Currencies service.
exchangeRate (decimal) Exchange Rate.
averageWindowSize (int) Average Window Size.
fromMeter (bool) From Meter.
meterForAsset (bool) Meter For Asset.
meterType (int) Meter Type.
blockAsset (bool) Block Asset.

The following elements are optional:

incrementValue (decimal) Increment.
meterReading (decimal) Reading.
remarks (string) Remarks.
parentMeterValue (string) Parent Meter Value.
(fk) Allowed value: the natural key of a record of type MeterValue. These records are accessibly through the MeterValues service.
workOrder (string) Work Order.
(fk) Allowed value: the natural key of a record of type WorkOrder. These records are accessibly through the WorkOrders service.
exchangeRateDate (DateTime) Exchange Rate Date.
averageValue (decimal) Average Value.
assetType (enum ReportAssetType) Asset Type.
See ReportAssetType.
equipment (string) Equipment.
(fk) Allowed value: the natural key of a record of type EquipmentItem. These records are accessibly through the EquipmentItems service.
location (string) Location.
(fk) Allowed value: the natural key of a record of type Location. These records are accessibly through the Locations service.
tool (string) Tool.
(fk) Allowed value: the natural key of a record of type EquipmentItem. These records are accessibly through the EquipmentItems service.
startValue (decimal) Start Value.
maxValue (int) Max Value.


MeterValuesResource

The following elements are required:

meter (string) Meter.
assetType (int) Asset Type.
asset (string) Asset.
date (DateTimeOffset) Date.
meterValueKey (int) Meter Value Key.

The following elements are optional:

incrementValue (decimal) Increment Value.
meterReading (decimal) Meter Reading.
remarks (string) Remarks.


MoneyResource

The following elements are required:

amount (decimal) The amount.

The following elements are optional:

baseAmount (decimal) The base amount.
reportingAmount (decimal) The reporting amount.
fractionDigits (int) The fraction digits.
symbol (string) The symbol.

Notes: For the POST operation it is not necessary to send the fields: BaseAmount, ReportingAmount, FractionDigits and Symbol. Will be ignored.



ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.

Enumerations


MeterValueOrigin

1 User
2 Import
3 WorkOrder
4 ParentMeter
5 Replacement


ReportAssetType

1 Location
2 Equipment
3 Tool