NAV
Aura Air REST API
Https

Aura Rest API

Use our featured API to manage and control your organization's Aura Air devices in real time and enable third party integrations with Building Management Systems or other services.

The Aura API is organized around REST and uses HTTP verbs and response codes. All requests must be formatted as Content-Type: application/JSON (except where noted). All responses are also formatted JSON, encoded in the UTF-8 character encoding (Content-Type: application/JSON; charset=utf-8).

Security

The Aura API uses the API key security. Each key is generated by Aura, please contact support for API access. Each key given will be a reference to a specific owner of an organization and will give access to all the endpoints and the functionalities of the Aura API for your organization.
The API key must be passed in the Headers of each request as shown below:

Authorization: Bearer API_KEY

Base URL : https://aura-b2b-rest.web.app

API Update Guidelines

The Aura API is updated frequently with new features and improvements. These updates ensure that the API evolves with customer and industry demands. Managing this change to ensure we provide a reliable, consistent, and backward compatible API design is a critical challenge for our team. Every new and improved feature is put through a peer-review process to ensure it will not change an existing resource to the extent that it breaks current customer implementations, and that it is consistent with existing resources (therefore, predictable and easy to use).

API Usage

The number of calls you can make to the Aura API is limited. This limitation is related to the number of devices paid for accessing the API.
If you excceed your limit, our team will contact you to upgrade your subscription.
You can verify your current daily usage of the API by checking the following keys in the Headers

Header value
X-CALLS The number of calls you made on this day
X-CALL-RESET-SECONDS The number of seconds before the reset of the daily api usage
X-CALL-LIMIT The limit of calls you can perform per day

Developer Keys

Please contact our customer service team to sign up for a developer key and begin using our API today.

Locations

A location is one of the base entity of your organization that can contain many devices , groups , floors, rules or tasks

Add a Location

Body

  {
  "address" : "Sderot Rothschild 45",
  "city" : "Tel AViv",
  "name" : "Home",
  "state" : "Israel",
  "zipcode" : "86521",
  "sector":"1",
  "subsector":"11"
}

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

  {
    "status": "sucess",
    "message": "Created a new location",
    "newId": "-hrkiyEWBMqnreiZMHO"
} 

To create a location you will need the following keys:

key value
address (string)
city (string)
name (string)
state (string)
zipcode (string)
sector (string)
subsector (string)

The sector and the subsectors are mandatory fields that describe the location. Each sector and subsectors are predefined ids described in this table

HTTP Request

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/locations

parameter value
orgId your organization Id

Get All Locations

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "-Lp2LeDOb8SdpqYU1Wpw12": {
            "_id": "-Lp2LeDOb8SdpqYU1Wpw12",
            "address": "Hamiphras 6",
            "altitude": 0,
            "aura_daily_report": "true",
            "bad_aqi_event": false,
            "city": "Yavne",
            "components": {
                "administrative_area": "Merkaz",
                "country_iso_3": "ISR",
                "locality": "Yavne",
                "postal_code": "81000",
                "postal_code_short": "81000",
                "premise": "6",
                "premise_number": "6",
                "sub_administrative_area": "Rehovot",
                "thoroughfare": "Hamifras",
                "thoroughfare_name": "Hamiphras"
            },
            "created_at": 1577098253453,
            "last_modified": 1577098253453,
            "latitude": 31.86777,
            "longitude": 34.733457,
            "name": "Building 2",
            "state": "Israel",
            "zipcode": "8101306",
            "sector":"1",
            "subsector":"11"
        },
        "-M7qh60FjNWsDVfEuD6Z": {
            "_id": "-M7qh60FjNWsDVfEuD6Z",
            "address": "Saknai 4",
            "aura_daily_report": true,
            "city": "hod hasharon",
            "components": {
                "ISO_3166-1_alpha-2": "US",
                "ISO_3166-1_alpha-3": "USA",
                "_category": "place",
                "_type": "village",
                "continent": "North America",
                "country": "United States of America",
                "country_code": "us",
                "country_iso_3": "USA",
                "county": "Maricopa County",
                "hamlet": "Kaka",
                "state": "Arizona",
                "state_code": "AZ"
            },
            "created_at": 1590055694668,
            "is_shared": false,
            "last_modified": "2020-07-09T09:00:13.914Z",
            "latitude": 32.1420858,
            "longitude": 34.8918504,
            "name": "Aura Office",
            "state": "israel",
            "zipcode": "453535",
            "sector":"1",
            "subsector":"11"
        }
    }
}

Retrieve all locations under organization
The data is an object and each key/vallue is a location.
For more information on the location object go to the Get a single location by ID endpoint.

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/locations

parameter value
orgId your organization Id

Get a Specific Location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "_id": "-MywFCv-A9cQOeOfVeX4",
        "address": "45 sderot rotshild",
        "city": "Tel Aviv",
        "components": {
            "ISO_3166-1_alpha-2": "IL",
            "ISO_3166-1_alpha-3": "IL",
            "administrative_area_level_1": "Tel Aviv District",
            "country": "IL",
            "country_code": "IL",
            "country_iso_3": "IL",
            "formated_address": "Rothschild Blvd 45, Tel Aviv-Yafo, Israel",
            "locality": "Tel Aviv-Yafo",
            "political": "IL",
            "route": "Rothschild Blvd",
            "street_number": "45"
        },
        "created_at": "2022-03-24T14:07:24.199Z",
        "last_modified": "2022-03-24T14:07:24.199Z",
        "latitude": 32.0642807,
        "longitude": 34.774554,
        "name": "Work test",
        "sector": "4",
        "state": "Israel",
        "subsector": "41",
        "zipcode": "68018"
    }
}

get a specific location under organization
minimum data retrieved :

key value
_id (unique string)
address (string)
city (string)
created_at (ISO date string)
last_modified (ISO date string)
latitude and longitude (float numbers)
name (unique string among locations)
state (string)
zipcode (string)
components (object, more information on the location)
sector (string)
subsector (string)

The sector and the subsectors are mandatory fields that describe the location. Each sector and subsectors are predefined ids described in this table

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/locations/{{locationId}}

parameter value
orgId your organization Id
locationId The location Id you want to retrieve

Get the Aura Score of a specific location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    {
    "status": "Success",
    "data": {
        "score": {
            "value": 3.9,
            "max": 5
        },
        "details": {
            "aqi": {
                "value": 48.59,
                "max": 55
            },
            "maintenance": {
                "value": 15,
                "max": 15
            },
            "connectivity": {
                "value": 3.75,
                "max": 15
            },
            "modes": {
                "value": 0,
                "max": 5
            },
            "engagement": {
                "value": 10,
                "max": 10
            }
        }
    }
}
}

Get the Aura Score of a specific location with the details of it

Data retrieved :

key value
score.value (float number) The total score of the location.
score.max (float number) The maximum score of the location.
details.aqi.value (float number) The AQI score of the location (in percentage).
details.aqi.max (float number) The maximum AQI score of the location (in percentage).
details.maintenance.value (float number) The maintenance score of the location (in percentage).
details.maintenance.max (float number) The maximum maintenance score of the location (in percentage).
details.connectivity.value (float number) The connectivity score of the location (in percentage).
details.connectivity.max (float number) The maximum connectivity score of the location (in percentage).
details.modes.value (float number) The modes score of the location (in percentage).
details.modes.max (float number) The maximum modes score of the location (in percentage).
details.engagement.value (float number) The engagement score of the location (in percentage).
details.engagement.max (float number) The maximum engagement score of the location (in percentage).

You can find this aura score on your Dashboard of the Aura Web Platform.

More information about this score and it's calculation are available here

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/locations/{{locationId}}/aura_score

parameter value
orgId your organization Id
locationId The location Id you want to retrieve the aura score of

Get the AQI of a specific location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    {
    "status": "Success",
    "data": {
        "aqi":57.34
    }
}
}

Get the AQI of a specific location based on all the devices under it.

Data retrieved :

key value
aqi (float number) The AQI score of the location.

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/locations/{{locationId}}/aqi

parameter value
orgId your organization Id
locationId The location Id you want to retrieve the AQI score of

Update a Specific Location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

  {   
    "state":"Israel",
    "zipcode":"86953",
    "city":"Tel Aviv",
    "address":"4 Sderot Rothschild"
}

Response

{
    "status": "success",
    "data": {
        "state": "Israel",
        "zipcode": "86953",
        "city": "Tel Aviv",
        "address": "4 Sderot Rothschild"
    }
}

Update keys of a specific location under your organization:
To update the address you need to provide the city, state, and the zipcode. It means that providing only one of the fields described above without the others will return an error.
Here is a of all the fields you can update in the location :

key value
address (string)
city (string)
name (unique string among locations)
zipcode (string)
state (string)
sector (string)
subsector (string)

The sector and the subsectors are mandatory fields that describe the location. Each sector and subsectors are predefined ids described in this table

Note that two locations cannot have the same name.

