Create one meter reading

post

/fscmRestApi/resources/11.13.18.05/meterReadings

Request

Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
  • Unique identifier of an asset. Either the asset number or asset identifier is required for a new reading. When the asset identifier is provided with the meter identifier, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
  • Unique number of an asset. Either the asset number or asset identifier is required for a new reading. When the asset number is provided with the meter code, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
  • Maximum Length: 240
    Comments about a meter reading. If defined, they will be displayed during retrieval of historical readings.
  • Maximum Length: 1
    Default Value: false
    Contains one of the following values: true or false. If true, then the meter reading has been disabled. If false, then the meter reading hasn't been disabled. This attribute doesn't have a default value. This attribute can be passed during update to disable an active reading in history, resulting in the cancelation and recreation of all active readings later in history.
  • Unique identifying code of a meter template definition. Either the meter code or meter ID is required for a new reading. When the meter code is provided with the asset number, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
  • Value that uniquely identifies the asset meter. The meter identifier along with the asset identifier is used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
  • Value that uniquely identifies a meter reading. This attribute is read-only. The value of this attribute is created when a meter reading is created for an asset meter.
  • Abbreviation that uniquely identifies whether the meter reading is created for an asset or for a contract line. Valid values are ORA_ASSET or ORA_CONTRACT_LINE. A list of accepted values is defined in the lookup type ORA_CSE_METER_USAGE_CODE.
  • Maximum Length: 255
    Code that uniquely identifies the work order organization. Either the organization code or the organization identifier Is required when work order details are entered.
  • Value that uniquely identifies the work order organization. Either the organization code or the organization identifier Is required when work order details are entered.
  • Title: Reading Date-Time
    Date and time when the meter reading was taken. It must be less than or equal to the system date and time, greater than the last reading date and time, and is validated against the asset meter active start and end dates.
  • Maximum Length: 30
    Code that identifies the reading type of a meter reading. Valid values include ORA_ABSOLUTE, ORA_CHANGE, or ORA_RESET. A list of accepted values is defined in the lookup type ORA_CSE_READING_TYPE_CODE.
  • Value of a meter reading. For continuous absolute meters, the reading value must be less than, equal to, or greater than the last reading in history. For continuous change meters, the reading value must be greater than or equal to zero. If the meter template has a reading minimum, maximum, or rollover maximum defined, then the reading value must also pass these validations during creation.
  • Maximum Length: 1
    Contains one of the following values: true or false. If true, then the meter reading resulted in a reset of the meter. If false, then the meter reading did not result in a reset of the meter. The default value is false. This attribute is read-only. When creating the reading, if the reading type code is ORA_RESET, then this attribute will be automatically set to true.
  • Maximum Length: 1
    Contains one of the following values: true or false. If true, then the meter reading resulted in a rollover of the meter. If false, then the meter reading didn't result in a rollover of the meter. The default value is false. For continuous absolute ascending meters, passing a value of true will relax the validations that the reading value must be less than, equal to, or greater than the last reading in history.
  • Unique identifier of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
  • Maximum Length: 255
    Name of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : meterReadings-item-response
