Before sending any events related to buildings, it is crucial to send all available buildings to the platform. This step enables the system to have complete information about the buildings and their attributes, allowing for accurate recommendations.
{ "id": "e75ff537-fee4-4153-bc5d-be4bc5726dd8", "customerBuildingId": "12345", "zip": "12345", "countryCode": "DE", "city": "Berlin", "settings": {}, "devices": [ { "id": "cb16399f-af20-428e-ad2f-69380f9f07a2", "location": "Garage", "type": "Wallbox", "vendor_name": "KEBA", "product_name": "KEBA Wallbox P30c", "metadata": {}, "createdAt": 1608299956, "updatedAt": 1608299956 } ] }
Last updated 1 month ago
© 2023 MOOST AG
OK
const response = await fetch('https://api.moost.io/buildings/v1', { method: 'GET', headers: {}, }); const data = await response.json();
[ { "id": { "date": "2024-05-08T03:46:18.201Z" }, "customerBuildingId": "text", "customerId": "text", "zip": "text", "city": "text", "countryCode": "text", "devices": [ { "id": "text", "location": "LIVING_ROOM", "type": "APPLIANCE", "vendor_name": "text", "product_name": "text", "metadata": "text", "soc": 0, "chargingTargetSoc": 0 } ], "settings": { "lowTariffHourSetting": { "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" } }, "geolocation": { "lat": 0, "lon": 0 }, "inactiveRules": [ "text" ] } ]
const response = await fetch('https://api.moost.io/buildings/{buildingId}/v1', { method: 'DELETE', headers: {}, }); const data = await response.json();
const response = await fetch('https://api.moost.io/buildings/{buildingId}/v1', { method: 'GET', headers: {}, }); const data = await response.json();
{ "id": { "date": "2024-05-08T03:46:18.201Z" }, "customerBuildingId": "text", "customerId": "text", "zip": "text", "city": "text", "countryCode": "text", "devices": [ { "id": "text", "location": "LIVING_ROOM", "type": "APPLIANCE", "vendor_name": "text", "product_name": "text", "metadata": "text", "soc": 0, "chargingTargetSoc": 0 } ], "settings": { "lowTariffHourSetting": { "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" } }, "geolocation": { "lat": 0, "lon": 0 }, "inactiveRules": [ "text" ] }
const response = await fetch('https://api.moost.io/buildings/{customerBuildingId}/devices/v1', { method: 'GET', headers: {}, }); const data = await response.json();
[ { "id": "text", "location": "LIVING_ROOM", "type": "APPLIANCE", "vendor_name": "text", "product_name": "text", "metadata": "text", "soc": 0, "chargingTargetSoc": 0 } ]
Created
const response = await fetch('https://api.moost.io/buildings/{customerBuildingId}/devices/v1', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify([ { "id": "text", "product_name": "text", "vendor_name": "text" } ]), }); const data = await response.json();
const response = await fetch('https://api.moost.io/buildings/v1', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "customerBuildingId": "text", "customerId": "text" }), }); const data = await response.json();
const response = await fetch('https://api.moost.io/buildings/customer-building-id/{customerBuildingId}/v1', { method: 'GET', headers: {}, }); const data = await response.json();