POST api/meterreadings/submit

Inserts or updates Meter Readings (based on Power Service Numbers or Serial Numbers)

Request Information

URI Parameters

None.

Body Parameters

Collection of MeterReading
NameDescriptionTypeAdditional information
ServiceNumber

Power company service number for the meter

string

None.

MeterSerialNum

Unique user defined name or description for the meter

string

None.

ReadingDate

The date that the reading was taken

date

Required

Reading

Meter reading value - The units of measure for Reading are dependent on the meter being submitted, identified by the identifier column. Units of measure don’t change for a given meter.Flow meters are typically measured in Acre Feet, electronic meters are in KWH.To be sure of your meter’s units of measure, check the setup for the account in the Online Data Submittal web application.

decimal number

Required

Request Formats

application/json, text/json

Sample:
[
  {
    "ServiceNumber": "sample string 1",
    "MeterSerialNum": "sample string 2",
    "ReadingDate": "2020-09-25T08:05:22.6264115-06:00",
    "Reading": 4.0
  },
  {
    "ServiceNumber": "sample string 1",
    "MeterSerialNum": "sample string 2",
    "ReadingDate": "2020-09-25T08:05:22.6264115-06:00",
    "Reading": 4.0
  }
]

application/xml, text/xml

Sample:
<ArrayOfMeterReading xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <MeterReading>
    <MeterSerialNum>sample string 2</MeterSerialNum>
    <Reading>4</Reading>
    <ReadingDate>2020-09-25T08:05:22.6264115-06:00</ReadingDate>
    <ServiceNumber>sample string 1</ServiceNumber>
  </MeterReading>
  <MeterReading>
    <MeterSerialNum>sample string 2</MeterSerialNum>
    <Reading>4</Reading>
    <ReadingDate>2020-09-25T08:05:22.6264115-06:00</ReadingDate>
    <ServiceNumber>sample string 1</ServiceNumber>
  </MeterReading>
</ArrayOfMeterReading>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Possible errors

  • Token is not passed in:
    • 401 unauthorized; "Must authenticate and pass in valid token to..."
  • No values passed in, or invalid fields in POST:
    • 400 bad request; "Invalid {itemType} in request body"
  • Submitted meter reading number of digits > allowed number:
    • 200 OK; Error object containing "Too many digits in Meter Reading"
  • Reading date > today:
    • 200 OK; Error object containing "Reading Date cannot be after the current date"
  • Invalid power service num:
    • 200 OK; Error object containing "Power Company Service Number does not exist or is not active for the given reading date"
  • Power service num and meter serial number are not valid together:
    • 200 OK; Error object containing "Power Service Number / Meter Serial number provided do not match DWR database"
  • Invalid or inactive meter serial num without power service num:
    • 200 OK; Error object containing "Meter Serial Number does not exist or is not active for the given reading date"
  • Account not set to report on meter/service number:
    • 200 OK; Error object containing "Account does not have permissions to submit data..."
  • Reading contains a decimal for a meter that doesn't allow decimals:
    • 200 OK; Error object containing "Meter Reading cannot contain a decimal..."
  • Reading date more than 90 days before reporting year for meter:
    • 200 OK; Error object containing "Reading Date cannot be more than 90 days prior to the current reporting year"
  • Reading digits > allowed digits for meter:
    • 200 OK; Error object containing "Too many digits in Meter Reading (should have been <=..."
  • Approved reading already exists for given date:
    • 200 OK; Error object containing "Approved meter reading already exists for this date, cannot overwrite approved value"
  • Reading conflicts with existing reading in some other way:
    • 200 OK; Error object containing "Meter reading conflicts with existing meter reading"
  • Other unforeseen error:
    • 500 internal server error; "Please contact DWR and let them know there is an issue"
;

Resource Description

Collection of ErrorOfMeterReading
NameDescriptionTypeAdditional information
Object

MeterReading

None.

Errors

Collection of string

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.