Type: object
Show Source
  • Read Only: true
    Maximum Length: 240
    Description of the asset.
  • Unique identifier of an asset. Either the asset number or asset identifier is required for a new reading. When the asset identifier is provided with the meter identifier, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
  • Unique number of an asset. Either the asset number or asset identifier is required for a new reading. When the asset number is provided with the meter code, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
  • Maximum Length: 240
    Comments about a meter reading. If defined, they will be displayed during retrieval of historical readings.
  • Read Only: true
    Maximum Length: 64
    User who created the meter reading record. The application automatically sets this value during creation. This attribute is read-only.
  • Read Only: true
    Date when the meter reading record. The application automatically sets this value during creation. This attribute is read-only.
  • Maximum Length: 1
    Default Value: false
    Contains one of the following values: true or false. If true, then the meter reading has been disabled. If false, then the meter reading hasn't been disabled. This attribute doesn't have a default value. This attribute can be passed during update to disable an active reading in history, resulting in the cancelation and recreation of all active readings later in history.
  • Read Only: true
    Value that's indicated on a physical or electronic meter. This value is the same as the Life-to-Date Reading value up until the point that a meter is reset or encounters a rollover event. For a change meter, this value is calculated by adding the current net change value to the previous displayed reading value. For an absolute meter, this value is always the same as the reading value. This attribute is read-only.
  • Read Only: true
    Maximum Length: 1
    Contains one of the following values: true or false. If true, then the meter reading was created and an initial reading occurred. If false, then an initial reading didn't occur. This attribute doesn't have a default value. This attribute is read-only.
  • Read Only: true
    Date when the user most recently updated the meter reading record. The application automatically sets this value during creation. This attribute is read-only.
  • Read Only: true
    Maximum Length: 64
    User who most recently updated the meter reading record. The application assigns a value to this attribute during creation. This attribute is read-only.
  • Read Only: true
    Maximum Length: 32
    Session login of the user who most recently updated the meter reading record. The application assigns a value to this attribute during creation. This attribute is read-only.
  • Links
  • Unique identifying code of a meter template definition. Either the meter code or meter ID is required for a new reading. When the meter code is provided with the asset number, it's used to identify an individual asset meter and record a new meter reading. Alternatively, the meter identifier and asset identifier may be used to identify an individual asset meter and record a new meter reading.
  • Title: Meter Definition ID
    Read Only: true
    Value that uniquely identifies a meter template. The value is saved during reading creation as additional reference to the meter code or id that is passed. This attribute is read-only.
  • Value that uniquely identifies the asset meter. The meter identifier along with the asset identifier is used to identify an individual asset meter and record a new meter reading. Alternatively, the meter code and asset number may be used to identify an individual asset meter and record a new meter reading.
  • Title: Meter Name
    Read Only: true
    Maximum Length: 120
    Name of a meter template definition. This is a read-only attribute.
  • Value that uniquely identifies a meter reading. This attribute is read-only. The value of this attribute is created when a meter reading is created for an asset meter.
  • Abbreviation that uniquely identifies whether the meter reading is created for an asset or for a contract line. Valid values are ORA_ASSET or ORA_CONTRACT_LINE. A list of accepted values is defined in the lookup type ORA_CSE_METER_USAGE_CODE.
  • Read Only: true
    Maximum Length: 1
    Contains one of the following values: true or false. If true, then the meter reading has been modified. If false, then the meter reading hasn't been modified. This attribute doesn't have a default value. This attribute is read-only.
  • Read Only: true
    Value that represents the cumulative reading value for an asset meter, irrespective of Reset or Rollover events, over time. It is incremented by the recording new meter readings. This attribute is read-only.
  • Maximum Length: 255
    Code that uniquely identifies the work order organization. Either the organization code or the organization identifier Is required when work order details are entered.
  • Value that uniquely identifies the work order organization. Either the organization code or the organization identifier Is required when work order details are entered.
  • Read Only: true
    Unique identifier of the subscription product.
  • Title: Product Name
    Read Only: true
    Maximum Length: 300
    Name of the subscription product.
  • Title: Product Number
    Read Only: true
    Maximum Length: 300
    Subscription product number.
  • Title: Reading Date-Time
    Date and time when the meter reading was taken. It must be less than or equal to the system date and time, greater than the last reading date and time, and is validated against the asset meter active start and end dates.
  • Read Only: true
    Value for the difference between the current and last Displayed Reading values for a meter. This attribute is read-only.
  • Maximum Length: 30
    Code that identifies the reading type of a meter reading. Valid values include ORA_ABSOLUTE, ORA_CHANGE, or ORA_RESET. A list of accepted values is defined in the lookup type ORA_CSE_READING_TYPE_CODE.
  • Value of a meter reading. For continuous absolute meters, the reading value must be less than, equal to, or greater than the last reading in history. For continuous change meters, the reading value must be greater than or equal to zero. If the meter template has a reading minimum, maximum, or rollover maximum defined, then the reading value must also pass these validations during creation.
  • Read Only: true
    Value that references the meter reading that was canceled and used as the source for creating the contextual reading, based on the disabling of another reading earlier in history. This attribute is read-only.
  • Maximum Length: 1
    Contains one of the following values: true or false. If true, then the meter reading resulted in a reset of the meter. If false, then the meter reading did not result in a reset of the meter. The default value is false. This attribute is read-only. When creating the reading, if the reading type code is ORA_RESET, then this attribute will be automatically set to true.
  • Maximum Length: 1
    Contains one of the following values: true or false. If true, then the meter reading resulted in a rollover of the meter. If false, then the meter reading didn't result in a rollover of the meter. The default value is false. For continuous absolute ascending meters, passing a value of true will relax the validations that the reading value must be less than, equal to, or greater than the last reading in history.
  • Title: Subscription Product Number
    Read Only: true
    Maximum Length: 120
    Value that uniquely identifies the subscription product.
  • Unique identifier of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
  • Maximum Length: 255
    Name of the maintenance work order from which the meter reading was recorded. This is an optional attribute. User can pass the work order identifier or work order number.
