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.
Building Data Structure
Following example depicts a data structure of a building located in Dresden, with a couple of connected devices, with dual tariff.
The building ID on MOOST side (is generated when inserting a new building)
customerBuildingId
The building ID on customer side
customerId
The ID of the customer (cannot be set or changed)
zip
Postal code
city
Name of the city
countryCode
registrationTimestamp
Time (Epoch Time in seconds (UTC)) when the building was registered
deactivatedTimestamp
If building has been deregistered, and shall no longer receive notifications, then this attribute is set, and contains Epoch Time in seconds (UTC)
isEarlyAdopter
If building is marked as early adopters, then he/she also receives notifications of rules marked for "Early Adopter" (these are typically new designed rules which shall be tested on a small user (aka building) base.
devices
List of devices. Each device mainly contains following attributes
id,
product_name
settings.tariff
You may add tariff data of a building. If dual or dynamic tariff settings are defined, then MOOST is able to generate additional tariff related events. The tariff sub-structures are explained in table cells below.
Remark: attributes "currency", "minPrice" and "maxPrice" are optional.
Single tariff settings
Dual tariff settings: defines the low-tariff time for a whole week.
Dynamic tariff settings: defines the dynamic tariff slices for the next couple of hours (typically for 1 - 2 days)
Remark: when reading building data, there might be additional attributes set, such as profile or geolocation. These fields are calculated by MOOST and is not to be modified by the customer.
Load Buildings
Example with CURL
# make sure ACCESS_TOKEN is set and valid (see "Request Access Token")curl-XGET"https://api.moost.io/buildings/v1" \-H"Authorization: Bearer $ACCESS_TOKEN"