LogoLogo
  • Welcome to the MOOST platform user manual
  • Platform Manual
    • Login
      • Forgot Password
    • Notifications
    • Rules
      • Rule Configurator
        • Data graph
        • Datasets
        • Condition
        • Streak
        • Message
        • Settings
        • Rule Simulator
        • Early Adopter
        • Command
      • Rule Language
        • Syntax
        • Data Types
        • Data Structures
        • Functions
          • AVG
          • COUNT
          • DISTINCT
          • EVAL
          • FILTER
          • GROUP_BY_DEVICE
          • GROUP_BY_TIME
          • MAX
          • MIN
          • POSITION
          • REVERSE
          • SORT
          • SUBSET
          • SUM
        • Operations
          • Plus
          • Minus
          • Multiply
          • Divide
          • Negate
          • Less Than
          • Less or Equal
          • Equal
          • Not Equal
          • Greater or Equal
          • Greater
          • AND
          • OR
          • NOT
          • Format
          • Attribute Accessor
        • Examples
    • Events
    • Buildings
      • Household Profile
    • User Profile
    • Billing Portal
      • Payment Method
      • Update Payment Address
      • Invoices
      • Terminate Subscription
    • Context Services
      • Weather Forecast
      • Solar Production Forecast
      • Power Consumption Forecast
      • Power Generation Forecast
    • Support Center
  • Technical Integration
    • Cloud-to-Cloud Integration
      • Platform On-boarding
      • Configure Notification Settings
        • Receive Notifications
          • iOS Notification Handling
      • MOOST API Integration
        • Request Access Token
        • Synchronize Buildings and Devices
          • Device Types
        • Add Events
          • Event Types
            • Device Status
            • Charging Modes
            • Switch State
        • Notifications and Interactions
          • Return Notification Interaction
  • Best Practices
    • FAQ
    • User Acceptance Testing
  • Policies
    • Security Policy
    • Privacy Policy
Powered by GitBook

© 2025 MOOST AG

On this page
Export as PDF
  1. Technical Integration
  2. Cloud-to-Cloud Integration
  3. MOOST API Integration

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.

Building Data Structure

Following example depicts a data structure of a building located in Dresden, with a couple of connected devices, with dual tariff.

{
  "id": "66d07a7fd51e3528aa5673ba",
  "customerId": "656730be2bc9719e6e5ed51d",
  "customerBuildingId": "99900000C048ADA6",
  "zip": "01067",
  "city": "Dresden",
  "countryCode": "DE",
  "timeZoneId": "Europe/Berlin",
  "geolocation": {
    "lat": 47.2383918762207,
    "lon": 8.284913063049316
  },
  "registrationTimestamp": 1645630735,
  "activationTimestamp": 1645640000,
  "isEarlyAdopter": false,
  "userIds": [
    "user2547865"
  ],
  "disabledNotifications": [
    {
      "ruleId": "63fb7ac54978916150dc5572",
      "userId": "user2547865"
    }
  ],
  "inactiveRules": [],
  "devices": [
    {
      "id": "656830efc4515778b1ce4f2f",
      "type": "CAR",
      "name": "John's Car",
      "product_name": "Device Link Car",
      "createdAt": 1701327087,
      "updatedAt": 1724896211,
    },
    {
      "id": "621660e410c1012648d7bed2",
      "type": "CAR_CHARGER",
      "name": "easee Home",
      "product_name": "easee Home",
      "createdAt": 1645633761,
      "updatedAt": 1724936865
    }
  ],
  "settings": {
    "tariff": {
      "type": "DUAL",
      "minPrice": "0.296",
      "maxPrice": "0.385",
      "currency": "EUR",
      "dual": {
        "lowTariff": {
          "mondayStartTime": "19:00",
          "mondayEndTime": "07:00",
          "tuesdayStartTime": "19:00",
          "tuesdayEndTime": "07:00",
          "wednesdayStartTime": "19:00",
          "wednesdayEndTime": "07:00",
          "thursdayStartTime": "19:00",
          "thursdayEndTime": "07:00",
          "fridayStartTime": "19:00",
          "fridayEndTime": "07:00",
          "saturdayStartTime": "00:00",
          "saturdayEndTime": "07:00",
          "sundayStartTime": "00:00",
          "sundayEndTime": "07:00"
        }
      }
    }
  },
  "properties": {}
}

Data Structure Attributes