Back to Top

Examples

These examples describe how to create meter readings.

Example cURL Command

Use this cURL command to submit a request on the REST resource.

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
servername/fscmRestApi/resources/version/meterReadings"

Example 1 Request Body

This example describes how to create a meter reading using the asset number and meter code references. It includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.

{
"AssetNumber": "F0554-02",
"MeterCode": "0554 HOURS",
"ReadingDate": "2018-03-14T16:27:00-07:00",
"ReadingTypeCode": "ORA_ABSOLUTE",
"MeterUsageCode": "ORA_ASSET",
"ReadingValue": 1108.12,
"Comments": "24ndsept Reading-108.12"
}

Example 1 Response Body

This example includes the contents of the response body in JSON format:

{
    "MeterReadingId": 300100141425958,
    "ReadingValue": 1108.12,
    "ReadingDate": "2018-03-14T23:27:00+00:00",
    "ReadingTypeCode": "ORA_ABSOLUTE",
    "ReadingNetChange": 1000,
    "DisplayedValue": 1000,
    "NetValue": 1108.12,
    "Comments": "24ndsept Reading-108.12",
    "RolloverFlag": false,
    "ResetFlag": false,
    "ModifiedFlag": null,
    "InitialFlag": null,
    "DisabledFlag": null,
    "ReferenceReadingId": null,
    "MeterDefinitionId": null,
    "MeterCode": "ODOMETER",
    "MeterId": 300100141395129,
    "MeterUsageCode": "ORA_ASSET",
    "AssetNumber": null,
    "AssetId": null
    "ProductName": null,
    "ProductNumber": null,
    "SubscriptionProductPuid": null,
    "OssSubscriptionProductId": null,
    "MeterName": "Odometer",
    "CreatedBy": "USER",
    "CreationDate": "2020-01-23T12:16:41+00:00",
    "LastUpdateDate": "2020-01-23T12:16:41+00:00",
    "LastUpdatedBy": "USER",
    "LastUpdateLogin": "C8D60D1E5371AF3E7C7E9DDF571B81C0",
    "AssetDescription": null,
    "WorkOrderId": null,
    "WorkOrderNumber": null,
    "OrganizationId": null,
    "OrganizationCode": null,	
}

Example 2 Request Body

This example describes how to create a meter reading using the asset ID and meter ID references. It includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.

{
"AssetId": 300100117993592,
"MeterId": "300100141395129",
"ReadingDate": "2018-03-14T16:30:00-07:00",
"ReadingTypeCode": "ORA_ABSOLUTE",
"MeterUsageCode": "ORA_ASSET",
"ReadingValue": 1208.12,
"Comments": "24ndsept Reading-108.12"
}

Example 2 Response Body

This example includes the contents of the response body in JSON format:

{
    "MeterReadingId": 300100141428011,
    "ReadingValue": 1208.12,
    "ReadingDate": "2018-03-14T23:30:00+00:00",
    "ReadingTypeCode": "ORA_ABSOLUTE",
	"ReadingNetChange": 1000,
	"DisplayedValue": 1000,
    "NetValue": 1208.12,
    "Comments": "24ndsept Reading-108.12",
    "RolloverFlag": false,
    "ResetFlag": false,
    "ModifiedFlag": null,
    "InitialFlag": null,
    "DisabledFlag": null,
	"ReferenceReadingId": null,
    "MeterDefinitionId": null,
    "MeterCode": "ODOMETER",
    "MeterId": 300100141395129,
    "MeterUsageCode": "ORA_ASSET",
    "AssetNumber": null,
    "AssetId": null
	"ProductName": null,
	"ProductNumber": null,
    "SubscriptionProductPuid": null,
    "OssSubscriptionProductId": null,
    "MeterName": "Odometer",
    "CreatedBy": "USER",
    "CreationDate": "2020-01-23T12:16:41+00:00",
    "LastUpdateDate": "2020-01-23T12:16:41+00:00",
    "LastUpdatedBy": "USER",
    "LastUpdateLogin": "C8D60D1E5371AF3E7C7E9DDF571B81C0",
    "AssetDescription": null,
    "WorkOrderId": null,
    "WorkOrderNumber": null,
    "OrganizationId": null,
    "OrganizationCode": null,
}