HTTP REQUEST

PATCH https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/locations/{{locationId}}

parameter value
orgId your organization Id
locationId the location Id you want to update

Delete a Specific Location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "location deleted",
    "locationId": "-Lp2LeDOb8SdpqYU1Wpw12"
}

Delete a location by its ID. The organization must be the owner of the location.

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/locations/{{locationId}}

parameter value
orgId your organization Id
locationId the location Id you want to delete

Floors

A floor in an entity of your organization that exist under a location.
A floor can contain many devices

Add a Floor

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
    "name":"floor 1",
    "locationId":"-awmagoeQTSlyvdcvrrEQPIQHFT",
    "reminderDay":1,
    "reminderInterval":"monthly"
}

Response

{
    "status": "success",
    "message": "Created a new Floor",
    "data":{
      "floorId":"-Lp2LeDOb8SdpqYU1Wpw12",
      "locationId": "-awmagoeQTSlyvdcvrrEQPIQHFT",
      "name": "floor 1",
    }
}

This endpoint lets you create a floor
Data needed :

key value
name (must be unique among the floors)
locationId (must exists under your organization)
reminderDay (a number representing the day of the month or of the week when you want a reminder to clean the prefilter it must be an integer)
reminderInterval (a string defining the interval between reminders, it can be "weekly' , "bi-weekly" or "monthly")

Note that if the reminder interval is "weekly" or "bi-weekly" the reminder day represent a day of the week and must be between 0 and 6 (where 0 is Monday and 6 is Sunday), if the reminder interval is "monthly" the reminder day represent a day of the month and must be between 1 and 28 (it represent the date of the month).

HTTP REQUEST

POST
https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/floors
parameter value
orgId your organization Id

Get All Floors

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "-M8tVY8qZaSrXtrUzG80": {
            "_id": "-M8tVY8qZaSrXtrUzG80",
            "created_at": "2020-06-03T09:27:55.319Z",
            "last_modified": "2020-06-03T09:27:55.319Z",
            "locationId": "null",
            "name": "floor ne",
            "reminderDay": "1"
        },
        "-MAQ4XeE2mdDkDmq2bva": {
            "_id": "-MAQ4XeE2mdDkDmq2bva",
            "created_at": "2020-06-22T08:12:42.549Z",
            "last_modified": "2020-06-22T08:12:42.549Z",
            "locationId": "null",
            "name": "floor 2",
            "reminderDay": "1"
        }
    }
}

Retrieve all floors under an organization.
If you want more details on the floor object go to the Get a single floor by ID endpoint.

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/floors

parameter value
orgId your organization Id

Get a Specific Floor

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "_id": "-M8tVY8qZaSrXtrUzG80",
        "created_at": "2020-06-03T09:27:55.319Z",
        "last_modified": "2020-06-03T09:27:55.319Z",
        "locationId": "IOBSHNkbdsdiBJBDIbskn-pkbsd",
        "name": "floor ne",
        "reminderDay": "1",
        "reminderInterval": "monthly"
    }
}

Get a floor by its ID.
The received object will have the folowing keys :

key value
_id string , the id of the floor
created_at ISO string date , date of creation of the floor
last_modified ISO string date , last update of the floor
locationId unique string , the location of the floor
name string , unique among floor under the sane location
reminderDay integer , the day when the reminder for cleaning the prefilter of this floor will be sent
reminderInterval string , the interval between reminders for this floor, it can be "weekly" , "bi-weekly" or "monthly"

Note that if the reminderInterval is "weekly" or "bi-weekly" the reminderDay represent a day of the week and must be between 0 and 6 (where 0 is Monday and 6 is Sunday), if the reminderInterval is "monthly" the reminderDay represent a day of the month and must be between 1 and 28 (it represent the date of the month).

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/floors/{{floorId}}

parameter value
orgId your organization Id
floorId the floor Id you want to update

Update a Specific Floor

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
    "name":"floor 9"
}

Response

{
    "status": "success",
    "data": {
        "name": "floor 9"
    }
}

Update a floor under a specific organization. The keys you can update are :

key value
name (must be unique among the floors)
reminderDay (a number representing the day of the month or of the week when you want a reminder to clean the prefilter it must be an integer)
reminderInterval (a string defining the interval between reminders, it can be "weekly' , "bi-weekly" or "monthly")

Note that :

HTTP REQUEST

PATCH https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/floors/{{floorId}}

parameter value
orgId your organization Id
floorId the floor Id you want to update

Delete a Specific Floor

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "floor has been deleted",
    "floorId": "-M8tVY8qZaSrXtrUzG80"
}

Delete an existing floor from your organization.
Note that :

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/floors/{{floorId}}

parameter value
orgId your organization Id
floorId the floor Id you want to delete

Groups

A group is an entity of your organization that exists under a location.
A group can contain many devices. The main difference between a group and a floor is that the group can be linked to a rule.

Add a Group

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
    "locationId":"-awmagoeQTSlyvdcvrrEQPIQHFT",
    "name": "test322"
}

Response

{
    "status": "success",
    "message": "Created a new Group",
    "data": {
        "groupId": "-levreaJYHSAKvntwbnuGCLROV",
        "name": "test322",
        "locationId": "-awmagoeQTSlyvdcvrrEQPIQHFT"
    }
}

This endpoint lets you create a new group.
Data needed:

key value
locationId (string relative to an existing location in your organization)
name (unique string among the groups)

Note that the locationId used must be under your organization.

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/groups

parameter value
orgId your organization Id

Get All Groups

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "-M8tcHwxWOGJtVAZI14G": {
            "_id": "-M8tcHwxWOGJtVAZI14G",
            "created_at": "2020-06-03T10:01:46.121Z",
            "last_modified": "2020-06-03T10:01:46.121Z",
            "locationId": "-Lp2LeDOb8SdpqYU1Wpw13",
            "name": "ee"
        },
        "-M8tcM-nKe7HmX9tcuch": {
            "_id": "-M8tcM-nKe7HmX9tcuch",
            "created_at": "2020-06-03T10:02:02.752Z",
            "last_modified": "2020-06-03T10:02:02.752Z",
            "locationId": "null",
            "name": "build2"
        },
        "-M8tcVdtAlnqpHljBiVq": {
            "_id": "-M8tcVdtAlnqpHljBiVq",
            "created_at": "2020-06-03T10:02:42.246Z",
            "last_modified": "2020-06-03T10:02:51.571Z",
            "locationId": "-Lp2LeDOb8SdpqYU1Wpw12",
            "name": "build123"
        }   
      }
}

Retrieve a list of all groups under your organization.
Go to get a single group by ID endpoint to get more information on the structure of the group object.

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/groups

parameter value
orgId your organization Id

Get a Specific Group

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "_id": "-M8tcHwxWOGJtVAZI14G",
        "created_at": "2020-06-03T10:01:46.121Z",
        "last_modified": "2020-06-03T10:01:46.121Z",
        "locationId": "-Lp2LeDOb8SdpqYU1Wpw13",
        "name": "ee"
    }
}

Get a single group by its ID under your organization.
Data obtained:

key value
_id (a unique string)
created_at (ISO string date)
last_modified (ISO string date)
locationId (string , unique , related to a specific location of your organization)
name (unique string among your groups)
ruleId (optionnal) the rule the froup is linked to , for more information on the rule go to the Rules section

Note that the group must be under your organization if you want to access it.

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/groups/{{groupId}}

parameter value
orgId your organization Id
groupId the group Id you want to get

Update a Specific Group

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
    "name":"best group in the world"
}

Response

{
    "status": "succes",
    "message": "group updated",
    "data": {
        "groupId": "-M8tcHwxWOGJtVAZI14G",
        "group": {
            "name": "the best name",
            "last_modified": "2020-08-25T08:40:19.688Z"
        }
    }
}

Update keys of a single group
Key to update:

key value
name (unique string among groups)

HTTP REQUEST

PATCH https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/groups/{{groupId}}

parameter value
orgId your organization Id
groupId the groupId you want to update

Delete a Specific Group

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "group deleted",
    "data": {
        "groupId": "ooxyyZz2"
    }
}

This endpoint lets you delete a group by its ID.
Note that all the devices under this group will have a value null to the key groupId and ruleId

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/groups/{{groupId}}

parameter value
orgId your organization Id
groupId the group Id you want to delete

Devices

A Device can be connected to your organization through the Aura Business App and is most of the time under a location.
A device can also be at the same time under a group of this location and a floor of this location.

