Authentication
API key and domain ID:
- API key can be copied from your Moderan account > Admin > Integrations > API tokens
- Domain ID can be copied from your Moderan account > Admin > Company info
Every request should have 2 HTTP headers:
- Content-Type: application / json
- Authorization: yourApiTokenPunkt1
Readings Database API
To send Readings data to Moderan via API:
1. Get the name of the Property/Building you want to send an example Reading data for. To do this,
- Make a GET query to the URL https://www.moderan.net/api/domains/DOMEENI_ID/properties/0/distributionsets
- You will receive a list of sets to which an example can be sent.
2. To send the example Reading data, make a POST request to the URL https://www.moderan.net/api/domains/DOMENEN_ID/readingdumps
Send content to JSON, example:
{ "date" : "2019-06-17", "meter" : "shared", "set" : { "id" : 61 } , "reading" : 3 }
Fields: date - the date of the meter Reading meter - the name of the Meter set - object, the ID of which you can get from point 2 above Reading - example reading data