Attribute Name
Description

id

The building ID on MOOST side (is generated when inserting a new building)

customerId

The ID of the customer (cannot be set or changed)

customerBuildingId

The building ID on customer side

zip

Postal code

city

Name of the city

countryCode

timeZoneId

geolocation

The geo location of the building.

This is automatically added by MOOST if not provided.

registrationTimestamp

Time (Epoch Time in seconds (UTC)) when the building was registered on customer side.

activationTimestamp

Time (Epoch Time in seconds (UTC)) when the building was added to MOOST Recommender Platform. This time is automatically added by MOOST when inserting a new building.

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

userIds

A list of users may be attached to a building.

If present, push notifications can be can be disabled for individual users instead of for the entire building.

disabledNotifications

If userIds are attached to the building, this attribute may contain a list of disabled rules for a set us users,

inactiveRules

This attribute contains a list of disabled rules for this building.

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, and are "per kWh" based.

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 -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}]"
PreviousRequest Access TokenNextDevice Types

Last updated 1 month ago

Country Code,

The time zone id of the building, This is automatically added by MOOST if not provided (and if provided, it would be verified).

type (see )

"settings": {
    "tariff": {
      "type": "SINGLE",
      "minPrice": "34.95",
      "maxPrice": "34.95",
      "currency": "CHF"
    }
  }
"settings": {
    "tariff": {
      "type": "DUAL",
      "minPrice": "0.296",
      "maxPrice": "0.385",
      "currency": "EUR",
      "dual": {
        "lowTariff": {
          "mondayStartTime": "19:00",
          "mondayEndTime": "07:00",
          "tuesdayStartTime": "19:00",
          "tuesdayEndTime": "07:00",
          "wednesdayStartTime": "19:00",
          "wednesdayEndTime": "07:00",
          "thursdayStartTime": "19:00",
          "thursdayEndTime": "07:00",
          "fridayStartTime": "19:00",
          "fridayEndTime": "07:00",
          "saturdayStartTime": "00:00",
          "saturdayEndTime": "07:00",
          "sundayStartTime": "00:00",
          "sundayEndTime": "07:00"
        }
      }
     "dynamic": {
        "tariffs": [
          {
            "price": "0.1546",
            "from": 1732212000,
            "to": 1732212900
          },
          {
            "price": "0.1546",
            "from": 1732212900,
            "to": 1732213800
          },
          {
            "price": "0.1546",
            "from": 1732213800,
            "to": 1732214700
          },
          ...
        ]
      }
    }
  }
Device Types
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
https://en.wikipedia.org/wiki/ISO_6709

Get all buildings

get
Authorizations
Query parameters
activeOnlybooleanOptionalDefault: false
Responses
200
OK
application/json
get
GET /buildings/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Accept: */*
200

OK

[
  {
    "rulesOperatorExclude": true,
    "id": "text",
    "customerBuildingId": "text",
    "customerId": "text",
    "zip": "text",
    "city": "text",
    "countryCode": "text",
    "devices": [
      {
        "id": "text",
        "type": "APPLIANCE",
        "vendor_name": "text",
        "name": "text",
        "product_name": "text",
        "metadata": "text",
        "createdAt": 1,
        "updatedAt": 1,
        "soc": 1,
        "chargingTargetSoc": 1,
        "chargingTargetSocTimestamp": 1,
        "chargingMode": 1,
        "capacity": 1
      }
    ],
    "settings": {
      "tariff": {
        "type": "SINGLE",
        "minPrice": 1,
        "maxPrice": 1,
        "currency": "text",
        "dual": {
          "lowTariff": {
            "mondayStartTime": "text",
            "mondayEndTime": "text",
            "tuesdayStartTime": "text",
            "tuesdayEndTime": "text",
            "wednesdayStartTime": "text",
            "wednesdayEndTime": "text",
            "thursdayStartTime": "text",
            "thursdayEndTime": "text",
            "fridayStartTime": "text",
            "fridayEndTime": "text",
            "saturdayStartTime": "text",
            "saturdayEndTime": "text",
            "sundayStartTime": "text",
            "sundayEndTime": "text"
          }
        },
        "dynamic": {
          "tariffs": [
            {
              "price": 1,
              "from": 1,
              "to": 1
            }
          ]
        }
      }
    },
    "geolocation": {
      "lat": 1,
      "lon": 1
    },
    "timeZoneId": "text",
    "rulesOperator": "INCLUDE",
    "inactiveRules": [
      "text"
    ],
    "activeRules": [
      "text"
    ],
    "deactivatedTimestamp": 1,
    "activationTimestamp": 1,
    "registrationTimestamp": 1,
    "customerSubscriptionName": "text",
    "isEarlyAdopter": true,
    "profile": {
      "multiPersonScore": 1,
      "ecologicalScore": 1,
      "economicalScore": 1,
      "selfSufficiencyScore": 1,
      "commercialBuildingScore": 1,
      "gridPowerConsumptionClusterId": 1,
      "consumptionCategory": "HIGH"
    },
    "properties": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "userIds": [
      "text"
    ],
    "disabledNotifications": [
      {
        "ruleId": "text",
        "userId": "text"
      }
    ]
  }
]

Get a building

get
Authorizations
Path parameters
customerBuildingIdstringRequired

Select specified building.

Pattern: ^[a-zA-Z0-9:._-]{1,100}$
Responses
200
OK
application/json
get
GET /buildings/{customerBuildingId}/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Accept: */*
200