Get All Devices

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "1f002e000a47363433353735": {
            "_id": "1f002e000a47363433353735",
            "created_at": "2020-05-14T09:22:58.431Z",
            "filter_due_date": "2020-10-14T09:22:58.431Z",
            "floorId": "-M8op_BSEnPr4ccQoITD",
            "groupId": "-M8tcVdtAlnqpHljBiVq",
            "last_modified": "2020-06-07T12:29:54.303Z",
            "locationId": "-Lp2LeDOb8SdpqYU1Wpw12",
            "room": "Living Room",
            "spaceType": "2111"
        },
        "25002e001147383531363134": {
            "_id": "25002e001147383531363134",
            "created_at": "2020-05-14T09:22:58.431Z",
            "filter_due_date": "2020-10-14T09:22:58.431Z",
            "floorId": "-M8opVbcMkKAXZGCJt2l",
            "groupId": "ooxyyZz1",
            "last_modified": "2020-06-04T10:42:53.289Z",
            "locationId": "-Lp2LeDOb8SdpqYU1Wpw",
            "room": "Conference Room roei",
            "spaceType": "2111"

        }
    },
    "next":"IBHSOWB9879GB"
}

Retrieve a list of devices under your organization.
If you want more details on the device object go to the get a single devide by ID endpoint.

This endpoint supports pagination, you can send it the following optional queries:

Query value
limit the maximum number of devices you want to retrieve
index the index of the page you want to get

Every request will send back a key next if there are more results than the ones sent, this value is the index to use in the next request.

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices

parameter value
orgId your organization Id

Get a Specific Device

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
            "_id" : "1d002a000847393039353939",
            "checked" : false,
            "created_at" : 1609846679642,
            "filter_due_date" : "2021-07-05T10:37:59.903Z",
            "floorId" : "-MQSC-a0mTkO_l8OR3FE",
            "groupId" : "-MQHDZ7lpYu0GVPO1n8I",
            "last_modified" : "2021-01-07T14:16:41.211Z",
            "locationId" : "-MQHARok5OezOXzu-pd3",
            "room" : "QA W",
            "ssid" : "Cymotive-Guests ",
            "spaceType" : "2111"
    }
}

Get a single device by its ID.
Data obtained:

key value
_id (unique string)
created_at (ISO string)
filter_due_date (ISO string , a date HTTP REQUESTed to the moment you will have to replace the filter)
floorId (The string id of an existing floor of your organization)
groupId (The string id of an existing group of your organization)
last_modified (ISO string)
locationId (The string id of an existing location of your organization)
room (similar to a name , except it is not unique)
ruleId optional , string , the rule that is link to the group of the device
ssid the wifi name the device is connected to
spaceType (string) an id representing the type of the device space
ward (optional) an id representing the ward of the device (only manadatory for the devices under a location of the hospital subsector)

The spaceType is an id representing the type of the device space, this id is linked to the sector and the subsector of the device location. Only some space types are available under some specific sector and subsector. The list of all the space types available under each sector and subsector can be found here
Note that some sectors and subsectors does not provide any space type , in such cases the device space type can not be set.

The ward is a child of the space type and give more details on the device space. The ward is a mandatory parammeter for the devices under the locations that have a sector Health Care (4) and a subsector Hospital (41), different wards exist under this subsector , more details on the exact list of wards available can be found here.

To get the rule linked to the device, use the get rule linked to a specific device endpoint. * Needs an API key

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}

parameter value
orgId your organization Id
deviceId the device id you want to get

Update a Specific Device

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
    "room": "Living Room"
}

Response

{
    "status": "success",
    "message": "device updated",
    "data": {
        "deviceId": "250025001739303343433135"
    }
}

Update fields of a specific device.
Here is a list of the field you can update :

key value
floorId (unique string of a floor that must be under your organization)
groupId (unique string of a group that must be under your organization)
room (a string same as a name , two device can have the same room under your organization)
spaceType (a string id representing the space type of the device)
ward (a string id representing the ward of the device, only manadatory for the device under a location of the hospital subsector)

Note that :

HTTP REQUEST

PATCH https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}

parameter value
orgId your organization Id
deviceId the device Id you want to update

Reset Ray Filter Due Date of a Specific Device

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "message": "Ray filter due date reseted successfully"
}

This endpoint let you reset the ray filter due date of a specific device.

This date is stored in the device under the key filter_due_date and is used to know when the Ray Filter of the device expired

Calling this endpoint will push this date by 180 days in the future.

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/ray_filter

parameter value
orgId your organization Id
deviceId the device Id you want to reset the ray filter due date

Get Sensor Data of a specific Device

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "succes",
    "data": {
        "aqi": {
            "value": 0
        },
        "pm10": {
            "value": 8,
            "units": "µg/m3"
        },
        "pm25": {
            "value": 0,
            "units": "µg/m3"
        },
        "co": {
            "value": 0.8,
            "units": "ppm"
        },
        "humidity": {
            "value": 45.8,
            "units": "%"
        },
        "temperature": {
            "value": 26,
            "units": "C"
        },
        "co2": {
            "value": 417,
            "units": "ppm"
        },
        "voc": {
            "value": 38,
            "units": "ppb"
        },
        "published_at": "2020-04-20T12:00:00.000Z"
    }
}

Get the device sensor data at the actual moment by its id
Here is a list of sensor :

sensor unit
AQI (Air Quality index a value between 0 and 500 , better when it's less)
pm10 ( big particles ug/m3)
pm25 (bigger particle ug/m3)
co (carbon monoxyde ppm)
humidity (in percentage)
temperature (in °C)
co2 (in ppm)
voc (organic component in ppb)

In addition to this list you will get the key published_at that contains the UTC date-time this sensor data was published

You can pass a list of sensor (separated by a coma) in the query sensor to get only specific sensors
If you don't pass any sensor the server will sent you all the sensor information

You can pass a timezone query (an integer between -14 and 12) to get the published_at date-time in the timezone you want (by default the published_at date-time is in the UTC timezone)

Note that the sensor information you will get in this endpoint correspond to the last sensor data published by the device. If the device is connected the sensor data will be the actual sensor data of the device, if the device is not connected the sensor data will be the last sensor data published by the device before deisconnection (you can check the key pusblished_at to know exactly when the data you get was published).

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/sensors

parameter value
orgId your organization Id
deviceId the device Id you want to get the sensor
query value
sensor (optional) list of sensors you want to get the value off
timezone (optional) timezone applied to the published_at key (default is UTC)

Get Sensor History Data of a specific Device

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": [
        {
            "pm10": {
                "value": 9,
                "units": "µg/m3"
            },
            ...
            "published_at": "2021-05-23T14:27:52.716Z"
        },
        {
            "pm10": {
                "value": 14,
                "units": "µg/m3"
            },
            ...
            "published_at": "2021-05-23T15:30:55.247Z"
        },
        ...
    ]
}

This endpoint let you get an history of all the sensors values between two dates with a specific interval :

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/sensors/history

parameter value
orgId your organization Id
deviceId the device Id you want to get the sensor
query value
start_date ISO string date , start date of the report
end_date ISO string date , end date of the report
interval interval between two report (can be 1h: 1 hour, 30m: 30 minutes, 15m: 15 minutes, 5m: 5 minutes)
sensors (optional) a coma separated list of the sensors you want to retrieve , if not given all the sensors will be sent
timezone (optional), a integer between -12 and 13 the timezone you want to get the report in , if not given the utc time will be used

Set Device Default Mode

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "The mode was updated",
    "data": {
        "mode": "high",
        "deviceId": "25002e001147383531363134"
    }
}

Set device mode (call firmware setSystemMode):
The mode passed as a parameter can be

Auto mode will just stop the high mode , the low mode or the silent mode.
If you want to set the night mode you will have to use the set scheduler endpoint

Note that :

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/mode/{{mode}}

parameter value
orgId your organization Id
deviceId the device Id you want to get the sensor
mode the mode you want to set the device in (can be high/low/auto)

Get Device Mode

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": {
        "actualMode": "night",
        "isSchedulerActive": true
    }
}

Give you the ability to get the current mode
There is 5 different modes :

Check set device mode and set scheduler endpoint to get more information about the modes

The answer will be in the data key and will contain the following keys :

key value
actualMode The actual mode of the device is in right now.
isSchedulerActive true if the scheduler was set in the other case false
defaultMode the mode that the device will take when the scheduler end if it's active , the actualMode and the defaultMode will be the same if the scheduler is inactive

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/mode

parameter value
orgId your organization Id
deviceId the device Id you want to get the mode

Set Device Scheduler

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body Example #1

{
    "high":{
        "start":"09:00",
        "end":"12:00"
    },
     "low":{
        "start":"15:00",
        "end":"18:00"
    },
    "night":{
        "start":"18:00",
        "end":"22:00"
    },
    "silent":{
        "start":"22:30",
        "end":"23:30"
    }
}

Body Example #2

{
      "high":{
        "start":"09:00",
        "end":"12:00"
    },
     "low":{
        "start":"15:00",
        "end":"18:00"
    },
    "night":{
        "start":"22:00",
        "end":"06:00"
    }
}

Body Example #3

{
    "high":{
        "start":"01:00",
        "end":"07:00"
    },
     "low":{
        "start":"18:00",
        "end":"00:00"
    }
}

Response

  {
    "status": "Success",
    "data": {
        "actualMode": "night",
        "isSchedulerActive": true
    }
  }

