🚀 Feature Release
Locations can now be added using the API. This new endpoint requires the access scope write:device
.
The lat
and lng
variables are required on this endpoint to determine whether the radio frequency of the location is supported by Airthings.
Metadata fields such as buildingType
, ventilationType
, floors
, etc. are optional. However, providing metadata information about the location will result in more accurate insights. Note that measurement system used by this endpoint is METRIC.
To add a location, use POST /locations?organizationId={organizationId}
with the following example request body:
{
"name": "My location",
"lat": 59.918899,
"lng": 10.7296083,
"address": "Wergelandsveien 7, 0167 Oslo",
"buildingType": "OFFICE",
"ventilationType": "BALANCED",
"floors": 11,
"timezone": "Europe/Oslo",
"buildingYear": 1950,
"buildingHeight": 35.74,
"buildingSize": 10000,
"buildingVolume": 22333.8,
"usageHours": {
"monday": {
"from": "07:00",
"to": "17:00",
"closed": false
},
"tuesday": {
"from": "07:00",
"to": "17:00",
"closed": false
},
"wednesday": {
"from": "07:30",
"to": "17:00",
"closed": false
},
"thursday": {
"from": "07:00",
"to": "17:00",
"closed": false
},
"friday": {
"from": "09:00",
"to": "16:00",
"closed": false
},
"saturday": {
"closed": true
},
"sunday": {
"closed": true
}
}
}
✨ Improvements
Added missing required
text on organizationId
in some webhooks endpoints