OK

{
  "rulesOperatorExclude": true,
  "id": "text",
  "customerBuildingId": "text",
  "customerId": "text",
  "zip": "text",
  "city": "text",
  "countryCode": "text",
  "devices": [
    {
      "id": "text",
      "type": "APPLIANCE",
      "vendor_name": "text",
      "name": "text",
      "product_name": "text",
      "metadata": "text",
      "createdAt": 1,
      "updatedAt": 1,
      "soc": 1,
      "chargingTargetSoc": 1,
      "chargingTargetSocTimestamp": 1,
      "chargingMode": 1,
      "capacity": 1
    }
  ],
  "settings": {
    "tariff": {
      "type": "SINGLE",
      "minPrice": 1,
      "maxPrice": 1,
      "currency": "text",
      "dual": {
        "lowTariff": {
          "mondayStartTime": "text",
          "mondayEndTime": "text",
          "tuesdayStartTime": "text",
          "tuesdayEndTime": "text",
          "wednesdayStartTime": "text",
          "wednesdayEndTime": "text",
          "thursdayStartTime": "text",
          "thursdayEndTime": "text",
          "fridayStartTime": "text",
          "fridayEndTime": "text",
          "saturdayStartTime": "text",
          "saturdayEndTime": "text",
          "sundayStartTime": "text",
          "sundayEndTime": "text"
        }
      },
      "dynamic": {
        "tariffs": [
          {
            "price": 1,
            "from": 1,
            "to": 1
          }
        ]
      }
    }
  },
  "geolocation": {
    "lat": 1,
    "lon": 1
  },
  "timeZoneId": "text",
  "rulesOperator": "INCLUDE",
  "inactiveRules": [
    "text"
  ],
  "activeRules": [
    "text"
  ],
  "deactivatedTimestamp": 1,
  "activationTimestamp": 1,
  "registrationTimestamp": 1,
  "customerSubscriptionName": "text",
  "isEarlyAdopter": true,
  "profile": {
    "multiPersonScore": 1,
    "ecologicalScore": 1,
    "economicalScore": 1,
    "selfSufficiencyScore": 1,
    "commercialBuildingScore": 1,
    "gridPowerConsumptionClusterId": 1,
    "consumptionCategory": "HIGH"
  },
  "properties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "userIds": [
    "text"
  ],
  "disabledNotifications": [
    {
      "ruleId": "text",
      "userId": "text"
    }
  ]
}

Delete a building

delete
Authorizations
Path parameters
customerBuildingIdstringRequired

Delete specified building.