Give you the ability to set the scheduler for a specific device of your organization
The scheduler let you define mode scheduling , it means that for each mode you will be able to select a time frame when this mode will run during the day
The scheduler can be applied on the following mode :

You have to send in the body an object with a key for each mode you want to define (see the body example #1)
Inside each mode the following keys are needed :

key value
start the start time of the mode HH:mm
end the end time of the mode in format HH:mm

Note that :

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/scheduler

parameter value
orgId your organization Id
deviceId the device Id you want to set the scheduler

Get Device Scheduler

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
      "high":{
        "start":"09:00",
        "end":"12:00"
    },
     "low":{
        "start":"15:00",
        "end":"18:00"
    },
    "night":{
        "start":"22:00",
        "end":"06:00"
    }
}

Give you the ability to get the current scheduler of a specific device
To learn more on what is a scheduler go to the set scheduler endpoint
The object that is returned in the response is the same as the one that have to be sent in the set scheduler endpoint Each key is a mode name and each mode contains the following keys :

key value
start the start time of the mode HH:mm
end the end time of the mode in format HH:mm

Check set device default mode and set scheduler endpoint to get more information about the modes

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/scheduler

parameter value
orgId your organization Id
deviceId the device Id you want to get the scheduler

Delete Device Scheduler

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "The scheduler was deleted",
    "data": {
        "body": {}
    }
}

Give you the ability to delete a scheduler that was set on a specific device

Not that : * If a mode of the scheduler was active when you delete it the device will switch to default mode * If any scheduler is set the endpoint will not send back an error

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/scheduler

parameter value
orgId your organization Id
deviceId the device Id you want to get the scheduler

Set device ssid

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
    "ssid_name":"Highroad",
    "ssid_password":"*******"
}

Response

{
    "status": "Configured successfully",
    "device": "25002e001147383531363134"
}

Give you the ability to change the wi-fi of the device
In the body two keys are needed :

key value
ssid_name a string that is the name of the wi-fi
ssid_password the password of the wi-fi

HTTP REQUEST

PUT https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/setCredentials

parameter value
orgId your organization Id
deviceId the device Id you want to change the ssid

Rules

A rule is an entity of your organization that can be linked to a group.
This entity contains margins which are maximum and minimum limits for sensors.
Once a rule is linked to group , this rule will apply on all the devices under this group. If one of the devices reach the limit defined for the sensors an alert will be trigered through your Business Dashboard.
You can also link a webhook to a rule that will be called each time the limit of the sensors is reached by a device

Add a Rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
  "margins": {
    "co": {
      "active": true,
      "max": 200,
      "min": 20
    },
    "co2": {
      "active": true,
      "max": 1000,
      "min": 10
    },
    "humidity": {
      "active": true,
      "max": 30,
      "min": 25
    },
    "pm10": {
      "active": true,
      "max": 1000,
      "min": 900
    },
    "pm25": {
      "active": true,
      "max": 1000,
      "min": 200
    },
    "temperature": {
      "active": true,
      "max": 50,
      "min": 20
    },
    "voc": {
      "active": true,
      "max": 120,
      "min": 100
    }
  },
  "locationId":"-ntdrloKTWKHifxfpXPJFKEDB",
  "groups" :[
    "-fadrrloHUDBDHifxfSJIEKEDR"
  ],
  "frequency": "24hrs",
  "name": "The name"
}

Response

{
    "status": "Success",
    "message": "Rule Created Wih Success",
    "data": {
        "ruleId": "-N2qtsJ8hKnyVb0z2cOk"
    }
}

Give the ability to create a new rule that can be linked to many groups under a specific location
Data to provide:

key value
name (must be unique among the rules)
margins (must follow the same rule as said in the update a single rule endpoint)
locationId (the location where the rule will be created)
frequency (the frequency of the emails sent by the rule can be realtime, hourly, 24hrs, none)
groups An array containing all the groups the rule will be linked to : On the creation of the rule this array must contain at least one groupId

For more information about the margins key go to update a single rule endpoint

Note that if you link your new rule to a group that already has a rule linked to it , the new rule will override the old one.

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules

parameter value
orgId your organization Id

Get All Rules

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": [
        "-MDAhdwKNzOyGQOq5wN1",
        "-eezxujDOZKJOQbacneBOBZQI",
        "-ughkJFSBOZJapniyYREERQ",
        "-lfibykKOULLGAweuinpwdSRYWUFAJ",
        "-fiyuaFFUWJRmgvhtleVKZ",
        "-mkqfLFJILRHiyyzMVKMEAB"
    ]
}

Get a list of all the ids of the rules of the organization
To get more information on one rule use Get a single rule by ID endpoint

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules

parameter value
orgId your organization Id

Get a Specific Rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
  "_id" : "-MDn_EnJIQhseLKWablp",
  "created_at" : "2020-08-03T09:09:13.510Z",
  "last_modified" : "2020-08-12T12:22:05.440Z",
  "margins" : {
    "co" : {
      "active" : true,
      "max" : 200,
      "min" : 20
    },
    "co2" : {
      "active" : true,
      "max" : 1000,
      "min" : 10
    },
    "humidity" : {
      "active" : true,
      "max" : 70,
      "min" : 30
    },
    "pm10" : {
      "active" : true,
      "max" : 1000,
      "min" : 200
    },
    "pm25" : {
      "active" : true,
      "max" : 1000,
      "min" : 200
    },
    "temperature" : {
      "active" : true,
      "max" : 26,
      "min" : 15
    },
    "voc" : {
      "active" : false,
    }
  },
  "name" : "LEED",
  "organizationId" : "keC9HTwXplOvCc9M1RS82lxX3ax2",
  "frequency" : "none",
  "groups":[
    "-fadrrloHUDBDHifxfSJIEKEDR"
  ]
}

Get a specific rule by id :
data obtained :

key value
_id (unique string)
margins (object Go to update a single rule endpoints for more details)
name (unique string among the rules)
organizationId (string)
frequency (the frequency of the emails sent by the rule can be realtime, hourly, 24hrs, none)
groups An array containg all the group ids the rule is linked to , note that this array can be empty

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}

parameter value
orgId your organization Id
ruleId the rule Id you want to get

Update a Specific Rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
 "margins":{
     "co2":{
         "active":true ,
          "max":50 ,
           "min":30
           }
        }
    }

Response

{
    "status": "Success",
    "message": "rule updated with success",
    "data": {}
}

Update a specific rule by id
Here is a list of the differents keys that you can update :

key value
name (unique string among rules)
margins (object)
frequency (the frequency of the emails sent by the rule can be realtime, hourly, 24hrs, none)
groups An array containg all the group ids the rule will be linked to.

About the margins :
Each key in the margin object must be a valid sensor name , here is the list :

sensor unit
co ppm
co2 ppm
humidity %
pm10 ug/m3
pm25 ug/m3
temperature °C
voc ppb
aqi between 0 and 500 less is better

Each sensor in the margins object can have the folowing keys :

key value
min (number minimum value)
max (number maximum value)
active (boolean , is the rule will trigger on this sensor ?)

A specific sensor can contain only the key min or only the key max or both
You need at least one sensor in the margin object .

Note that :

HTTP REQUEST

PATCH https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}

parameter value
orgId your organization Id
ruleId the rule Id you want to update

Get the devices linked to a specific rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": {
        "3b002c001047383531363134": {
            "_id": "3b002c001047383531363134",
            "created_at": "2020-05-14T09:22:58.431Z",
            "filter_due_date": "2020-10-14T09:22:58.431Z",
            "floorId": "-M8op_BSEnPr4ccQoITD",
            "groupId": "null",
            "last_modified": "2020-06-07T12:29:54.303Z",
            "locationId": "-Lp2LeDOb8SdpqYU1Wpw12",
            "room": "Living Room",
            "mode": {
                "current_mode": "low",
            },
        },
        "540024000c51393034363135": {
            "_id": "540024000c51393034363135",
            "created_at": "2020-05-14T09:22:58.431Z",
            "floorId": "null",
            "groupId": "null",
            "last_modified": "2020-11-14T09:22:58.431Z",
            "locationId": "null",
            "mode": {
                "current_mode": "low",
            },
            "room": "Living Room"
        }
    }
}

This endpoint let you retrieve all the devices linked to a specific rule

If you want more information on the device object got to get a specific device endpoint

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}/devices

parameter value
orgId your organization Id
ruleId the rule Id linked to the devices

Get rule linked to specific device

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": {
        "_id": "-bupzfwNGMBJHtzftRYCIUMD",
        "created_at": "2021-05-25T15:43:40.814Z",
        "last_modified": "2021-05-25T15:43:40.814Z",
        "margins": {
            "co": {
                "active": false
            },
            "co2": {
                "active": false
            },
            "humidity": {
                "active": false
            },
            "pm10": {
                "active": false
            },
            "pm25": {
                "active": false
            },
            "temperature": {
                "active": true,
                "max": 50,
                "min": 20
            },
            "voc": {
                "active": false
            }
        },
        "name": "rule test#3",
        "organizationId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1"
    }
}

