WebAPI - Creating a meter

WebAPI - Creating a meter

This method allows to create a meter in a simplified manner.

The method to be used when creating a meter:

 POST url/api/mytenant/myorganization/assetmanagementcore/meters

 Json example for creating a meter:

 

1.       {

        "meterKey""001",

        "description""Contador de água",

        "unitCost": {

            "amount"250.000000,

            "baseAmount"250.000000,

            "reportingAmount"250.000000,

            "fractionDigits"2,

            "symbol""€"

        },

        "slidingWindowSize"30,

        "startValue"123.750000,

        "startValueDecimalPlaces"2,

        "maxValue"999999,

        "remarks"null,

        "serial"null,

        "meterType"1,

        "unit""LT",

        "locationFunction"null,

        "family"null,

        "brand"null,

        "brandModel"null,

        "assetType"1,

        "location""ED01",

        "equipment"null,

        "tool"null,

        "parentMeter"null,

        "currency""EUR",

        "averageCalculationMethod"1,

        "company""DEMO"

    }


This method allows to create a meter according to the parameters filled in:


  1. MetertKey: The meter's key. If this parameter is not filled in, it assumes the defined sequential number. 
  2. Description: Short description of the meter. This field is mandatory.
  3. UnitCost: Unitary cost value.
  4. SlidingWindowSize: Moving window size.
  5. StartValue: Start value.
  6. StartValueDecimalPlaces: Decimal places value.
  7. MaxValue: Maximum value.
  8. Remarks: Remarks.
  9. Serial: Meter serial number.
  10. MeterType: Type of meter. (1- Reading meter type. 2- Increment meter type.) Mandatory field.
  11. Unit: Meter unit. Mandatory field.
  12. LocationFunction: The key of the location function. 
  13. Family: The family's key.
  14. Brand: The brand's key.
  15. BrandModel: The model's key.
  16. AssetType: Asset type. (1-location; 2- equipment; 3- tool).
  17. Location: The location's key.
  18. Equipment: The equipment key.
  19. Tool: The tool's key.
  20. ParentMeter: The parent meter key.
  21. Currency: The currency's key.
  22. AverageCalculationMethod: Average calculation method. (0 - none; 1- moving average days; 2- moving average reading; 3- global).
  23. Company: The company's key.

When this method is executed successfully, it returns HttpStatusCode.OK.




    • Related Articles

    • WebAPI - Creating a warehouse

      This method allows to create a warehouse in a simplified manner. The method to be used when creating a warehouse: POST url/api/mytenant/myorganization/inventorycore/warehouses Json example for creating a warehouse: 1. { "warehouseKey": "W2", ...
    • WebAPI - Creating a request

      This method allows to create a request in a simplified manner. The method to be used when creating a request: POST url/api/mytenant/myorganization/Requests/requests Json example for creating a request: { "requestKey": "00001", "description": "Vidro ...
    • WebAPI - Creating a meter reading

      This method allows to create a meter reading in a simplified manner. The method to be used when creating a meter reading: POST url/api/mytenant/myorganization/assetmanagement/meterValues Json example for creating a meter reading:     { ...
    • WebAPI - Creating a requisition type

      This method allows creating a type of requisition in a simplified manner. The method to be used to create a requisition type is: POST url/api/mytenant/myorganization/requisitionscore/requisitiontypes Json example for creating a type of requisition:  ...
    • WebAPI - Creating a tool

      This method allows to create a tool in a simplified manner. The method to be used when creating a tool is: POST url/api/mytenant/myorganization/assetmanagementcore/equipmentItems Json example for creating a tool: 1.     {     "equipmentKey": "PCR", ...