Sending Meter Readings
Meter readings can be sent to Hausing via the REST API. Below is a step-by-step guide.
Prerequisites
Section titled “Prerequisites”- Client ID and Client Secret — please contact support to obtain these
- Company ID — provided with Client ID and Client Secret by Hausing Support
- Basic knowledge of APIs
- See Authentication and Error Handling
Overview
Section titled “Overview”POST /v1/buildings/{buildingId}/meter-readingsGET /v1/buildings/{buildingId}/meter-readingsPUT /v1/buildings/{buildingId}/meters/{meterId}/meter-readings/{id}
Prerequisites
Section titled “Prerequisites”- Building ID — ID of the building where meters reside. You can find the ID via the get all buildings endpoint.
- Authentication token — refer to the Authentication guide.
Step 1. Open meter readings for desired period
Section titled “Step 1. Open meter readings for desired period”To start sending meter readings for a period, a meter readings card needs to be created. Use POST /v1/buildings/{buildingId}/meter-readings. The Building ID can be found from the UI or via the API.
See the Buildings API reference for full request documentation.
Step 2. Fetch all meter readings for the period
Section titled “Step 2. Fetch all meter readings for the period”Use GET /v1/buildings/{buildingId}/meter-readings to get all meter readings for the period. Use the same building ID as before. Use the period filter to get only relevant readings.
See the Buildings API reference for full request documentation.
Step 3. Save new reading for every meter in the period
Section titled “Step 3. Save new reading for every meter in the period”Iterate over the results of the previous request and update the reading for every meter. Use PUT /v1/buildings/{buildingId}/meters/{meterId}/meter-readings/{id} to save each reading.
Parameters:
buildingId— same as beforemeterId— Meter ID, from the result of step 2 (data[].meter.id)id— Meter reading ID, from the result of step 2 (data[].id)
See the Buildings API reference for full request documentation.