Synchronize Buildings and Devices

Synchronize Buildings

Make sure all buildings, which shall be taken into consideration by the MOOST Recommender Platform, are synchronized to MOOST. I.e. new buildings shall be created, and changed building states shall be updated (incl. deactivation and reactivation) via MOOST API.

Load Buildings

Example with CURL

# make sure ACCESS_TOKEN is set and valid (see "Request Access Token")
curl -X GET "https://api.moost.io/buildings/v1" \
     -H "Authorization: Bearer $ACCESS_TOKEN"

Load a Building

Example with CURL

curl -X GET "https://api.moost.io/buildings/999000009C54AEDC/v1" \
     -H "Authorization: Bearer $ACCESS_TOKEN"

Add a Building

Example with CURL

curl -X POST "https://api.moost.io/buildings/v1" \
     -H  "Authorization: Bearer $ACCESS_TOKEN" \
     -H  "Content-Type: application/json" \
     -d "{\"customerBuildingId\":\"999000009C54AAAB\",\"customerId\":\"656730be2bc9719e6e5ed51d\",\"zip\":\"8010\",\"city\":\"Graz\",\"countryCode\":\"AT\",\"devices\":[],\"settings\":{\"lowTariffHourSetting\":{\"mondayStartTime\":\"20:00\",\"mondayEndTime\":\"07:00\",\"tuesdayStartTime\":\"20:00\",\"tuesdayEndTime\":\"07:00\",\"wednesdayStartTime\":\"20:00\",\"wednesdayEndTime\":\"07:00\",\"thursdayStartTime\":\"20:00\",\"thursdayEndTime\":\"07:00\",\"fridayStartTime\":\"20:00\",\"fridayEndTime\":\"07:00\",\"saturdayStartTime\":\"13:00\",\"saturdayEndTime\":\"07:00\",\"sundayStartTime\":\"00:00\",\"sundayEndTime\":\"07:00\"}},\"registrationTimestamp\":1549971011,\"customerSubscriptionName\":\"Premium\"}"

Adjust a Building

Example with CURL

curl -X PUT "https://api.moost.io/buildings/v1" \
     -H  "Authorization: Bearer $ACCESS_TOKEN" \
     -H  "Content-Type: application/json" \
     -d "{\"customerBuildingId\":\"999000009C54AAAA\",\"customerId\":\"656730be2bc9719e6e5ed51d\",\"zip\":\"8020\",\"city\":\"Graz\",\"countryCode\":\"AT\",\"devices\":[],\"settings\":{\"lowTariffHourSetting\":{\"mondayStartTime\":\"20:00\",\"mondayEndTime\":\"07:00\",\"tuesdayStartTime\":\"20:00\",\"tuesdayEndTime\":\"07:00\",\"wednesdayStartTime\":\"20:00\",\"wednesdayEndTime\":\"07:00\",\"thursdayStartTime\":\"20:00\",\"thursdayEndTime\":\"07:00\",\"fridayStartTime\":\"20:00\",\"fridayEndTime\":\"07:00\",\"saturdayStartTime\":\"13:00\",\"saturdayEndTime\":\"07:00\",\"sundayStartTime\":\"00:00\",\"sundayEndTime\":\"07:00\"}},\"registrationTimestamp\":1549971011,\"customerSubscriptionName\":\"Premium\"}"

Delete a Building

Example with CURL

curl -X DELETE "https://api.moost.io/buildings/999000009C54AAAB/v1" \
     -H "Authorization: Bearer $ACCESS_TOKEN"

Synchronize Devices of Buildings

Make sure that devices of buildings, which shall be taken into consideration by MOOST Recommender Platform, are synchronized to MOOST via MOOST API.

Remark: it is also possible to manage the devices via the upper mentioned building API's.

Update Devices of a Building

Example with CURL

curl -X PUT "https://api.moost.io/buildings/999000009C54AAAA/devices/v1" \
    -H  "Authorization: Bearer $ACCESS_TOKEN" \
    -H  "Content-Type: application/json"  \
    -d "[{\"id\": \"17306deb97e0f94609f13e22\", \"type\": \"CAR\", \"vendor_name\": \"Device Link Car\", \"product_name\": \"Device Link Car\", \"createdAt\": 1702981099,\"updatedAt\": 1707135597}, {\"id\": \"1730da2d6e14aa3701e65105\", \"type\": \"HEAT_PUMP\", \"vendor_name\": \"SG Ready Switch\", \"product_name\": \"SG Ready Switch\", \"createdAt\": 1665915437,\"updatedAt\": 1707124897}, {\"id\": \"173042c71376cf79c2dc8bde\", \"type\": \"BATTERY\", \"vendor_name\": \"TWICE Hexagon\", \"product_name\": \"TWICE Hexagon\", \"createdAt\": 1697727175,\"updatedAt\": 1707144323}, {\"id\": \"173062ba52ae9f481a010aa9\", \"type\": \"CAR_CHARGER\", \"vendor_name\": \"easee Home\", \"product_name\": \"easee Home\", \"createdAt\": 1617388218,\"updatedAt\": 1707144356}]"

Last updated

© 2023 MOOST AG