Example 3 Request Body

This example describes how to create a meter reading using only the unique meter ID. It includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.

{
	"MeterId": 789789898,
	"ReadingDate": "2020-11-02",
	"ReadingTypeCode": "ORA_ABSOLUTE",
	"MeterUsageCode": "ORA_CONTRACT_LINE",
	"ReadingValue": 20,
	"Comments": null
}

Example 3 Response Body

This example includes the contents of the response body in JSON format:

{
	"MeterReadingId": 123456789,
	"ReadingValue": 20,
	"ReadingDate": "2020-11-02T00:00:00+00:00",
	"ReadingTypeCode": "ORA_ABSOLUTE",
	"ReadingNetChange": 1000,
	"DisplayedValue": 1000,
	"NetValue": 1015,
	"Comments": null,
	"RolloverFlag": false,
	"ResetFlag": false,
	"ModifiedFlag": null,
	"InitialFlag": null,
	"DisabledFlag": null,
	"ReferenceReadingId": null,
	"MeterDefinitionId": null,
	"MeterCode": "ODOMETER",
	"MeterId": 789789898,
	"MeterUsageCode": "ORA_CONTRACT_LINE",
	"AssetNumber": null,
	"AssetId": null,
	"ProductName": null,
	"ProductNumber": null,
    "SubscriptionProductPuid": null,
    "OssSubscriptionProductId": null,
    "MeterName": "Odometer",
    "CreatedBy": "USER",
    "CreationDate": "2020-01-23T12:16:41+00:00",
    "LastUpdateDate": "2020-01-23T12:16:41+00:00",
    "LastUpdatedBy": "USER",
    "LastUpdateLogin": "C8D60D1E5371AF3E7C7E9DDF571B81C0",
    "AssetDescription": null,
    "WorkOrderId": null,
    "WorkOrderNumber": null,
    "OrganizationId": null,
    "OrganizationCode": null,
}

Example 4 Request Body

This example describes how to create a reset meter reading using the asset number and meter code. It includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.

{
	"AssetNumber": "ALM_WO_METER_1",
	"MeterCode": "METER_TEMP_CODE_ABS_ASC_1",
	"ReadingDate": "2021-02-05T12:00:00+00:00",
	"ReadingTypeCode": "ORA_RESET",
	"MeterUsageCode": "ORA_ASSET",
	"Comments": null
}

Example 4 Response Body

This example includes the contents of the response body in JSON format:

{
   "MeterReadingId": 300100544973893,
   "ReadingValue": 0,
   "ReadingDate": "2021-02-05T12:00:00+00:00",
   "ReadingTypeCode": "ORA_RESET",
   "ReadingNetChange": -1000,
   "DisplayedValue": 0,
   "NetValue": 17,
   "Comments": null,
   "RolloverFlag": false,
   "ResetFlag": true,
   "ModifiedFlag": null,
   "InitialFlag": null,
   "DisabledFlag": false,
   "MeterDefinitionId": null,
   "MeterCode": "ODOMETER",
   "ReferenceReadingId": null,
   "MeterId": 300100544697266,
   "MeterUsageCode": "ORA_ASSET",
   "AssetNumber": null,
   "AssetId": null,
   "ProductName": null,
	"ProductNumber": null,
    "SubscriptionProductPuid": null,
    "OssSubscriptionProductId": null,
    "MeterName": "Odometer",
    "CreatedBy": "USER",
    "CreationDate": "2020-01-23T12:16:41+00:00",
    "LastUpdateDate": "2020-01-23T12:16:41+00:00",
    "LastUpdatedBy": "USER",
    "LastUpdateLogin": "C8D60D1E5371AF3E7C7E9DDF571B81C0",
    "AssetDescription": null,
    "WorkOrderId": null,
    "WorkOrderNumber": null,
    "OrganizationId": null,
    "OrganizationCode": null,
}
Back to Top