Responses
200
Success. Building deleted.
404
Building could not be found.
delete
DELETE /buildings/{customerBuildingId}/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Accept: */*

No content

  • Synchronize Buildings
  • Building Data Structure
  • Load Buildings
  • GETGet all buildings
  • Load a Building
  • GETGet a building
  • Add a Building
  • POSTCreate a building
  • Adjust a Building
  • PUTUpdate a building
  • Delete a Building
  • DELETEDelete a building
  • Synchronize Devices of Buildings
  • Update Devices of a Building
  • PUTAttach a set of devices to a building

Create a building

post

Creates a new building. When in EXCLUDE mode and no activeRules are provided it will add all existing rules of the customer to the activeRules of the building.

Authorizations
Body
rulesOperatorExcludebooleanOptional
idstringOptional
customerBuildingIdstringRequiredPattern: ^[a-zA-Z0-9:._-]{1,100}$
customerIdstringRequiredPattern: ^[a-zA-Z0-9]{24}$
zipstringRequiredPattern: ^[A-Z0-9 -]{3,10}$
citystringRequiredPattern: ^.{1,100}$
countryCodestringRequiredPattern: ^[A-Z]{2}$
timeZoneIdstringOptionalPattern: ^[a-zA-Z0-9/_+-]{1,32}$
rulesOperatorstring · enumOptionalPossible values:
inactiveRulesstring[]Optional
activeRulesstring[]Optional
deactivatedTimestampinteger · int64Optional
activationTimestampinteger · int64Optional
registrationTimestampinteger · int64Optional
customerSubscriptionNamestringOptional
isEarlyAdopterbooleanOptional
userIdsstring[]Optional
Responses
201
Success. Building created.
application/json
409
Conflict. Building already exists.
post
POST /buildings/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1460

{
  "rulesOperatorExclude": true,
  "id": "text",
  "customerBuildingId": "text",
  "customerId": "text",
  "zip": "text",
  "city": "text",
  "countryCode": "text",
  "devices": [
    {
      "id": "text",
      "type": "APPLIANCE",
      "vendor_name": "text",
      "name": "text",
      "product_name": "text",
      "metadata": "text",
      "createdAt": 1,
      "updatedAt": 1,
      "soc": 1,
      "chargingTargetSoc": 1,
      "chargingTargetSocTimestamp": 1,
      "chargingMode": 1,
      "capacity": 1
    }
  ],
  "settings": {
    "tariff": {
      "type": "SINGLE",
      "minPrice": 1,
      "maxPrice": 1,
      "currency": "text",
      "dual": {
        "lowTariff": {
          "mondayStartTime": "text",
          "mondayEndTime": "text",
          "tuesdayStartTime": "text",
          "tuesdayEndTime": "text",
          "wednesdayStartTime": "text",
          "wednesdayEndTime": "text",
          "thursdayStartTime": "text",
          "thursdayEndTime": "text",
          "fridayStartTime": "text",
          "fridayEndTime": "text",
          "saturdayStartTime": "text",
          "saturdayEndTime": "text",
          "sundayStartTime": "text",
          "sundayEndTime": "text"
        }
      },
      "dynamic": {
        "tariffs": [
          {
            "price": 1,
            "from": 1,
            "to": 1
          }
        ]
      }
    }
  },
  "geolocation": {
    "lat": 1,
    "lon": 1
  },
  "timeZoneId": "text",
  "rulesOperator": "INCLUDE",
  "inactiveRules": [
    "text"
  ],
  "activeRules": [
    "text"
  ],
  "deactivatedTimestamp": 1,
  "activationTimestamp": 1,
  "registrationTimestamp": 1,
  "customerSubscriptionName": "text",
  "isEarlyAdopter": true,
  "profile": {
    "multiPersonScore": 1,
    "ecologicalScore": 1,
    "economicalScore": 1,
    "selfSufficiencyScore": 1,
    "commercialBuildingScore": 1,
    "gridPowerConsumptionClusterId": 1,
    "consumptionCategory": "HIGH"
  },
  "properties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "userIds": [
    "text"
  ],
  "disabledNotifications": [
    {
      "ruleId": "text",
      "userId": "text"
    }
  ]
}
{
  "rulesOperatorExclude": true,
  "id": "text",
  "customerBuildingId": "text",
  "customerId": "text",
  "zip": "text",
  "city": "text",
  "countryCode": "text",
  "devices": [
    {
      "id": "text",
      "type": "APPLIANCE",
      "vendor_name": "text",
      "name": "text",
      "product_name": "text",
      "metadata": "text",
      "createdAt": 1,
      "updatedAt": 1,
      "soc": 1,
      "chargingTargetSoc": 1,
      "chargingTargetSocTimestamp": 1,
      "chargingMode": 1,
      "capacity": 1
    }
  ],
  "settings": {
    "tariff": {
      "type": "SINGLE",
      "minPrice": 1,
      "maxPrice": 1,
      "currency": "text",
      "dual": {
        "lowTariff": {
          "mondayStartTime": "text",
          "mondayEndTime": "text",
          "tuesdayStartTime": "text",
          "tuesdayEndTime": "text",
          "wednesdayStartTime": "text",
          "wednesdayEndTime": "text",
          "thursdayStartTime": "text",
          "thursdayEndTime": "text",
          "fridayStartTime": "text",
          "fridayEndTime": "text",
          "saturdayStartTime": "text",
          "saturdayEndTime": "text",
          "sundayStartTime": "text",
          "sundayEndTime": "text"
        }
      },
      "dynamic": {
        "tariffs": [
          {
            "price": 1,
            "from": 1,
            "to": 1
          }
        ]
      }
    }
  },
  "geolocation": {
    "lat": 1,
    "lon": 1
  },
  "timeZoneId": "text",
  "rulesOperator": "INCLUDE",
  "inactiveRules": [
    "text"
  ],
  "activeRules": [
    "text"
  ],
  "deactivatedTimestamp": 1,
  "activationTimestamp": 1,
  "registrationTimestamp": 1,
  "customerSubscriptionName": "text",
  "isEarlyAdopter": true,
  "profile": {
    "multiPersonScore": 1,
    "ecologicalScore": 1,
    "economicalScore": 1,
    "selfSufficiencyScore": 1,
    "commercialBuildingScore": 1,
    "gridPowerConsumptionClusterId": 1,
    "consumptionCategory": "HIGH"
  },
  "properties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "userIds": [
    "text"
  ],
  "disabledNotifications": [
    {
      "ruleId": "text",
      "userId": "text"
    }
  ]
}

Update a building

put
Authorizations
Body
rulesOperatorExcludebooleanOptional
idstringOptional
customerBuildingIdstringRequiredPattern: ^[a-zA-Z0-9:._-]{1,100}$
customerIdstringRequiredPattern: ^[a-zA-Z0-9]{24}$
zipstringRequiredPattern: ^[A-Z0-9 -]{3,10}$
citystringRequiredPattern: ^.{1,100}$
countryCodestringRequiredPattern: ^[A-Z]{2}$
timeZoneIdstringOptionalPattern: ^[a-zA-Z0-9/_+-]{1,32}$
rulesOperatorstring · enumOptionalPossible values:
inactiveRulesstring[]Optional
activeRulesstring[]Optional
deactivatedTimestampinteger · int64Optional
activationTimestampinteger · int64Optional
registrationTimestampinteger · int64Optional
customerSubscriptionNamestringOptional
isEarlyAdopterbooleanOptional
userIdsstring[]Optional
Responses
200
Success. Building updated.
application/json
404
Building could not be found.
put
PUT /buildings/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1460

{
  "rulesOperatorExclude": true,
  "id": "text",
  "customerBuildingId": "text",
  "customerId": "text",
  "zip": "text",
  "city": "text",
  "countryCode": "text",
  "devices": [
    {
      "id": "text",
      "type": "APPLIANCE",
      "vendor_name": "text",
      "name": "text",
      "product_name": "text",
      "metadata": "text",
      "createdAt": 1,
      "updatedAt": 1,
      "soc": 1,
      "chargingTargetSoc": 1,
      "chargingTargetSocTimestamp": 1,
      "chargingMode": 1,
      "capacity": 1
    }
  ],
  "settings": {
    "tariff": {
      "type": "SINGLE",
      "minPrice": 1,
      "maxPrice": 1,
      "currency": "text",
      "dual": {
        "lowTariff": {
          "mondayStartTime": "text",
          "mondayEndTime": "text",
          "tuesdayStartTime": "text",
          "tuesdayEndTime": "text",
          "wednesdayStartTime": "text",
          "wednesdayEndTime": "text",
          "thursdayStartTime": "text",
          "thursdayEndTime": "text",
          "fridayStartTime": "text",
          "fridayEndTime": "text",
          "saturdayStartTime": "text",
          "saturdayEndTime": "text",
          "sundayStartTime": "text",
          "sundayEndTime": "text"
        }
      },
      "dynamic": {
        "tariffs": [
          {
            "price": 1,
            "from": 1,
            "to": 1
          }
        ]
      }
    }
  },
  "geolocation": {
    "lat": 1,
    "lon": 1
  },
  "timeZoneId": "text",
  "rulesOperator": "INCLUDE",
  "inactiveRules": [
    "text"
  ],
  "activeRules": [
    "text"
  ],
  "deactivatedTimestamp": 1,
  "activationTimestamp": 1,
  "registrationTimestamp": 1,
  "customerSubscriptionName": "text",
  "isEarlyAdopter": true,
  "profile": {
    "multiPersonScore": 1,
    "ecologicalScore": 1,
    "economicalScore": 1,
    "selfSufficiencyScore": 1,
    "commercialBuildingScore": 1,
    "gridPowerConsumptionClusterId": 1,
    "consumptionCategory": "HIGH"
  },
  "properties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "userIds": [
    "text"
  ],
  "disabledNotifications": [
    {
      "ruleId": "text",
      "userId": "text"
    }
  ]
}
{
  "rulesOperatorExclude": true,
  "id": "text",
  "customerBuildingId": "text",
  "customerId": "text",
  "zip": "text",
  "city": "text",
  "countryCode": "text",
  "devices": [
    {
      "id": "text",
      "type": "APPLIANCE",
      "vendor_name": "text",
      "name": "text",
      "product_name": "text",
      "metadata": "text",
      "createdAt": 1,
      "updatedAt": 1,
      "soc": 1,
      "chargingTargetSoc": 1,
      "chargingTargetSocTimestamp": 1,
      "chargingMode": 1,
      "capacity": 1
    }
  ],
  "settings": {
    "tariff": {
      "type": "SINGLE",
      "minPrice": 1,
      "maxPrice": 1,
      "currency": "text",
      "dual": {
        "lowTariff": {
          "mondayStartTime": "text",
          "mondayEndTime": "text",
          "tuesdayStartTime": "text",
          "tuesdayEndTime": "text",
          "wednesdayStartTime": "text",
          "wednesdayEndTime": "text",
          "thursdayStartTime": "text",
          "thursdayEndTime": "text",
          "fridayStartTime": "text",
          "fridayEndTime": "text",
          "saturdayStartTime": "text",
          "saturdayEndTime": "text",
          "sundayStartTime": "text",
          "sundayEndTime": "text"
        }
      },
      "dynamic": {
        "tariffs": [
          {
            "price": 1,
            "from": 1,
            "to": 1
          }
        ]
      }
    }
  },
  "geolocation": {
    "lat": 1,
    "lon": 1
  },
  "timeZoneId": "text",
  "rulesOperator": "INCLUDE",
  "inactiveRules": [
    "text"
  ],
  "activeRules": [
    "text"
  ],
  "deactivatedTimestamp": 1,
  "activationTimestamp": 1,
  "registrationTimestamp": 1,
  "customerSubscriptionName": "text",
  "isEarlyAdopter": true,
  "profile": {
    "multiPersonScore": 1,
    "ecologicalScore": 1,
    "economicalScore": 1,
    "selfSufficiencyScore": 1,
    "commercialBuildingScore": 1,
    "gridPowerConsumptionClusterId": 1,
    "consumptionCategory": "HIGH"
  },
  "properties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "userIds": [
    "text"
  ],
  "disabledNotifications": [
    {
      "ruleId": "text",
      "userId": "text"
    }
  ]
}

Attach a set of devices to a building

put
Authorizations
Path parameters
customerBuildingIdstringRequired

Set devices of specified building.

Pattern: ^[a-zA-Z0-9:._-]{1,100}$
Body
idstringRequiredPattern: ^[a-zA-Z0-9:._-]{3,64}$
typestring · enumRequiredPossible values:
vendor_namestringRequiredPattern: ^.{1,100}$
namestringRequiredPattern: ^.{1,100}$
product_namestringRequiredPattern: ^.{1,100}$
metadatastringOptionalPattern: ^.{0,1000}$
createdAtinteger · int64Optional
updatedAtinteger · int64Optional
socnumber · floatOptional
chargingTargetSocnumber · floatOptional
chargingTargetSocTimestampinteger · int64Optional
chargingModeinteger · int32Optional
capacitynumber · floatOptional
Responses
200
Success. Devices updated.
404
Building could not be found.
put
PUT /buildings/{customerBuildingId}/devices/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 228

[
  {
    "id": "text",
    "type": "APPLIANCE",
    "vendor_name": "text",
    "name": "text",
    "product_name": "text",
    "metadata": "text",
    "createdAt": 1,
    "updatedAt": 1,
    "soc": 1,
    "chargingTargetSoc": 1,
    "chargingTargetSocTimestamp": 1,
    "chargingMode": 1,
    "capacity": 1
  }
]

No content