POST
/
api
/
v1
/
properties
/
{property_id}
/
meter-readings
Bulk upsert property meter readings
curl --request POST \
  --url http://127.0.0.1:8080/api/v1/properties/{property_id}/meter-readings \
  --header 'Content-Type: application/json' \
  --data '
{
  "period": "<string>",
  "readings": [
    {
      "room_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "electricity_previous": 123,
      "electricity_current": 123,
      "water_previous": 123,
      "water_current": 123
    }
  ]
}
'
{
  "upserted_count": 1,
  "meter_readings": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "property_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "room_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "period": "<string>",
      "recorded_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "electricity_previous": 123,
      "electricity_current": 123,
      "water_previous": 123,
      "water_current": 123,
      "recorded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}

Path Parameters

property_id
string<uuid>
required

Property ID

Body

application/json
period
string
required
readings
object[]
required

Response

200 - application/json

Bulk upserted meter readings

upserted_count
integer
required
Required range: x >= 0
meter_readings
object[]
required