Download OpenAPI specification:Download
An HTTP REST API to allow 3rd party application to communicate with LaylaElectric cloud. This API can be used to access some basic information about properties, devices and features offered my LaylaElectric products.
Getting your access token: LaylaElectric 3rd Party API uses OAuth 2.0 Authentication and Authorization. In order to get detailed information about integration with our API, contact us at api@layla.eco.
Using your access token: Every API call should include Access token as Bearer token.
The common HTTP Response Status Codes are used.
In general:
{- "picture_preview_url": "string",
- "name": "string",
- "accepted_policy": 0,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}
}
picture_url | string |
name required | string |
accepted_policy | integer |
string | |
address required | string |
phone required | string |
company required | string |
title required | string |
object | |
object |
{- "picture_url": "string",
- "name": "string",
- "accepted_policy": 0,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}
}
{- "picture_preview_url": "string",
- "name": "string",
- "accepted_policy": 0,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}
}
picture_url | string Should be obtained from 'POST /api/v1/users/self/picture/upload_urls' |
name | string |
accepted_policy | integer |
string | |
address | string |
phone | string |
company | string |
title | string |
object | |
object |
{- "picture_url": "string",
- "name": "string",
- "accepted_policy": 0,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}
}
{- "picture_preview_url": "string",
- "name": "string",
- "accepted_policy": 0,
- "email": "string",
- "address": "string",
- "phone": "string",
- "company": "string",
- "title": "string",
- "preferences": {
- "currency": "USD"
}, - "notification_preferences": {
- "in_app": true,
- "push": true,
- "email": true,
- "sms": true,
- "sound": true,
- "vibration": true
}
}
id | string ID of the specific property |
currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" |
fields | Array of strings Items Enum: "alarm_event_counts" "monthly_savings" "total_savings" "total_efficiency_gains" Comma-separated list of additional fields to be included into response |
sort_by | string Sorting by parameter |
[- {
- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "name": "string",
- "category": "house",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": true
}
]
name required | string |
category required | string Enum: "house" "apartment" "office" "commercial" |
address required | string |
timezone required | string |
object | |
enabled | boolean |
{- "name": "string",
- "category": "house",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": true
}
{- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "name": "string",
- "category": "house",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": true
}
id required | string |
name required | string |
category required | string Enum: "house" "apartment" "office" "commercial" |
address required | string |
timezone required | string |
object | |
enabled | boolean |
{- "name": "string",
- "category": "house",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": true
}
{- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "name": "string",
- "category": "house",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": true
}
id required | string |
name | string |
category | string Enum: "house" "apartment" "office" "commercial" |
address | string |
timezone | string |
object | |
enabled | boolean |
{- "name": "string",
- "category": "house",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": true
}
{- "role": "admin",
- "enabled_alarms": [
- "noise_alarm"
], - "enabled_features": [
- "eco"
], - "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "monthly_savings": {
- "costs": 0
}, - "total_savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "total_efficiency_gains": 0,
- "name": "string",
- "category": "house",
- "address": "string",
- "timezone": "string",
- "settings": {
- "currency": "USD",
- "kwh_price": 0
}, - "enabled": true
}
id required | string |
measure required | string Enum: "power" "temperature" "noise" |
granularity | string (TimeGranularity) Enum: "hours" "days" "months" "years" |
start | string <date-time> (start date-time in ISO format (without timezone, timezone is taken from the device property) (inclusive)) |
end | string <date-time> (end date-time in ISO format (without timezone, timezone is taken from the device property) (exclusive)) |
[- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
]
fields | Array of strings Items Enum: "alarm_event_counts" "latest_values" "in_alarm" "snoozed" "active_alarms" Comma-separated list of additional fields to be included into response |
property_id | string The ID of the property to receive the devices for |
[- {
- "id": "string",
- "property_id": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "noise_alarm"
], - "snoozed": [
- "noise_alarm"
], - "active_alarms": [
- {
- "name": "noise_alarm",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "device_mac": "string",
- "category": "SP",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}
}
], - "features": [
- "eco"
], - "settings": {
- "irMode": "smart"
}
}
]
property_id required | string |
device_mac required | string |
category required | string Value: "SP" |
name required | string |
enabled | boolean |
Array of objects (Alarms configuration) | |
features | Array of strings Items Value: "eco" |
object (DeviceSettingsModel) |
{- "property_id": "string",
- "device_mac": "string",
- "category": "SP",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}
}
], - "features": [
- "eco"
], - "settings": {
- "irMode": "smart"
}
}
{- "id": "string",
- "property_id": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "noise_alarm"
], - "snoozed": [
- "noise_alarm"
], - "active_alarms": [
- {
- "name": "noise_alarm",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "device_mac": "string",
- "category": "SP",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}
}
], - "features": [
- "eco"
], - "settings": {
- "irMode": "smart"
}
}
{- "id": "string",
- "property_id": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "noise_alarm"
], - "snoozed": [
- "noise_alarm"
], - "active_alarms": [
- {
- "name": "noise_alarm",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "device_mac": "string",
- "category": "SP",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}
}
], - "features": [
- "eco"
], - "settings": {
- "irMode": "smart"
}
}
id required | string |
device_mac | string |
category | string Value: "SP" |
name | string |
enabled | boolean |
Array of objects (Alarms configuration) | |
features | Array of strings Items Value: "eco" |
object (DeviceSettingsModel) |
{- "device_mac": "string",
- "category": "SP",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}
}
], - "features": [
- "eco"
], - "settings": {
- "irMode": "smart"
}
}
{- "id": "string",
- "property_id": "string",
- "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "latest_values": [
- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
], - "in_alarm": [
- "noise_alarm"
], - "snoozed": [
- "noise_alarm"
], - "active_alarms": [
- {
- "name": "noise_alarm",
- "state": "in_alarm",
- "first_datapoint_timestamp": "2019-08-24T14:15:22Z"
}
], - "device_mac": "string",
- "category": "SP",
- "name": "string",
- "enabled": true,
- "alarms": [
- {
- "name": "noise_alarm",
- "value": 0,
- "value_label": "string",
- "enabled": true,
- "quiet_hours": {
- "start": "string",
- "end": "string"
}
}
], - "features": [
- "eco"
], - "settings": {
- "irMode": "smart"
}
}
id required | string |
measure required | string Enum: "power" "temperature" "noise" |
granularity | string (TimeGranularity) Enum: "hours" "days" "months" "years" |
start | string <date-time> (start date-time in ISO format (without timezone, timezone is taken from the device property) (inclusive)) |
end | string <date-time> (end date-time in ISO format (without timezone, timezone is taken from the device property) (exclusive)) |
[- {
- "name": "power",
- "value": 0,
- "min_value": 0,
- "max_value": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
]
category | string category of property (can be acquired from property API) |
period | string Enum: "day" "week" "month" "year" |
currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" |
property_id | string |
device_id | string |
fields | Array of strings Items Value: "trends" Comma-separated list of additional fields to be included into response |
[- {
- "energy": 0,
- "costs": 0,
- "efficiency_gains": 0,
- "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "count": 0
}
], - "savings": {
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}, - "trends": {
- "costs": 0,
- "efficiency_gains": 0,
- "savings": {
- "costs": 0
}, - "alarm_event_counts": [
- {
- "name": "noise_alarm",
- "change": 0
}
]
}
}
]
category | string property category |
property_ids | Array of strings Comma-separated list of property ids |
device_ids | Array of strings Comma-separated list of device ids |
start | string <date-time> |
end | string <date-time> |
timezone | string |
granularity | string (TimeGranularity) Enum: "hours" "days" "months" "years" |
currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" |
[- {
- "timestamp": "2019-08-24T14:15:22Z",
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}
]
category | string property category |
property_ids | Array of strings Comma-separated list of property ids |
device_ids | Array of strings Comma-separated list of device ids |
start | string <date-time> |
end | string <date-time> |
timezone | string |
currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" |
{- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}
name required | string event name |
category | string property category |
property_ids | Array of strings Comma-separated list of property ids |
device_ids | Array of strings Comma-separated list of device ids |
start | string <date-time> |
end | string <date-time> |
timezone | string |
granularity | string (TimeGranularity) Enum: "hours" "days" "months" "years" |
[- {
- "timestamp": "2019-08-24T14:15:22Z",
- "value": 0
}
]
name required | string alarm name |
category | string property category |
property_ids | Array of strings Comma-separated list of property ids |
device_ids | Array of strings Comma-separated list of device ids |
start | string <date-time> |
end | string <date-time> |
timezone | string |
{- "value": 0
}
category | string property category |
property_ids | Array of strings Comma-separated list of property ids |
device_ids | Array of strings Comma-separated list of device ids |
start | string <date-time> |
end | string <date-time> |
timezone | string |
granularity | string (TimeGranularity) Enum: "hours" "days" "months" "years" |
currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" |
[- {
- "timestamp": "2019-08-24T14:15:22Z",
- "energy": 0,
- "costs": 0,
- "co2": 0,
- "trees": 0
}
]
category | string property category |
property_ids | Array of strings Comma-separated list of property ids |
device_ids | Array of strings Comma-separated list of device ids |
start | string <date-time> |
end | string <date-time> |
timezone | string |
currency | string (CurrencyCode) Enum: "USD" "EUR" "GBP" "ILS" "BRL" |
{- "value": 0
}
property_id | string |
property_name | string |
sensors_count required | number |
country | string |
city | string |
street | string |
apartment | string |
{- "property_id": "string",
- "property_name": "string",
- "sensors_count": 0,
- "country": "string",
- "city": "string",
- "street": "string",
- "apartment": "string"
}
{- "id": "string",
- "property_id": "string",
- "property_name": "string",
- "sensors_count": 0,
- "country": "string",
- "city": "string",
- "street": "string",
- "apartment": "string",
- "created_at": "2019-08-24T14:15:22Z"
}
property_id | string |
seen | boolean |
types | Array of strings Items Enum: "noise_alarm_start" "noise_alarm_end" "noise_alarm_quiet_hours_start" "noise_alarm_quiet_hours_end" "occupancy_alarm_start" "occupancy_alarm_end" "device_off_alarm_start" "device_off_alarm_end" "device_off_alarm_multiple_start" "device_off_alarm_multiple_end" "security_alarm_start" "security_alarm_end" "eco_mode_enabled" |
start | string <date-time> |
end | string <date-time> |
timezone | string |
[- {
- "id": "string",
- "property_id": "string",
- "property_name": "string",
- "device_id": "string",
- "title": "string",
- "body": "string",
- "in_app_text": "string",
- "type": "noise_alarm_start",
- "payload": {
- "threshold_value": "string",
- "threshold_label": "string",
- "duration": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "seen": true
}
]
property_ids | Array of strings |
types | Array of strings Items Enum: "noise_alarm_start" "noise_alarm_end" "noise_alarm_quiet_hours_start" "noise_alarm_quiet_hours_end" "occupancy_alarm_start" "occupancy_alarm_end" "device_off_alarm_start" "device_off_alarm_end" "device_off_alarm_multiple_start" "device_off_alarm_multiple_end" "security_alarm_start" "security_alarm_end" "eco_mode_enabled" |
start | string <date-time> |
timezone | string |
[- {
- "id": "string",
- "property_id": "string",
- "property_name": "string",
- "device_id": "string",
- "title": "string",
- "body": "string",
- "in_app_text": "string",
- "type": "noise_alarm_start",
- "payload": {
- "threshold_value": "string",
- "threshold_label": "string",
- "duration": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "seen": true
}
]