This endpoint let you retrieve the rule linked to a specific device

If you want more information on the rule object got to get-a-specific-rule endpoint

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/devices/{{deviceId}}/rules

parameter value
orgId your organization Id
deviceId the device Id linked to a rule

Get the groups linked to a specific rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": {
        "-heoqzpvwHULXBSNksvhzPHVDI": {
            "_id": "-heoqzpvwHULXBSNksvhzPHVDI",
            "created_at": "2021-06-10T07:46:04.910Z",
            "last_modified": 1623323198,
            "locationId": "-itjdPSZDWfobilnaQBVVTWS",
            "name": "my good group",
            "ruleId": "-yeydwhadIUQNTtijlftbWQH"
        },
        "-icyevnPMNKJkjwuwrvBZTIC": {
            "_id": "-icyevnPMNKJkjwuwrvBZTIC",
            "created_at": "2021-06-10T11:37:07.457Z",
            "last_modified": 1623325051,
            "locationId": "-jhnfngvRNQFHgxgfgVOBAJBCT",
            "name": "my perfect group",
            "ruleId": "-yeydwhadIUQNTtijlftbWQH"
        }
    }
}

This endpoint let you retrieve all the groups linked to a specific rule

If you want more information on the group object got to get a specific group endpoint

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}/groups

parameter value
orgId your organization Id
ruleId the rule Id linked to the groups

Remove webhooks from a rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "message": "All the webhooks were unlinked from the rule",
    "data": {
        "ruleId": "-bagllCEFPTBKtkiqfbJVFY"
    }
}

This endpoint remove all the webhooks from a given rule
In the rule object the webhooks ids list will be remove
Inside each webhook that was linked to the rule , the rule Id will be remove from the array of rules

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}/webhooks

parameter value
orgId your organization Id
ruleId the rule Id you want to remove the webhooks

Delete a Specific Rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
  "status" :"success" , 
  "message" :"rule deleted" , 
  "ruleId":"-MLndsnds55sq"
}

Remove an existing rule by id

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}

parameter value
orgId your organization Id
ruleId the rule Id you want to delete

Webhooks

Request Body

{
    "rule_id": "12345",
    "created_at": "2021-06-22T13:11:31.614Z",
    "device_id": "5430583",
    "event": "auradb",
    "margins": {
      "co" : {
        "active" : false
      },
      "co2" : {
        "active" : false
      },
      "humidity" : {
        "active" : false
      },
      "pm10" : {
        "active" : false
      },
      "pm25" : {
        "active" : false
      },
      "temperature" : {
        "active" : true,
        "max" : 30
      },
      "voc" : {
        "active" : false
      }
    },
    "sensors": {
      "aqi":  100,
      "pm10": 8,
      "pm25": 3,
      "co": 0.8,
      "humidity": 45.8,
      "temperature":34,
      "co2": 417,
      "voc": 38
    },
    "rules_results": {
      "aqi": { "max": null, "min": null },
      "co": { "max": null, "min": null },
      "co2": { "max": null, "min": null },
      "humidity": { "max": null, "min": null },
      "pm10": { "max": null, "min": null },
      "pm25": { "max": null, "min": null },
      "temperature": { "max": true, "min": null },
      "voc": { "max": null, "min": null }
    }
  }

A webhook can be created only through the Business API and can be linked to many rule.
In order to work a webhook should be :

In these conditions if one of the rule is triggered the url set in the webhook will be called The request method will be POST and the data send in the body will be the one under Request Body at the right

Here are some details about the data send in the body :

Key Value
ruleId The rule ID triggered
created_at The ISO string date giving the exact moment when the rule was triggered
device_id The device that triggered this rule
event The name of the event will always be auradb
margins The margins of the rule trigerred , go to the update a single rule endpoint to get more information on this object
sensors the value of the different sensors at the moment when the rule was triggered , go to the Get Sensor Data of a specific Device to get informations on the unit of each sensor
rules_results give an json object with for each sensors 2 different keys :
  • min : true only if the the rule was triggered because of the minimum value of this sensor , else null
  • max : true only if the the rule was triggered because of the maximum value of this sensor , else null

A rule can also be linked to many webhooks

Get list of webhooks

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "-dJUKUAKRsgspvqWFEV": {
            "created_at": "2020-08-19T11:59:03.083Z",
            "id": "-dJUKUAKRsgspvqWFEV",
            "is_active": true,
            "last_modified": "2020-08-19T13:28:47.896Z",
            "orgId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
            "rules": [
                "-MDAhdwKNzOyGQOq5wN1"
            ],
            "url": "https://webhook.site/7bb3c3d2-5087-4ef6-842d-b12663e1ff41"
        },
        "-ixurjpklRJYOXNhbvlsreAATEPVI": {
            "created_at": "2020-08-19T12:19:22.378Z",
            "id": "-ixurjpklRJYOXNhbvlsreAATEPVI",
            "is_active": true,
            "last_modified": "2020-08-19T12:19:22.378Z",
            "orgId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
            "url": "https://google.com"
        },
        "-sxgtsPZSHfrsteagdDBSKJZ": {
            "created_at": "2020-08-19T12:47:19.429Z",
            "id": "-sxgtsPZSHfrsteagdDBSKJZ",
            "is_active": true,
            "last_modified": "2020-08-19T12:47:19.429Z",
            "orgId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
            "url": "https://go.com"
        },
        "-wdiphiskRDPOKQWubJCICDH": {
            "created_at": "2020-08-19T12:40:57.564Z",
            "id": "-wdiphiskRDPOKQWubJCICDH",
            "is_active": true,
            "last_modified": "2020-08-19T13:29:08.697Z",
            "orgId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
            "rules": [
                "-MDAhdwKNzOyGQOq5wN1"
            ],
            "url": "https://goog.com"
        }
    }
}

Get the list of webhooks specific to the organization
If you want more information on the webhook object got to the get a specific webhook by id endpoint

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/webhooks

parameter value
orgId your organization Id

Get a specific webhook by id

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "created_at": "2020-08-19T11:59:03.083Z",
        "id": "-dJUKUAKRsgspvqWFEV",
        "is_active": true,
        "last_modified": "2020-08-19T13:28:47.896Z",
        "orgId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
        "rules": [
            "-MDAhdwKNzOyGQOq5wN1"
        ],
        "url": "https://webhook.site/7bb3c3d2-5087-4ef6-842d-b12663e1ff41"
    }
}

Get a specific webhook by his id , only if the organization is the owner of this webhook
Data obtained:

key value
created_at (ISO string)
_id (unique string)
is_active (boolan , if it is to false , the webhook will not be called even if he is linked to a rule)
last_modified (ISO string)
orgId ( string :the organizatio Id of the the organization that created this webhook)
rules (optional : an array of rules ids the webhook is linked to , if the webhook is not linked to any rule this array does

not exist) url |(string: the url to call)

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/webhooks/{{webhookId}}

parameter value
orgId your organization Id
webhookId The webhook Id you want to get

Get list of webhooks linked to a rule

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "empty": false,
        "list": [
            {
                "created_at": "2020-08-31T14:49:52.907Z",
                "id": "-xxtBGPYSOLIwpmdhcdlhFDMIZDG",
                "is_active": true,
                "last_modified": "2020-09-01T10:23:12.576Z",
                "orgId": "t1WspsDLvndfvptjG6JV8a28wXm1",
                "rules": [
                    "-ryakpyubrRNMSTcccogmqHFMUAZE"
                ],
                "url": "https://mywebsite.cm"
            },
            {
                "created_at": "2020-09-01T09:27:33.057Z",
                "id": "-cykvfnmHKNWgjzcRZZE",
                "is_active": true,
                "last_modified": "2020-09-01T10:28:13.889Z",
                "orgId": "t1WspsDLvndfvptjG6JV8a28wXm1",
                "rules": [
                    "-ryakpyubrRNMSTcccogmqHFMUAZE"
                ],
                "url": "https://youtube.com"
            }
        ]
    }
}

Send back the list of webhooks link to a specific rule For more information on the webhook object go to the Get a specific webhook by id endpoint

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}/webhooks

parameter value
orgId your organization Id
ruleId The ruleId you want to get the webhooks of

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": [
        {
            "_id": "-qnhnomDIOHHfkwlwhKARLLH",
            "created_at": "2020-09-02T08:57:28.905Z",
            "floorId": "-wxfmnKHQOZKDanlkmlijBBNYQE",
            "groupId": "-uuiquuCYOTbgfvwSHADZJ",
            "last_modified": "2020-09-02T08:57:28.905Z",
            "locationId": "-mxmrbDBDQKQWArpehxkWNTSDN",
            "margins": {
                "co": {
                    "active": true,
                    "max": 40,
                    "min": 14
                },
                "co2": {
                    "active": false
                },
                "humidity": {
                    "active": true,
                    "max": 30,
                    "min": 25
                },
                "pm10": {
                    "active": true,
                    "max": 1000,
                    "min": 900
                },
                "pm25": {
                    "active": false
                },
                "temperature": {
                    "active": false
                },
                "voc": {
                    "active": false
                }
            },
            "name": "my rule",
            "organizationId": "t1WspsDLvndfvptjG6JV8a28wXm1",
            "webhooks": [
                "-cykvfnmHKNWgjzcRZZE",
                "-xxtBGPYSOLIwpmdhcdlhFDMIZDG"
            ]
        },
        {
            "_id": "-lndslMKGAFHiisbrsSQNO",
            "created_at": "2020-09-02T08:59:25.066Z",
            "floorId": "-wxfmnKHQOZKDanlkmlijBBNYQE",
            "groupId": "-uuiquuCYOTbgfvwSHADZJ",
            "last_modified": "2020-09-02T08:59:25.066Z",
            "locationId": "-mxmrbDBDQKQWArpehxkWNTSDN",
            "margins": {
                "co": {
                    "active": true,
                    "max": 40,
                    "min": 14
                },
                "co2": {
                    "active": false
                },
                "humidity": {
                    "active": true,
                    "max": 30,
                    "min": 25
                },
                "pm10": {
                    "active": false
                },
                "pm25": {
                    "active": true,
                    "max": 1000,
                    "min": 200
                },
                "temperature": {
                    "active": false
                },
                "voc": {
                    "active": false
                }
            },
            "name": "my new rule",
            "organizationId": "t1WspsDLvndfvptjG6JV8a28wXm1",
            "webhooks": [
                "-xxtBGPYSOLIwpmdhcdlhFDMIZDG"
            ]
        }
    ]
}

Send back the list of rules under a specific webhook
For more information on the rule object go to the Get a specific rule by id endpoint
Note that :

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/webhooks/{{webhookId}}/rules

parameter value
orgId your organization Id
webhookId The webhook Id you want to get the rules of

Create a Webhook

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

 {
    "url":"https://mywebsite.com"
}

Response

{
    "status": "success",
    "message": "webhook added",
    "data": {
        "url": "https://mywebsite.com",
        "created_at": "2020-08-25T09:50:07.572Z",
        "last_modified": "2020-08-25T09:50:07.572Z",
        "is_active": true,
        "orgId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
        "id": "-yfrqksaNSBCisyeCM"
    }
}

Create a webhook in the webhooks list:
The key needed is :

Key Value
url string : A valid url that will be called by the webhook

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/webhooks

parameter value
orgId your organization Id

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": {
        "success": true,
        "message": "webhooks - rule link updated"
    }
}

Link a webhook to a specific rue by id
Note that it will create a webhooks array in the rule object containing all the webhooks ids this rule is linked to
It will al so create a rule array inside the webhook object conatinig all the rule ids the webhook is linked to

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}/webhooks/{{webhookId}}

parameter value
orgId your organization Id
ruleId the rule you want to link to the webhook
webhookId the webhook you want to link to the rule

Enable / disable a webhook

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "state of the webhook changed"
}

Enable or disable a webhook by passing as state on or off
A disabled webhook will not be called when the rules linked to it are broken

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/webhooks/{{webhookId}}/{{state}}

parameter value
orgId your organization Id
webhookId the webhook you want to enable/disable
state the updated state of a webhook , on for enable and off for disable

Update a webhook

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

{
  "url":"https://newurl.com"
}

Response

{
    "status": "success",
    "message": "webhook updated",
    "data": {
        "created_at": "2020-08-19T11:59:03.083Z",
        "id": "-dJUKUAKRsgspvqWFEV",
        "is_active": false,
        "last_modified": "2020-08-25T10:25:53.057Z",
        "orgId": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
        "rules": [
            "-ktqufHOTPCbyxyuXWCMPDB"
        ],
        "url": "https://newurl.com"
    }
}

Update a specfic webhook
The keys that can be updated using this webhook are :

Key Value
url string : A valid url that will be called by the webhook

HTTP REQUEST

PATCH https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/webhooks/{{webhookId}}

parameter value
orgId your organization Id
webhookId the webhook you want to update

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": {
        "success": true,
        "message": "webhooks - rule link updated"
    }
}

Unlink a webhook from a rule.
This rule will no longer trigger this webhook when it will be broken
The Webhook Id will be deleted from the webhooks arrays inside the rule specified
The rule Id given will be deleted from the webhook`s rules array specified

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}/webhooks/{{webhookId}}

parameter value
orgId your organization Id
webhookId the webhook you want to unlink from the rule
ruleId the rule you want to unlink from the webhook

Delete a webhook

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "webhook removed"
}

Delete a webhook from the webhooks list
This webhook will also be deleted from all the webhooks lists in the rules he was linked too

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/rules/{{ruleId}}/webhooks/{{webhookId}}

parameter value
orgId your organization Id
webhookId the webhook you want to delete

Tasks

A task is created automaticaly under a location for a specfic device, the task can have different target : * buy : to buy a new ray filter * ray : to replace a ray filter of a device * pre : to wash a pre filter of a device These tasks are created by the system whenever you create a new device or change information about a device. The execution time of the pre filter tasks will be determined by the reminder Day and the reminder Interval of the device's floor.

Get All Tasks

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": {
        "MDE2KDeYj5mHOlORAAur": {
            "emailTo": "kim.carlson@healthfirst.com",
            "floorName": "Floor 1",
            "deviceId": "2d004800114738353363134",
            "_id": "MDE2KDeY5mHOlORAAur",
            "organizationId": "tSyIJ9q6VRS2K2dFshjkgZCUV93",
            "floorId": "-MQkcvgb-59Db0RhFPdg",
            "actionType": "Clean pre filter",
            "createdAt": 1652884468148,
            "target": "pre",
            "status": false,
            "locationId": "-MQkcrVZ66iVKyrb3RK",
            "assignee": "dBgcH730pFUX22zQt9X8QpU9kg2",
            "emailSent": false,
            "executionTime": "2022-06-10T00:00:00.000Z",
            "deviceName": "Marketing"
        },
        "PRXWUnC7Qe5lHtCPHttx": {
            "emailSent": false,
            "floorName": "Floor 1",
            "actionType": "Clean pre filter",
            "target": "pre",
            "status": false,
            "deviceId": "30003d00014739313234438",
            "floorId": "-MQkcvgb-59Db0RhFPdg",
            "organizationId": "tSyIJU9qVRS2K2dFshjkgZCUV93",
            "emailTo": "kim.carlson@healthfirst.com",
            "deviceName": "Demo Device",
            "executionTime": "2022-06-10T00:00:00.000Z",
            "_id": "PRXWUnC7Qe5lHtCPHttx",
            "createdAt": 1652884468148,
            "assignee": "tSyIJ9q6VRS2K2dFshjkgZCUV93",
            "locationId": "-MQkcrVZ66iVKyrb3RK"
        }
    }
}

This endpoint let you retrieve all the tasks of your organization.
To learn more about a strcuture of task go to the get a single task by id endpoint.

Note that :

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/tasks

Parameter value
orgId your organization Id
Query Parameter value
minExecutionTime (mandatory) The minimum execution time of the task retrieved
maxExecutionTime (mandatory) The maximum execution time of the task retrieved
locationId (optional) let you get all the task under a specfic location by providing the location id the task is linked to
status (optional) let you filter by task status (true or false)
target (optional) let you filter by task target (buy, ray or pre)

Get a single Task

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": { 
            "emailTo": "kim.carlson@healthfirst.com",
            "floorName": "Floor 1",
            "deviceId": "2d004800114738353363134",
            "_id": "MDE2KDeY5mHOlORAAur",
            "organizationId": "tSyIJ9q6VRS2K2dFshjkgZCUV93",
            "floorId": "-MQkcvgb-59Db0RhFPdg",
            "actionType": "Clean pre filter",
            "createdAt": 1652884468148,
            "target": "pre",
            "status": false,
            "locationId": "-MQkcrVZ66iVKyrb3RK",
            "assignee": "dBgcH730pFUX22zQt9X8QpU9kg2",
            "emailSent": false,
            "executionTime": "2022-06-10T00:00:00.000Z",
            "deviceName": "Marketing"
    }
}

This endpoint let you retrieve a specifci task by id.
The structure of a task is :

Key Value
_id The id of the task
organizationId The id of the organization
floorId The id of the floor this task is linked to
floorName The name of the floor
locationId The id of the location this task is linked to
deviceId The id of the device this task was created for
deviceName The name of the device
actionType A short description of the action to do
target The target of the task can be : buy (buy a new ray filter for the device), ray (replace the ray filter for the device), pre (was the pre filter for the device)
status The status of the task : true (task is done), false (task is not done)
emailTo The email of the assignee (the customer) who will receive email notification abot this task
emailSent The status of the email : true (email was sent), false (email was not sent)
executionTime The execution time of the task , when the task must be done
createdAt The creation date of the task
doneTime (only if a task is done) The date when the task was set to done

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/tasks/{{taskId}}

Parameter value
orgId your organization Id
taskId the id of the task you want to retrieve

Set a Task as done

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
        "status": "Success",
        "message": "Task set to done with success"
}

This endpoint let you set a task as done.

Note that :

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/tasks/{{taskId}}/done

Parameter value
orgId your organization Id
taskId the id of the task you want to retrieve

Update the assignee of a Task

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
        "status": "Success",
        "message": "Task assignee updated"
}

This endpoint let you update the assignee of a Task.
The body must contains the keys :

key value
assignee the id of the customer who will be assigned to the task (the customer must exist under the same location as as the task)
assign_to_future_tasks (optional) if true, all the future tasks with the same deviceId and target than the updated task will be assigned to the new assignee. If false, only the current task will be assigned to the new assignee.

Note that :

Customers

A customer is a user that can access your Businness Dashboard.
He can access to multiple locations and can have different roles under each locations. A customer is created per location.

Get all customers

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Success",
    "data": {
        "1382HQIflXUEBZGkjLdFE8uubSs1": {
            "_id": "1382HQIflXUEBZGkjLdFE8uubSs1",
            "created_at": 1598536224063,
            "email": "gulit@gmail.com",
            "last_modified": 1598536224063,
            "locations": {
                "-spmmbkIPRYQHFFGrzwkEZYCCIDK": {
                    "_id": "-spmmbkIPRYQHFFGrzwkEZYCCIDK",
                    "date_added":1650287758362,
                    "roles": [
                      "viewer"
                    ],
                    "settings":{
                      "subscribed_alerts" : true,
                      "subscribed_missions" :true
                  }
                },
                "-tcthvbMQGARTKVsumsagjAGBZVGP": {
                    "_id": "-tcthvbMQGARTKVsumsagjAGBZVGP",
                    "date_added":1650287758362,
                    "customer_role": [
                      "it"
                    ],
                    "settings":{
                      "subscribed_alerts" : true,
                      "subscribed_missions" :true
                  }
                }
            },
            "name": "Jane Doe"
        },
        "2slPFwveYmce2MoqbCvrSbLl4em1": {
            "_id": "2slPFwveYmce2MoqbCvrSbLl4em1",
            "created_at": 1611507062340,
            "email": "john@doe.com",
            "last_modified": 1611569112,
            "locations": {
                "-tcthvbMQGARTKVsumsagjAGBZVGP": {
                    "_id": "-tcthvbMQGARTKVsumsagjAGBZVGP",
                    "date_added":1650287758362,
                    "customer_role": [
                      "viewer"
                    ],
                    "settings":{
                      "subscribed_alerts" : true,
                      "subscribed_missions" :false
                  }
                }
            },
            "name": "John Doe"
        },
    }
}

This endpoint give you the ability to get the list of all the customers.
For more information on the customer Object go the Get a single customer by ID endpoint.
You can add to this request the following query parameters:

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/customers

Parameter value
orgId your organization Id
Query Parameter value
locationId a filter to get only the customers who has acces to a specific location
role a filter to get only the customers who has a specific role

Get a single customer by ID

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "Succes",
    "data": {
        "_id": "1a7MObmW5nZG6BJ1ZHEZZn61fsz1",
        "created_at": 1594733578086,
        "email": "johndoe@email.com",
        "last_modified": "2020-07-14T13:34:42.963Z",
        "name": "john doe",
        "locations": {
            "-spmmbkIPRYQHFFGrzwkEZYCCIDK": {
                "_id": "-spmmbkIPRYQHFFGrzwkEZYCCIDK",
                "date_added":1650287758362,
                "roles": [
                  "viewer"
                ],
                "settings":{
                    "subscribed_alerts" : true,
                    "subscribed_missions" :true
                }
            },
            "-tcthvbMQGARTKVsumsagjAGBZVGP": {
                "_id": "-tcthvbMQGARTKVsumsagjAGBZVGP",
                "date_added":1650287758362,
                "roles": [
                  "it"
                ],
                "settings":{
                    "subscribed_alerts" : true,
                    "subscribed_missions" :false
                }
            }
        },
    }
}

Get a single customer by ID
Data retrieved :

key value
_id the unique id of the customer
created_at ISO string
last_modified ISO string
email string :email of the customer
name string name of the customer , two customers can have the same name)
locations list of locations where the user have a role.
locations[locationId]._id The id of the location.
locations[locationId].date_added the UNIX timestamp of the date the customer was added to the location.
locations[locationId].roles the roles of the customer in the location.
locations[locationId].subscribed_alerts boolean, true if the customer is subscribed to alerts from the rules under this location.
locations[locationId].subscribed_missions boolean, true if the customer is subscribed to the tasks from the rules under this location.

This endpoint let you retrieved a customer with all the locations he has access to.

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/customers/{{customerId}}

parameter value
orgId your organization Id
customerId the customer you want to get

Create a customer for a location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

  {
{
    "name":"John",
    "email":"john@doe.com",
    "roles":[
        "admin"
    ],
    "subscriptions":[
        "tasks" , "rules"
    ],
    "locationId":"hoidedioehIhebde8vbj"
}
}  

Response

{
    "status": "success",
    "message": "Customer added",
    "data": {
        "customer_id": "6CdBg1ctzSY8rjrWKwel7Ii9sFg2"
    }
}

Give the ability to create a customer for a specific location of your organization

You need to provide the following keys

key value
locationId The location id of the location you want to add the customer to
name The customer name , must be at least 3 characters long
email The email of the customer
roles Array : The roles the customer will have under this location, can be : admin, it, technician and finance
subscriptions Array : The subscriptions the customer will have access to, can be : tasks, rules

Note that if you already created a customer with the same email under another location of your Organization, the customer will only be added to the new location specified in the body of the request.

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/customers

parameter value
orgId your organization Id

Update a customer for a location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Body

  {
    "roles":[
        "admin"
    ],
    "locationId":"hoidedioehIhebde8vbj"
}  

Response

{
    "status": "Success",
    "message": "customer updated successfully",
    "data": {}
}

Give the ability to update the customer of a specfic location

You can provide the following keys :

key value
locationId mandatory, The location id of the customer.
name optional The new customer name , must be at least 3 characters long
roles optional Array : The new roles the customer will have under this location, can be : admin, it, technician and finance
subscriptions optional Array : The new subscriptions the customer will have access to, can be : tasks, rules

Note that all the keys provided here will overwrite the old ones of the customer.

HTTP REQUEST

POST https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/customers

parameter value
orgId your organization Id

Delete a customer form a location

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "message": "customer deleted"
}

Give you the ability to delete a customer by his Id.

Note that all the tasks that this customer was assigned to will be reassigned to available customers under this location.

HTTP REQUEST

DELETE https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}/customers/{{customerId}}

parameter value
orgId your organization Id
customerId the customer you want to delete
query value
locationId your locationId

Organizations

Get a single organization by ID

Headers

  {
    "Authorization": "Bearer API_KEY"
  }

Response

{
    "status": "success",
    "data": {
        "_id": "YhGd6IE9lDcEuDgMCiS3IhL18Ym1",
        "created_at": "2020-05-14T10:22:58.431Z",
        "devices": {
            "1f002e000a47363433353735": {
                "_id": "1f002e000a47363433353735",
                "created_at": "2020-05-14T09:22:58.431Z",
                "filter_due_date": "2020-10-14T09:22:58.431Z",
                "floorId": "-M8tVY8qZaSrXtrUzG80",
                "groupId": "-M8tcHwxWOGJtVAZI14G",
                "last_modified": "2020-06-07T12:29:54.303Z",
                "locationId": "-Lp2LeDOb8SdpqYU1Wpw12",
                "room": "Living Room"
            },
            "25002e001147383531363134": {
                "_id": "25002e001147383531363134",
                "created_at": "2020-05-14T09:22:58.431Z",
                "filter_due_date": "2020-10-14T09:22:58.431Z",
                "floorId": "-M8tVY8qZaSrXtrUzG80",
                "floor_name": "test1112",
                "groupId": "-M8tcHwxWOGJtVAZI14G",
                "last_modified": "2020-06-04T10:42:53.289Z",
                "locationId": "-Lp2LeDOb8SdpqYU1Wpw",
                "room": "Conference Room roei"
            }
            },
        "email": "jbronaldo131@gmail.com",
        "language":"en",
        "floors": {
            "-M8tVY8qZaSrXtrUzG80": {
                "_id": "-M8tVY8qZaSrXtrUzG80",
                "created_at": "2020-06-03T09:27:55.319Z",
                "last_modified": "2020-06-03T09:27:55.319Z",
                "locationId": "-Lp2LeDOb8SdpqYU1Wpw12",
                "name": "floor ne",
                "reminderDay": "1"
            },
            "-MAQ4XeE2mdDkDmq2bva": {
                "_id": "-MAQ4XeE2mdDkDmq2bva",
                "created_at": "2020-06-22T08:12:42.549Z",
                "last_modified": "2020-06-22T08:12:42.549Z",
                "locationId": "-Lp2LeDOb8SdpqYU1Wpw12",
                "name": "floor 2",
                "reminderDay": "1"
            },
        },
        "groups": {
            "-M8tcHwxWOGJtVAZI14G": {
                "_id": "-M8tcHwxWOGJtVAZI14G",
                "created_at": "2020-06-03T10:01:46.121Z",
                "last_modified": "2020-06-03T10:01:46.121Z",
                "locationId": "-Lp2LeDOb8SdpqYU1Wpw13",
                "name": "test32"
            },
            "-M8tcVdtAlnqpHljBiVq": {
                "_id": "-M8tcVdtAlnqpHljBiVq",
                "created_at": "2020-06-03T10:02:42.246Z",
                "last_modified": "2020-06-03T10:02:51.571Z",
                "locationId": "-Lp2LeDOb8SdpqYU1Wpw12",
                "name": "build123"
            }
        },
        "last_login": "2020-05-14T09:22:58.431Z",
        "last_modified": "2020-05-14T09:22:58.431Z",
        "locations": {
            "-Lp2LeDOb8SdpqYU1Wpw12": {
                "_id": "-Lp2LeDOb8SdpqYU1Wpw12",
                "address": "Hamiphras 6",
                "altitude": 0,
                "aura_daily_report": "true",
                "bad_aqi_event": false,
                "city": "Yavne",
                "components": {
                    "administrative_area": "Merkaz",
                    "country_iso_3": "ISR",
                    "locality": "Yavne",
                    "postal_code": "81000",
                    "postal_code_short": "81000",
                    "premise": "6",
                    "premise_number": "6",
                    "sub_administrative_area": "Rehovot",
                    "thoroughfare": "Hamifras",
                    "thoroughfare_name": "Hamiphras"
                },
                "created_at": 1577098253453,
                "last_modified": 1577098253453,
                "latitude": 31.86777,
                "longitude": 34.733457,
                "name": "Building 2",
                "state": "Israel",
                "zipcode": "8101306"
            }
        },
        "name": "Aura Business",
        "temperature_unit": "C",
        "time_format":"ampm"
    }
}

Give your organizations information The organization object will get the following keys :

key value
id a string , the id of the organization
devices an object , the list of devices of the organization
locations an object , the list of locations of the organization
floors an object , the list of floors of the organization
groups an object , the list of groups of the organization
created_at an ISO date , the date of the organization creaation
last_modified an ISO date , the last time the organization object was modified
last_login an ISO date , the last time the owner logged in on the Aura Web Platform
name a string , the name of the organization
email a string , the email of the owner of the organization
language a string , the language selected by the owner of the organization in ALPHA-2 format
temperature_unit a string , the temperature unit selected by the owner of the organization can be C or F
time_format a string , the time format selected by the owner of the organization can be ampm or 24hrs

HTTP REQUEST

GET https://aura-b2b-rest.web.app/api/v1/org/{{orgId}}

parameter value
orgId your organization Id

Sectors, Subsectors and Space Types

Here is a table describing all the sectors and subsectors available under each location of your Organization. In addition to it a space type list will be provided for each subsector.
Every device must have a space type (if it is available) related to the sector and the subsector of it's parent location.

For the Hospitals subsector a wards list will also be provided for each space type.

sector id sector description subsector
1 Hospitality
subsector id subsector description spaceType
11 Hotel
Click Here to see available spaceTypes
spaceType id spaceType description
111 Dining Area
112 Conferences Room
113 Lounge
114 Reception
115 Hotel Room
116 Lobby
12 Food & Drink
Click Here to see available spaceTypes
13 Casino
Click Here to see available spaceTypes
spaceType id spaceType description
131 Bathroom
132 Entrance
133 Office
134 Main Space
14 Movie Theater
Click Here to see available spaceTypes
spaceType id spaceType description
141 Bathroom
142 Entrance
143 Office
144 Main Space
15 Museum / Cultural Center
Click Here to see available spaceTypes
spaceType id spaceType description
151 Bathroom
152 Entrance
153 Office
154 Main Space
16 Karaoke Club
Click Here to see available spaceTypes
spaceType id spaceType description
161 Bathroom
162 Entrance
163 Office
164 Main Space
17 Arcade
Click Here to see available spaceTypes
spaceType id spaceType description
171 Bathroom
172 Entrance
173 Office
174 Main Space
18 Night Club
Click Here to see available spaceTypes
spaceType id spaceType description
181 Bathroom
182 Entrance
183 Office
184 Main Space
2 Education
subsector id subsector description spaceType
21 Kindergarten
Click Here to see available spaceTypes
spaceType id spaceType description
211 Classroom
212 Common Area
213 Dining Room
214 Game Room
22 School
Click Here to see available spaceTypes
spaceType id spaceType description
221 Classroom
222 Hall
223 Library
224 Teacher Lounge
23 College / University
Click Here to see available spaceTypes
spaceType id spaceType description
231 Boardroom
232 Dorms
233 Lecture Hall
234 Office
235 Classroom
236 Cafeteria
237 Laboratory
238 Library
239 Locker Room
3 Transportation
subsector id subsector description spaceType
31 Bus
Click Here to see available spaceTypes
spaceType id spaceType description
311 Public Bus
312 School Bus
313 Bus Station
32 Train
Click Here to see available spaceTypes
spaceType id spaceType description
321 Railroad Car
322 Train Station
323 Train Platform
33 Aviation
Click Here to see available spaceTypes
spaceType id spaceType description
331 Airplane
332 Airport
333 Boarding Gate
334 Duty Free
335 Business Lounge
34 Ship / Yacht / Cruise Line
Click Here to see available spaceTypes
35 Central Station
Click Here to see available spaceTypes
4 Healthcare
subsector id subsector description spaceType
41 Hospital
Click Here to see available spaceTypes

For Hospital subsector a ward is also required

spaceType id spaceType description
411 Nurses Station
412 Hospitalization Room
413 Board Room
414 Waiting Area
415 Office
42 Health Center
Click Here to see available spaceTypes
43 Senior Living Facility
Click Here to see available spaceTypes
spaceType id spaceType description
431 Tenet's Room
432 Lobby
433 Lecture Hall
434 Game Room
435 Dining Room
436 Offices
5 Fitness & Wellness
subsector id subsector description spaceType
51 Fitness Studio
Click Here to see available spaceTypes
spaceType id spaceType description
511 Lobby
512 Studio Space
513 Lockers Room
514 Bathroom
515 Cafeteria
516 Treatment Room
52 Gym
Click Here to see available spaceTypes
spaceType id spaceType description
521 Lobby
522 Studio Space
523 Lockers Room
524 Bathroom
525 Cafeteria
526 Treatment Room
53 Country Club
Click Here to see available spaceTypes
spaceType id spaceType description
531 Lobby
532 Studio Space
533 Lockers Room
534 Bathroom
535 Cafeteria
536 Treatment Room
54 Yoga / Pilates
Click Here to see available spaceTypes
spaceType id spaceType description
541 Lobby
542 Studio Space
543 Lockers Room
544 Bathroom
545 Cafeteria
546 Treatment Room
55 Spa
Click Here to see available spaceTypes
spaceType id spaceType description
551 Lobby
552 Studio Space
553 Lockers Room
554 Bathroom
555 Cafeteria
556 Treatment Room
6 Real Estate
subsector id subsector description spaceType
61 Commercial
Click Here to see available spaceTypes
spaceType id spaceType description
611 Meeting Room
612 Boardroom
613 Lobby
614 Office
615 Common Area
616 Open Space
617 Dining Room
618 Cafeteria
62 Residental
Click Here to see available spaceTypes
spaceType id spaceType description
621 Lobby
622 Gym
623 Living Room
624 Bedroom
625 Home Office
626 Kitchen
627 Bathroom
63 Shopping Center
Click Here to see available spaceTypes

Hospital Wards

Each device under a location assigned to the subsector hospital (available under the sector Healthcare) sector will also be assigned to a ward Here is the list of wards available

ward id ward description
41A Surgical
41B Internal
41C Pediatric
41D Intensive Care Unit (ICU)
41E Emergency Room
41F Oncology
41G Cardiology
41H Neurology
41I Hematology
41J Gastroenterology
41K Gynecology
41L Orthopedic
41M Plastic
41N Urology
41O Radiology
41P Psychiatric

Errors

The Aura B2B API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong or you do not have the right to access this data.
403 Forbidden -- You don't have the right to access this data.
404 Not Found -- The specified request could not be found.
405 Method Not Allowed -- You tried to access the Api endpoint with an invalid method.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many information! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.