api

Public

Documentation Settings

ENVIRONMENT

No Environment

LAYOUT

Double Column

LANGUAGE

cURL - cURL

Flair API

Introduction

Getting Started

JSON API

Authorization (OAuth 2.0)

Authentication (OAuth 2.0)

Authentication (Deprecated OAuth 2.0)

Example: Vent Control

Example: Minisplit Control

Example: Change Schedule

Example: Webhook Registration

API Endpoint Reference

Flair API

This is the documentation for the Flair API. In this document, we will go over authorization and authentication, dive into a typical user setup and how to navigate and interact with it, and also provide a reference for all supported endpoints and their corresponding attributes.

You may find your Flair API OAuth 2.0 credentials inside of your Flair App under the Account Settings menu, at the bottom, under Developer Settings. If you have any questions or comments, please reach out to support@flair.co.

Flair has also published a rudimentary python interface for faster development:

https://github.com/flair-systems/flair-api-client-py

A python client supporting OAuth 2.0 is currently in preview and can be installed using:

pip install git+https://github.com/flair-systems/flair-api-client-py.git@refs/pull/9/head

The new Python client includes a special fallback mechanism that supports both OAuth 2.0 and OAuth 1.0 (legacy) credentials without additional configuration, prioritizing OAuth 2.0. This fallback behavior can be adjusted.

Please remember to keep your credentials safe.

AUTHORIZATIONOAuth 2.0

Access Token

Getting Started

Here is a small guide on how to get started interfacing with the Flair API:

my.flair.co

.

Flair API Authorization

for details on how to get started.

AUTHORIZATIONOAuth 2.0

This folder is using OAuth 2.0 from collection Flair API

JSON API

JSON API is a specification for HATEOAS APIs using JSON as their base media type. It uses the application/vnd.api+json as its media type and clients SHOULD set both their Accept and Content-Type headers to that media type, though the Flair API will be more lax than the specification on this count.

JSON API describes a standard method for CRUD actions against API resources and how to describe and modify relationships between resources using hypermedia. The full spec is available here, but people interacting with the the API will probably want to use a pre-existing client implementation.

Error Objects look like:

{ "errors": { "title": "Not Found", "code": "404", "detail": "users resource with id 2 was not found" } }

A request to create a resource:

POST /api/structures

{ "data": { "type": "structures", "attributes": { "name": "Winter Home" }, "relationships": { "admin-users": [{
"id": "1",
"type": "users"
}] } } }

A request to update a resource:

PUT /api/users/2

{ "data": { "id": "1", "type": "users", "attributes": { "name": "Will Paget" } } }

AUTHORIZATIONOAuth 2.0

Authorization (OAuth 2.0)

The Flair API uses OAuth2 for Authorization. We support all OAuth workflows. Only Authorized Users, 'Partners', may register OAuth clients with the API. Contact partners@flair.co for more information.

All scopes are divided into '.view' and '.edit' varities. Clients with view permissions may only make GET requests for the resources, while those with both the view and edit scopes may make any kind of request for scopes. A Resources's required scopes are noted in the resource documentation below.

Clients using the implicit grant may only request '.view' scopes.

Here is an example for the scope parameter: scope=thermostats.view structures.edit structures.view

The most common scopes include:

/oauth2/authorize

Third parties can request authorization here by redirecting the user to a url like /oauth2/authorize?client_id={application id}&redirect_uri={uri to return the user to}&scope={' ' (space) separated list of scopes}&response_type=code&state={state to verify the request wasn't tampered with}. Third parties must register their redirect URIs with Flair. Please email your Flair contact or partners@flair.co to register your URI.

AUTHORIZATIONOAuth 2.0

GETAuthorize

https://api.flair.co/oauth2/authorize?client\_id=CLIENT\_ID&redirect\_uri=https://redirect\_uri.fake&response\_type=code&state=FAKESTATEID&scope=structures.edit structures.view

Third parties can request authorization here by redirecting the user to a url like /oauth2/authorize?client_id={application id}&redirect_uri={uri to return the user to}&scope={' ' (space) separated list of scopes}&response_type=code&state={state to verify the request wasnt tampered with}.

Here is an example for the scope parameter:

scope=thermostats.view structures.edit structures.view

AUTHORIZATIONOAuth 2.0

This request is using OAuth 2.0 from collection Flair API

PARAMS

client_id

CLIENT_ID

redirect_uri

https://redirect\_uri.fake

response_type

code

state

FAKESTATEID

scope

structures.edit structures.view

Example Request

Authorize

View More

curl

curl --location 'https://api.flair.co/oauth2/authorize?client_id=CLIENT_ID&redirect_uri=https%3A%2F%2Fredirect_uri.fake&response_type=code&state=FAKESTATEID&scope=structures.edit%20structures.view'

Example Response

No response body

This request doesn't return any response body

No response headers

This request doesn't return any response headers

Authentication (OAuth 2.0)

/oauth2/token

Registered clients may request credentials through this endpoint.

AUTHORIZATIONOAuth 2.0

POSTClient Credentials

https://api.flair.co/oauth2/token

OAuth2 Token Endpoint

This endpoint is used to obtain an access token for authenticating API requests. It follows the OAuth2 protocol, allowing clients to securely access resources.

Request

Method: POST

URL:https://api.flair.co/oauth2/token

Content-Type:application/x-www-form-urlencoded

Request Parameters

Response

Status Code: 200

Content-Type:application/json

Response Parameters

Notes

HEADERS

Content-Type

application/x-www-form-urlencoded

Bodyurlencoded

client_id

CLIENT_ID

client_secret

CLIENT_SECRET

scope

thermostats.view structures.view structures.edit

grant_type

client_credentials

Example Request

Client Credentials

curl

curl --location 'https://api.flair.co/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=CLIENT_ID' \
--data-urlencode 'client_secret=CLIENT_SECRET' \
--data-urlencode 'scope=thermostats.view structures.view structures.edit' \
--data-urlencode 'grant_type=client_credentials'

Example Response

No response body

This request doesn't return any response body

No response headers

This request doesn't return any response headers

POSTResource Owner Credentials

https://api.flair.co/oauth2/token

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/x-www-form-urlencoded

Bodyformdata

client_id

CLIENT_ID

client_secret

CLIENT_SECRET

username

USERNAME

password

PASSWORD

grant_type

password

scope

structures.view structures.edit

Example Request

Resource Owner Credentials

curl

curl --location 'https://api.flair.co/oauth2/token' \
--form 'client_id="CLIENT_ID"' \
--form 'client_secret="CLIENT_SECRET"' \
--form 'username="USERNAME"' \
--form 'password="PASSWORD"' \
--form 'grant_type="password"' \
--form 'scope="structures.view structures.edit"'

200 OK

Example Response

json

{
  "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "structures.view structures.edit",
  "refresh_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Cache-Control

no-store

Content-Type

application/json

Pragma

no-cache

Content-Length

189

Connection

keep-alive

POSTAccess Grant

https://api.flair.co/oauth2/token

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/x-www-form-urlencoded

Bodyformdata

client_id

CLIENT_ID

client_secret

CLIENT_SECRET

code

CODE_FROM_OAUTH_AUTHORIZE

grant_type

authorization_code

scope

structures.view structures.edit

state

FAKESTATEID

redirect_uri

https://redirect\_uri.fake

Example Request

Access Grant

curl

curl --location 'https://api.flair.co/oauth2/token' \
--form 'client_id="CLIENT_ID"' \
--form 'client_secret="CLIENT_SECRET"' \
--form 'code="CODE_FROM_OAUTH_AUTHORIZE"' \
--form 'grant_type="authorization_code"' \
--form 'scope="structures.view structures.edit"' \
--form 'state="FAKESTATEID"' \
--form 'redirect_uri="https://redirect_uri.fake"'

200 OK

Example Response

json

{
  "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "structures.edit structures.view",
  "refresh_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Cache-Control

no-store

Content-Type

application/json

Pragma

no-cache

Content-Length

189

Connection

keep-alive

POSTToken Refresh

https://api.flair.co/oauth2/token

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/x-www-form-urlencoded

Bodyformdata

client_id

CLIENT_ID

client_secret

CLIENT_SECRET

grant_type

refresh_token

scope

structures.edit structures.view

refresh_token

REFRESH_TOKEN

Example Request

Token Refresh

curl

curl --location 'https://api.flair.co/oauth2/token' \
--form 'client_id="CLIENT_ID"' \
--form 'client_secret="CLIENT_SECRET"' \
--form 'grant_type="refresh_token"' \
--form 'scope="structures.edit structures.view"' \
--form 'refresh_token="REFRESH_TOKEN"'

200 OK

Example Response

json

Cache-Control

no-store

Content-Type

application/json

Pragma

no-cache

Content-Length

189

Connection

keep-alive

Authentication (Deprecated OAuth 2.0)

/oauth/token

Registered clients may request credentials through this endpoint. This endpoint may be removed in the future. If you are having trouble with OAuth 1.0 (legacy), please obtain your OAuth 2.0 credentials from the Flair App and switch to using OAuth 2.0 endpoints.

Rate Limiting

Please note that this endpoint is subject to a rate limit of 50 requests per day. Exceeding this limit may result in requests being denied until the limit resets.

AUTHORIZATIONOAuth 2.0

POSTClient Credentials

https://api.flair.co/oauth/token?scope=thermostats.view+structures.view+structures.edit

This endpoint is used to obtain an access token for authenticating API requests.

Make sure to handle the access token securely and refresh it as needed based on the expires_in value.

HEADERS

Content-Type

application/x-www-form-urlencoded

PARAMS

scope

thermostats.view+structures.view+structures.edit

Bodyurlencoded

grant_type

client_credentials

client_id

client_secret

Example Request

Client Credentials

View More

curl

curl --location --request POST 'https://api.flair.co/oauth/token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&scope=thermostats.view%2Bstructures.view%2Bstructures.edit&grant_type=client_credentials' \
--header 'Content-Type: application/x-www-form-urlencoded'

200 OK

Example Response

  • Body
  • Headers (5)

json

{
  "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "thermostats.view structures.view structures.edit"
}

Cache-Control

no-store

Content-Type

application/json

Pragma

no-cache

Content-Length

155

Connection

keep-alive

POSTResource Owner Credentials

https://api.flair.co/oauth/token?client\_id=CLIENT\_ID&client\_secret=CLIENT\_SECRET&username=USERNAME&password=PASSWORD&grant\_type=password&scope=structures.view+structures.edit

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/x-www-form-urlencoded

PARAMS

client_id

CLIENT_ID

client_secret

CLIENT_SECRET

username

USERNAME

password

PASSWORD

grant_type

password

scope

structures.view+structures.edit

Bodyurlencoded

grant_type

password

client_id

client_secret

username

password

Example Request

Resource Owner Credentials

View More

curl

curl --location --request POST 'https://api.flair.co/oauth/token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&username=USERNAME&password=PASSWORD&grant_type=password&scope=structures.view%2Bstructures.edit' \
--header 'Content-Type: application/x-www-form-urlencoded'

200 OK

Example Response

  • Body
  • Headers (5)

json

Cache-Control

no-store

Content-Type

application/json

Pragma

no-cache

Content-Length

189

Connection

keep-alive

POSTAccess Grant

https://api.flair.co/oauth/token?client\_id=CLIENT\_ID&client\_secret=CLIENT\_SECRET&code=CODE\_FROM\_OAUT\_AUTHORIZE&grant\_type=authorization\_code&scope=structures.view+structures.edit&state=FAKESTATEID&redirect\_uri=https://redirect\_uri.fake

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/x-www-form-urlencoded

PARAMS

client_id

CLIENT_ID

client_secret

CLIENT_SECRET

code

CODE_FROM_OAUT_AUTHORIZE

grant_type

authorization_code

scope

structures.view+structures.edit

state

FAKESTATEID

redirect_uri

https://redirect\_uri.fake

Bodyurlencoded

grant_type

authorization_code

client_id

code

redirect_uri

client_secret

Example Request

Access Grant

View More

curl

curl --location --request POST 'https://api.flair.co/oauth/token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=CODE_FROM_OAUT_AUTHORIZE&grant_type=authorization_code&scope=structures.view%2Bstructures.edit&state=FAKESTATEID&redirect_uri=https%3A%2F%2Fredirect_uri.fake' \
--header 'Content-Type: application/x-www-form-urlencoded'

200 OK

Example Response

  • Body
  • Headers (5)

json

Cache-Control

no-store

Content-Type

application/json

Pragma

no-cache

Content-Length

189

Connection

keep-alive

POSTToken Refresh

https://api.flair.co/oauth/token?client\_id=CLIENT\_ID&client\_secret=CLIENT\_SECRET&grant\_type=refresh\_token&scope=structures.view+structures.edit&refresh\_token=REFRESH\_TOKEN

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/x-www-form-urlencoded

PARAMS

client_id

CLIENT_ID

client_secret

CLIENT_SECRET

grant_type

refresh_token

scope

structures.view+structures.edit

refresh_token

REFRESH_TOKEN

Bodyurlencoded

grant_type

refresh_token

refresh_token

client_id

client_secret

Example Request

Token Refresh

View More

curl

curl --location --request POST 'https://api.flair.co/oauth/token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=refresh_token&scope=structures.view%2Bstructures.edit&refresh_token=REFRESH_TOKEN' \
--header 'Content-Type: application/x-www-form-urlencoded'

200 OK

Example Response

  • Body
  • Headers (5)

json

Cache-Control

no-store

Content-Type

application/json

Pragma

no-cache

Content-Length

189

Connection

keep-alive

Example: Vent Control

There are two main ways to currently interact with Flair: Manual mode, and Auto mode. In Manual mode, all Vent operations must be controlled by the user, or a third party application. In Auto mode, Flair will automatically adjust Vents to achieve certain set points. Please check the mode first using the /structures endpoint, and evaluating the "mode" attribute.

Manual mode:

If the user's structure is using mode "Manual", then Vents will simply follow user commands or third party application commands. This mode is meant for testing devices easily, and for users who want direct, manual control over their devices.

In manual mode, commands sent by third party applications will stay in effect until changed by either the user, or by the third party application.

For instance, if your app wants complete control of whether Vent is open or closed, then set the structure mode to manual, and control the Vent position directly as shown below in section PATCH Open or Close a Vent.

Auto mode:

If a user's structure has mode set to "Auto", then Flair will automatically adjust Vent positions to achieve the set points in the rooms. This mode is meant for users who want to set the temperature, and have Flair run. This mode is also the only mode that supports Flair scheduling and Flair Home/Away.

In this mode, commands sent by third party applications or the user may be overwritten by the Flair Auto algorithm. For instance, a third party application may set the Vents in the bedroom to closed, but Flair will evaluate the temperature in that room, determine that it is too cold, and open the Vents again to let more heat in.

In Auto mode, we suggest interacting with user structures by adjusting the room set points. Please see below under PATCH Adjust Room Set Point. This will tell Flair what set point to target, and Flair will adjust the Vents automatically.

AUTHORIZATIONOAuth 2.0

Example: Minisplit Control

There are two main ways to currently interact with Flair: Manual mode, and Auto mode. In Manual mode, all minisplit operations must be controlled by the user, or a third party application. In Auto mode, Flair will automatically adjust minisplits to achieve certain set points. Please check the mode first using the /structures endpoint endpoint, and evaluating the "mode" attribute.

Manual mode:

If the user's structure is using mode "Manual", then minisplits will simply follow user commands or third party application commands. This mode is meant for testing devices easily, and for users who want direct, manual control over their devices.

In manual mode, commands sent by third party applications will stay in effect until changed by either the user, or by the third party application.

If your app wants complete control of what temperature, fan, swing, etc, a minisiplit is set to, then set the structure mode to manual, and control the minisplit directly as shown below in section PATCH Change Minisplit Settings.

Auto mode:

If a user's structure has mode set to "Auto", then Flair will automatically adjust minisplit settings to achieve the set points in the rooms. This mode is meant for users who want to set the temperature, and have Flair run. This mode is also the only mode that supports Flair scheduling and Flair Home/Away.

In this mode, commands sent by third party applications or the user may be overwritten by the Flair Auto algorithm. For instance, a third party application may set the minisplit in the bedroom set to 70, Cooling, but Flair will evaluate the temperature in that room, determine that it is too cold, and set it to 74, Heating.

In Auto mode, we suggest interacting with user structures by adjusting the room set points. Please see below under PATCH Adjust Room Set Point. This way, your application can adjust the room set point, and Flair will automatically adjust the minisplit to follow the updated set point.

AUTHORIZATIONOAuth 2.0

Example: Change Schedule

You can change settings in a Flair home by sending a PATCH to structure attributes.

AUTHORIZATIONOAuth 2.0

PATCHStructure PATCH

https://api.flair.co/api/structures/4351

Change the active schedule in a structure

AUTHORIZATIONOAuth 2.0

Access Token

Bodyraw

{"data":{"type":"structures","attributes":{"active-schedule-id":"e569ca11-643d-499d-8090-c3e4902d1cb9"}}}

Example Request

Structure PATCH

View More

curl

curl --location --request PATCH 'https://api.flair.co/api/structures/4351' \
--data '{"data":{"type":"structures","attributes":{"active-schedule-id":"e569ca11-643d-499d-8090-c3e4902d1cb9"}}}'

200 OK

Example Response

  • Body
  • Headers (9)

View More

json

{
  "meta": {
    "self": "/api/structures/4351"
  },
  "data": {
    "type": "structures",
    "relationships": {
      "geofences": {
        "links": {
          "self": "/api/structures/4351/relationships/geofences",
          "related": "/api/structures/4351/geofences"
        }
      },
      "thermostats": {
        "links": {
          "self": "/api/structures/4351/relationships/thermostats",
          "related": "/api/structures/4351/thermostats"
        }
      },
      "zones": {
        "links": {
          "self": "/api/structures/4351/relationships/zones",
          "related": "/api/structures/4351/zones"
        }
      },
      "viewer-users": {
        "links": {
          "self": "/api/structures/4351/relationships/viewer-users",
          "related": "/api/structures/4351/viewer-users"
        }
      },
      "admin-users": {
        "links": {
          "self": "/api/structures/4351/relationships/admin-users",
          "related": "/api/structures/4351/admin-users"
        }
      },
      "hvac-units": {
        "links": {
          "self": "/api/structures/4351/relationships/hvac-units",
          "related": "/api/structures/4351/hvac-units"
        }
      },
      "remote-sensors": {
        "links": {
          "self": "/api/structures/4351/relationships/remote-sensors",
          "related": "/api/structures/4351/remote-sensors"
        }
      },
      "current-state": {
        "links": {
          "related": "/api/structures/4351/current-state"
        },
        "data": {
          "type": "structure-states",
          "id": "d53c3a13-b9a7-44f6-8140-fbf26b1391c5"
        }
      },
      "alerts": {
        "links": {
          "related": "/api/structures/4351/alerts"
        }
      },
      "supported-device-brands": {
        "links": {
          "related": "/api/structures/4351/supported-device-brands"
        }
      },
      "beacon-sightings": {
        "links": {
          "self": "/api/structures/4351/relationships/beacon-sightings",
          "related": "/api/structures/4351/beacon-sightings"
        }
      },
      "schedules": {
        "links": {
          "self": "/api/structures/4351/relationships/schedules",
          "related": "/api/structures/4351/schedules"
        }
      },
      "releases": {
        "links": {
          "self": "/api/structures/4351/relationships/releases",
          "related": "/api/structures/4351/releases"
        }
      },
      "default-zone": {
        "links": {
          "self": "/api/structures/4351/relationships/default-zone",
          "related": "/api/structures/4351/default-zone"
        }
      },
      "occupancy-conclusions": {
        "links": {
          "related": "/api/structures/4351/occupancy-conclusions"
        }
      },
      "editor-users": {
        "links": {
          "self": "/api/structures/4351/relationships/editor-users",
          "related": "/api/structures/4351/editor-users"
        }
      },
      "integration-structures": {
        "links": {
          "self": "/api/structures/4351/relationships/integration-structures",
          "related": "/api/structures/4351/integration-structures"
        }
      },
      "rooms": {
        "links": {
          "self": "/api/structures/4351/relationships/rooms",
          "related": "/api/structures/4351/rooms"
        }
      },
      "pucks": {
        "links": {
          "self": "/api/structures/4351/relationships/pucks",
          "related": "/api/structures/4351/pucks"
        }
      },
      "current-weather": {
        "links": {
          "related": "/api/structures/4351/current-weather"
        }
      },
      "invitations": {
        "links": {
          "self": "/api/structures/4351/relationships/invitations",
          "related": "/api/structures/4351/invitations"
        }
      },
      "weather-readings": {
        "links": {
          "related": "/api/structures/4351/weather-readings"
        }
      },
      "vents": {
        "links": {
          "self": "/api/structures/4351/relationships/vents",
          "related": "/api/structures/4351/vents"
        }
      },
      "active-schedule": {
        "links": {
          "self": "/api/structures/4351/relationships/active-schedule",
          "related": "/api/structures/4351/active-schedule"
        },
        "data": {
          "type": "schedules",
          "id": "e569ca11-643d-499d-8090-c3e4902d1cb9"
        }
      },
      "geofence-events": {
        "links": {
          "self": "/api/structures/4351/relationships/geofence-events",
          "related": "/api/structures/4351/geofence-events"
        }
      },
      "current-conclusions": {
        "links": {
          "related": "/api/structures/4351/current-conclusions"
        }
      },
      "structure-states": {
        "links": {
          "related": "/api/structures/4351/structure-states"
        }
      }
    },
    "attributes": {
      "mode": "auto",
      "setup-mode": false,
      "hysteresis-b": 200,
      "hysteresis-heat-cool-mode": 300,
      "structure-heat-cool-mode-popup-resolved-at": null,
      "temp-away-min-c": 12.2,
      "structure-heat-cool-mode": "cool",
      "home-away-mode": "Manual",
      "name": "My Home",
      "puck-client-id": "HhodCMXGiM3rPzvkpJ6O8Pcuzb4kLKSMMDfeZF2Z",
      "setup-complete": true,
      "setup-mode-first-time": true,
      "hold-reason": null,
      "longitude": -122.408842,
      "updated-at": "2020-04-14T21:31:03.633676+00:00",
      "state-updated-at": "2020-04-14T21:31:03.631447+00:00",
      "hold-until-schedule-event": true,
      "set-point-mode": "Home Evenness For Active Rooms Flair Setpoint",
      "structure-heat-cool-mode-calculated": null,
      "setup-step": "step-five-puck",
      "use-remote-sensor-occupancy": null,
      "preheat-precool": false,
      "frozen-pipe-pet-protect": true,
      "home": true,
      "active-schedule-id": "e569ca11-643d-499d-8090-c3e4902d1cb9",
      "location": "684 Peralta Ave",
      "puck-client-secret": "q2nYKegoHIz0GQvBcRFj6mQMwHRC3nmDOJAJeVXzKaWBCxTaj5oSv5gabp2v",
      "country": "US",
      "temperature-scale": "F",
      "latitude": 37.741657,
      "created-at": "2018-03-09T23:44:02.180249+00:00",
      "hold-until": null,
      "default-hold-duration": "Until",
      "release-channel": "production",
      "humidity-away-max": 80,
      "structure-away-mode": "Off Only",
      "state": "CA",
      "reporting-gateway": true,
      "set-point-temperature-c": 20.56,
      "is-active": false,
      "time-zone": "America/Los_Angeles",
      "location-type": "address",
      "hysteresis-a": 50,
      "structure-type": null,
      "city": "San Francisco",
      "licensed-features": [],
      "temp-away-max-c": 30.9,
      "humidity-away-min": 10,
      "zip-code": "94110"
    },
    "id": "4351"
  }
}

Date

Tue, 14 Apr 2020 21:31:03 GMT

Content-Type

application/json; charset=utf-8

Transfer-Encoding

chunked

Connection

keep-alive

Server

gunicorn/20.0.4

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode, user-agent

Access-Control-Allow-Credentials

true

Example: Webhook Registration

AUTHORIZATIONOAuth 2.0

PATCHStructure PATCH

https://api.flair.co/api/structures/4351

Callback Triggers

Triggers that would execute a callback:

  • Structure Mode Change

  • Room Set Point Change

  • Room Active/Inactive Change

  • Room Temperature / Humidity Change

Notes:

heat_cool_mode can be either:

- COOL (if cooling)

- HEAT (if heating)

- FLOAT (if idle/off)

structure_heat_cool_mode can be either:

- COOL (if desire to cool)

- HEAT (if desire to heat)

- AUTO (to determine the ideal mode automatically)

- FLOAT (to have everything turned off/idle)

If you have multiple structures, you may want to append a query (?structure=1234), or similar method, to be able to identify what structure a callback is originating from.

Callback Response Example:

View More

json

{"room_id": 7821, "heat_cool_mode": "COOL", "structure_heat_cool_mode": "AUTO", "occupied": true, "set_point": 16.67, "temperature": 22.153938888888888, "humidity": 39.5}

AUTHORIZATIONOAuth 2.0

Access Token

Bodyraw

{"data":{"type":"structures","attributes":{"callback-url":"https://your-domain.example/callback"}}}

Example Request

Structure PATCH

curl

curl --location --request PATCH 'https://api.flair.co/api/structures/4351' \
--data '{"data":{"type":"structures","attributes":{"callback-url":"https://your-domain.example/callback"}}}'

200 OK

Example Response

  • Body
  • Headers (9)

View More

json

Date

Tue, 14 Apr 2020 21:31:03 GMT

Content-Type

application/json; charset=utf-8

Transfer-Encoding

chunked

Connection

keep-alive

Server

gunicorn/20.0.4

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode, user-agent

Access-Control-Allow-Credentials

true

API Endpoint Reference

The following section is a reference of all Flair API endpoints, and their associated data.

AUTHORIZATIONOAuth 2.0

GETUsers

https://api.flair.co/api/users

The /users endpoint provides user information, such as name, email, and user preferences for Fahrenheit or Celsius.

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Accept

application/json

Authorization

Bearer ACCESS_TOKEN

Example Request

Users

curl

curl --location 'https://api.flair.co/api/users' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": [\
    {\
      "type": "users",\
      "attributes": {\
        "name": "flairtest0001@flair.co",\
        "created-at": "2018-02-08T17:46:41.598046+00:00",\
        "firmware-emails": true,\
        "updated-at": "2018-02-10T00:48:40.215445+00:00",\
        "betas": [\
          "flair-setpoint",\
          "active-rooms",\
          "honeywell-lyric",\
          "third-party"\
        ],\
        "email": "flairtest0001@flair.co",\
        "default-temperature-preference-c": 22.5,\
        "role": "user",\
        "temperature-scale": "F",\
        "alert-emails": true\
      },\
      "id": "1859",\
      "relationships": {\
        "structures": {\
          "links": {\
            "self": "/api/users/1859/relationships/structures",\
            "related": "/api/users/1859/structures"\
          }\
        },\
        "default-structure": {\
          "links": {\
            "self": "/api/users/1859/relationships/default-structure",\
            "related": "/api/users/1859/default-structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "unassigned-pucks": {\
          "links": {\
            "related": "/api/users/1859/unassigned-pucks"\
          },\
          "data": []\
        },\
        "received-invitations": {\
          "links": {\
            "self": "/api/users/1859/relationships/received-invitations",\
            "related": "/api/users/1859/received-invitations"\
          }\
        },\
        "adminable-structures": {\
          "links": {\
            "self": "/api/users/1859/relationships/adminable-structures",\
            "related": "/api/users/1859/adminable-structures"\
          }\
        },\
        "integrations": {\
          "links": {\
            "self": "/api/users/1859/relationships/integrations",\
            "related": "/api/users/1859/integrations"\
          }\
        },\
        "viewable-structures": {\
          "links": {\
            "self": "/api/users/1859/relationships/viewable-structures",\
            "related": "/api/users/1859/viewable-structures"\
          }\
        },\
        "editable-structures": {\
          "links": {\
            "self": "/api/users/1859/relationships/editable-structures",\
            "related": "/api/users/1859/editable-structures"\
          }\
        },\
        "primary-device": {\
          "links": {\
            "self": "/api/users/1859/relationships/primary-device",\
            "related": "/api/users/1859/primary-device"\
          },\
          "data": null\
        },\
        "devices": {\
          "links": {\
            "related": "/api/users/1859/devices"\
          }\
        },\
        "puck-oauth-apps": {\
          "links": {\
            "related": "/api/users/1859/puck-oauth-apps"\
          }\
        }\
      }\
    }\
  ],
  "meta": {
    "self": "/api/users",
    "first": "/api/users?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/users?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

2037

Connection

keep-alive

GETStructures

https://api.flair.co/api/structures

The /structures endpoint shows the user's main home ID, in this case, 4351. The structure object shows information such as home name, address, temperature preferences, preferred hysteresis bounds, away mode, set point mode. More importantly, this endpoint provides links to find all of the rooms, Pucks, Vents, thermostats, and minisplits associated with this home.

For third party applications, the most useful items to note are:

  • name: the name of the home
  • temperature-scale: whether to use Celsius "C" or Fahrenheit "F"
  • home: user is home (true) or away (false)
  • structure-heat-cool-mode: whether home is set to "heat" only, "cool" only, or "auto" for heat and cool
  • mode: "auto" means vents and minisplits are automatically controlled, "manual" means they are manually controlled by user or API

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Accept

application/json

Authorization

Bearer ACCESS_TOKEN

Example Request

Structures

curl

curl --location 'https://api.flair.co/api/structures' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": [\
    {\
      "type": "structures",\
      "attributes": {\
        "temp-away-min-c": 16.6,\
        "frozen-pipe-pet-protect": true,\
        "temp-away-max-c": 30.35,\
        "puck-client-secret": "q2nYKegoHIz0GQvBcRFj6mQMwHRC3nmDOJAJeVXzKaWBCxTaj5oSv5gabp2v",\
        "structure-away-mode": "Smart Away",\
        "temperature-scale": "F",\
        "home": true,\
        "humidity-away-min": 10,\
        "name": "My Home",\
        "structure-type": null,\
        "default-hold-duration": "3h",\
        "structure-heat-cool-mode": "auto",\
        "longitude": -122.442313,\
        "hysteresis-b": null,\
        "zip-code": "94110",\
        "state": "CA",\
        "home-away-mode": "Manual",\
        "puck-client-id": "HhodCMXGiM3rPzvkpJ6O8Pcuzb4kLKSMMDfeZF2Z",\
        "mode": "auto",\
        "preheat-precool": false,\
        "release-channel": "production",\
        "latitude": 37.757662,\
        "created-at": "2018-03-09T23:44:02.180249+00:00",\
        "setup-mode-first-time": true,\
        "set-point-temperature-c": 21.12,\
        "setup-step": "step-five-puck",\
        "location": "123 My Street",\
        "hold-reason": null,\
        "updated-at": "2018-12-17T21:44:14.633595+00:00",\
        "setup-complete": true,\
        "location-type": "address",\
        "reporting-gateway": true,\
        "hysteresis-a": 250,\
        "active-schedule-id": null,\
        "setup-mode": false,\
        "country": "US",\
        "city": "San Francisco",\
        "is-active": false,\
        "humidity-away-max": 80,\
        "time-zone": "America/Los_Angeles",\
        "set-point-mode": "Home Evenness For Active Rooms Flair Setpoint"\
      },\
      "relationships": {\
        "geofence-events": {\
          "links": {\
            "self": "/api/structures/4351/relationships/geofence-events",\
            "related": "/api/structures/4351/geofence-events"\
          }\
        },\
        "hvac-units": {\
          "links": {\
            "self": "/api/structures/4351/relationships/hvac-units",\
            "related": "/api/structures/4351/hvac-units"\
          }\
        },\
        "editor-users": {\
          "links": {\
            "self": "/api/structures/4351/relationships/editor-users",\
            "related": "/api/structures/4351/editor-users"\
          }\
        },\
        "alerts": {\
          "links": {\
            "related": "/api/structures/4351/alerts"\
          }\
        },\
        "zones": {\
          "links": {\
            "self": "/api/structures/4351/relationships/zones",\
            "related": "/api/structures/4351/zones"\
          }\
        },\
        "current-weather": {\
          "links": {\
            "related": "/api/structures/4351/current-weather"\
          }\
        },\
        "structure-states": {\
          "links": {\
            "related": "/api/structures/4351/structure-states"\
          }\
        },\
        "thermostats": {\
          "links": {\
            "self": "/api/structures/4351/relationships/thermostats",\
            "related": "/api/structures/4351/thermostats"\
          }\
        },\
        "current-conclusions": {\
          "links": {\
            "related": "/api/structures/4351/current-conclusions"\
          }\
        },\
        "schedules": {\
          "links": {\
            "self": "/api/structures/4351/relationships/schedules",\
            "related": "/api/structures/4351/schedules"\
          }\
        },\
        "geofences": {\
          "links": {\
            "self": "/api/structures/4351/relationships/geofences",\
            "related": "/api/structures/4351/geofences"\
          }\
        },\
        "remote-sensors": {\
          "links": {\
            "self": "/api/structures/4351/relationships/remote-sensors",\
            "related": "/api/structures/4351/remote-sensors"\
          }\
        },\
        "beacon-sightings": {\
          "links": {\
            "self": "/api/structures/4351/relationships/beacon-sightings",\
            "related": "/api/structures/4351/beacon-sightings"\
          }\
        },\
        "vents": {\
          "links": {\
            "self": "/api/structures/4351/relationships/vents",\
            "related": "/api/structures/4351/vents"\
          }\
        },\
        "default-zone": {\
          "links": {\
            "self": "/api/structures/4351/relationships/default-zone",\
            "related": "/api/structures/4351/default-zone"\
          }\
        },\
        "weather-readings": {\
          "links": {\
            "related": "/api/structures/4351/weather-readings"\
          }\
        },\
        "supported-device-brands": {\
          "links": {\
            "related": "/api/structures/4351/supported-device-brands"\
          }\
        },\
        "invitations": {\
          "links": {\
            "self": "/api/structures/4351/relationships/invitations",\
            "related": "/api/structures/4351/invitations"\
          }\
        },\
        "viewer-users": {\
          "links": {\
            "self": "/api/structures/4351/relationships/viewer-users",\
            "related": "/api/structures/4351/viewer-users"\
          }\
        },\
        "active-schedule": {\
          "links": {\
            "self": "/api/structures/4351/relationships/active-schedule",\
            "related": "/api/structures/4351/active-schedule"\
          },\
          "data": null\
        },\
        "admin-users": {\
          "links": {\
            "self": "/api/structures/4351/relationships/admin-users",\
            "related": "/api/structures/4351/admin-users"\
          }\
        },\
        "releases": {\
          "links": {\
            "self": "/api/structures/4351/relationships/releases",\
            "related": "/api/structures/4351/releases"\
          }\
        },\
        "occupancy-conclusions": {\
          "links": {\
            "related": "/api/structures/4351/occupancy-conclusions"\
          }\
        },\
        "integration-structures": {\
          "links": {\
            "self": "/api/structures/4351/relationships/integration-structures",\
            "related": "/api/structures/4351/integration-structures"\
          }\
        },\
        "pucks": {\
          "links": {\
            "self": "/api/structures/4351/relationships/pucks",\
            "related": "/api/structures/4351/pucks"\
          }\
        },\
        "rooms": {\
          "links": {\
            "self": "/api/structures/4351/relationships/rooms",\
            "related": "/api/structures/4351/rooms"\
          }\
        }\
      },\
      "id": "4351"\
    }\
  ],
  "meta": {
    "self": "/api/structures",
    "first": "/api/structures?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/structures?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

4651

Connection

keep-alive

GETRooms

https://api.flair.co/api/rooms

This endpoint lists out all the rooms associated with a home. The main parameters are:

  • name: name of the room
  • set-point-c: what the room is set to, in Celsius
  • active: some users set rooms to "false", or inactive, and in Auto mode, Flair will turn off the minisplit in that room, or close the vent in that room, this room is now ignored
  • current-temperature-c: current temperature in the room, in Celsius, this is a 5 minute moving average that takes into accounts all temperature sensors in a room, including Pucks, thermostats, and ecobee room sensors. Vents are not included in this calculation because their temnperatures are skewed due to the hot or cold air.
  • current-humidity: humidity in the room, in %RH

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Rooms

curl

curl --location 'https://api.flair.co/api/rooms' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": [\
    {\
      "type": "rooms",\
      "attributes": {\
        "preheat-precool": true,\
        "frozen-pipe-pet-protect": true,\
        "current-humidity": 60,\
        "current-temperature-c": 20,\
        "updated-at": "2018-12-17T22:15:41.759562+00:00",\
        "pucks-inactive": "Active",\
        "set-point-manual": false,\
        "humidity-away-max": 80,\
        "hold-reason": null,\
        "occupancy-mode": "Flair Auto",\
        "temp-away-max-c": 22.5,\
        "name": "Upstairs",\
        "windows": null,\
        "room-away-mode": "Smart Away",\
        "created-at": "2018-12-17T21:42:49.311698+00:00",\
        "air-return": false,\
        "set-point-c": 21.12,\
        "hold-until": null,\
        "humidity-away-min": 10,\
        "level": null,\
        "temp-away-min-c": 16,\
        "room-type": null,\
        "active": true\
      },\
      "relationships": {\
        "remote-sensors": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/remote-sensors",\
            "related": "/api/rooms/8844/remote-sensors"\
          },\
          "data": [\
            {\
              "type": "remote-sensors",\
              "id": "f64015e7-fb62-4e26-9cde-68ce8d61c83d"\
            }\
          ]\
        },\
        "pucks": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/pucks",\
            "related": "/api/rooms/8844/pucks"\
          },\
          "data": []\
        },\
        "zones": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/zones",\
            "related": "/api/rooms/8844/zones"\
          },\
          "data": [\
            {\
              "type": "zones",\
              "id": "35941"\
            }\
          ]\
        },\
        "hvac-units": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/hvac-units",\
            "related": "/api/rooms/8844/hvac-units"\
          },\
          "data": []\
        },\
        "current-conclusions": {\
          "links": {\
            "related": "/api/rooms/8844/current-conclusions"\
          }\
        },\
        "occupants": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/occupants",\
            "related": "/api/rooms/8844/occupants"\
          }\
        },\
        "occupancy-conclusions": {\
          "links": {\
            "related": "/api/rooms/8844/occupancy-conclusions"\
          }\
        },\
        "puck-apps": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/puck-apps",\
            "related": "/api/rooms/8844/puck-apps"\
          }\
        },\
        "structure": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/structure",\
            "related": "/api/rooms/8844/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "thermostat": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/thermostat",\
            "related": "/api/rooms/8844/thermostat"\
          },\
          "data": {\
            "type": "thermostats",\
            "id": "1c118d41-ea4d-406a-87c6-990cc0478bf5"\
          }\
        },\
        "room-states": {\
          "links": {\
            "related": "/api/rooms/8844/room-states"\
          }\
        },\
        "room-auto-conclusions": {\
          "links": {\
            "related": "/api/rooms/8844/room-auto-conclusions"\
          }\
        },\
        "vents": {\
          "links": {\
            "self": "/api/rooms/8844/relationships/vents",\
            "related": "/api/rooms/8844/vents"\
          },\
          "data": []\
        }\
      },\
      "id": "8844"\
    },\
    {\
      "type": "rooms",\
      "attributes": {\
        "preheat-precool": true,\
        "frozen-pipe-pet-protect": true,\
        "current-humidity": 61,\
        "current-temperature-c": 21.8016666666667,\
        "updated-at": "2018-12-17T22:15:41.928474+00:00",\
        "pucks-inactive": "Active",\
        "set-point-manual": false,\
        "humidity-away-max": 80,\
        "hold-reason": null,\
        "occupancy-mode": "Flair Auto",\
        "temp-away-max-c": 22.5,\
        "name": "Office",\
        "windows": null,\
        "room-away-mode": "Smart Away",\
        "created-at": "2018-12-06T20:28:39.423058+00:00",\
        "air-return": false,\
        "set-point-c": 21.12,\
        "hold-until": null,\
        "humidity-away-min": 10,\
        "level": null,\
        "temp-away-min-c": 16,\
        "room-type": null,\
        "active": true\
      },\
      "relationships": {\
        "remote-sensors": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/remote-sensors",\
            "related": "/api/rooms/8704/remote-sensors"\
          },\
          "data": []\
        },\
        "pucks": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/pucks",\
            "related": "/api/rooms/8704/pucks"\
          },\
          "data": [\
            {\
              "type": "pucks",\
              "id": "3b186a59-5ec9-53e8-e662-29daf69dd897"\
            }\
          ]\
        },\
        "zones": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/zones",\
            "related": "/api/rooms/8704/zones"\
          },\
          "data": [\
            {\
              "type": "zones",\
              "id": "35941"\
            }\
          ]\
        },\
        "hvac-units": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/hvac-units",\
            "related": "/api/rooms/8704/hvac-units"\
          },\
          "data": []\
        },\
        "current-conclusions": {\
          "links": {\
            "related": "/api/rooms/8704/current-conclusions"\
          }\
        },\
        "occupants": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/occupants",\
            "related": "/api/rooms/8704/occupants"\
          }\
        },\
        "occupancy-conclusions": {\
          "links": {\
            "related": "/api/rooms/8704/occupancy-conclusions"\
          }\
        },\
        "puck-apps": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/puck-apps",\
            "related": "/api/rooms/8704/puck-apps"\
          }\
        },\
        "structure": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/structure",\
            "related": "/api/rooms/8704/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "thermostat": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/thermostat",\
            "related": "/api/rooms/8704/thermostat"\
          },\
          "data": {\
            "type": "thermostats",\
            "id": null\
          }\
        },\
        "room-states": {\
          "links": {\
            "related": "/api/rooms/8704/room-states"\
          }\
        },\
        "room-auto-conclusions": {\
          "links": {\
            "related": "/api/rooms/8704/room-auto-conclusions"\
          }\
        },\
        "vents": {\
          "links": {\
            "self": "/api/rooms/8704/relationships/vents",\
            "related": "/api/rooms/8704/vents"\
          },\
          "data": [\
            {\
              "type": "vents",\
              "id": "13c44351-5883-5cbe-52cf-da0c1a1505f7"\
            }\
          ]\
        }\
      },\
      "id": "8704"\
    },\
    {\
      "type": "rooms",\
      "attributes": {\
        "preheat-precool": true,\
        "frozen-pipe-pet-protect": true,\
        "current-humidity": 61,\
        "current-temperature-c": 20.4808333333333,\
        "updated-at": "2018-12-17T22:15:42.271387+00:00",\
        "pucks-inactive": "Active",\
        "set-point-manual": false,\
        "humidity-away-max": 80,\
        "hold-reason": null,\
        "occupancy-mode": "Flair Auto",\
        "temp-away-max-c": 22.5,\
        "name": "Bedroom",\
        "windows": null,\
        "room-away-mode": "Smart Away",\
        "created-at": "2018-11-09T18:47:10.089676+00:00",\
        "air-return": false,\
        "set-point-c": 21.12,\
        "hold-until": null,\
        "humidity-away-min": 10,\
        "level": null,\
        "temp-away-min-c": 16,\
        "room-type": null,\
        "active": true\
      },\
      "relationships": {\
        "remote-sensors": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/remote-sensors",\
            "related": "/api/rooms/8310/remote-sensors"\
          },\
          "data": []\
        },\
        "pucks": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/pucks",\
            "related": "/api/rooms/8310/pucks"\
          },\
          "data": [\
            {\
              "type": "pucks",\
              "id": "46eb5eef-7324-5748-2384-3f9ff8996373"\
            }\
          ]\
        },\
        "zones": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/zones",\
            "related": "/api/rooms/8310/zones"\
          },\
          "data": [\
            {\
              "type": "zones",\
              "id": "35940"\
            }\
          ]\
        },\
        "hvac-units": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/hvac-units",\
            "related": "/api/rooms/8310/hvac-units"\
          },\
          "data": [\
            {\
              "type": "hvac-units",\
              "id": "3b369fae-cc16-452c-80d8-4525e89efa42"\
            }\
          ]\
        },\
        "current-conclusions": {\
          "links": {\
            "related": "/api/rooms/8310/current-conclusions"\
          }\
        },\
        "occupants": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/occupants",\
            "related": "/api/rooms/8310/occupants"\
          }\
        },\
        "occupancy-conclusions": {\
          "links": {\
            "related": "/api/rooms/8310/occupancy-conclusions"\
          }\
        },\
        "puck-apps": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/puck-apps",\
            "related": "/api/rooms/8310/puck-apps"\
          }\
        },\
        "structure": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/structure",\
            "related": "/api/rooms/8310/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "thermostat": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/thermostat",\
            "related": "/api/rooms/8310/thermostat"\
          },\
          "data": {\
            "type": "thermostats",\
            "id": null\
          }\
        },\
        "room-states": {\
          "links": {\
            "related": "/api/rooms/8310/room-states"\
          }\
        },\
        "room-auto-conclusions": {\
          "links": {\
            "related": "/api/rooms/8310/room-auto-conclusions"\
          }\
        },\
        "vents": {\
          "links": {\
            "self": "/api/rooms/8310/relationships/vents",\
            "related": "/api/rooms/8310/vents"\
          },\
          "data": []\
        }\
      },\
      "id": "8310"\
    }\
  ],
  "meta": {
    "self": "/api/rooms",
    "first": "/api/rooms?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/rooms?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

7259

Connection

keep-alive

PATCHAdjust Room Set Point

https://api.flair.co/api/rooms/8310

You can use the API to adjust a room set point by setting set-point-c to a Celsius value. The link to use should be api/rooms/[ROOM_ID]. See the attached example on how to structure the JSON body. There is also a hold-until parameter to designate how long the hold should last for.

IMPORTANT: Please make sure structure mode is set to "auto". In "auto" mode, Flair will adjust Vents or minisplits to match the room set point. If not in "auto" mode, there will be no further action.

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Bodyraw

{
    "data": {
        "type": "rooms",
        "attributes": {
            "set-point-c": 24.00,
            "hold-until": "2018-12-17T23:42:49.311698+00:00"
        },
        "relationships": {}
    }
}

Example Request

Adjust Room Set Point

View More

curl

curl --location --request PATCH 'https://api.flair.co/api/rooms/8310' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data '{
    "data": {
        "type": "rooms",
        "attributes": {
            "set-point-c": 24.00,
            "hold-unitl": "2018-12-17T23:42:49.311698+00:00"
        },
        "relationships": {}
    }
}'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": {
    "type": "rooms",
    "attributes": {
      "preheat-precool": true,
      "frozen-pipe-pet-protect": true,
      "current-humidity": 61,
      "current-temperature-c": 20.1266666666667,
      "updated-at": "2018-12-17T23:18:03.680571+00:00",
      "pucks-inactive": "Active",
      "set-point-manual": true,
      "humidity-away-max": 80,
      "hold-reason": "ApiSetPointC",
      "occupancy-mode": "Flair Auto",
      "temp-away-max-c": 22.5,
      "name": "Bedroom",
      "windows": null,
      "room-away-mode": "Smart Away",
      "created-at": "2018-11-09T18:47:10.089676+00:00",
      "air-return": false,
      "set-point-c": 24,
      "hold-until": "2018-12-18T02:18:02.724772+00:00",
      "humidity-away-min": 10,
      "level": null,
      "temp-away-min-c": 16,
      "room-type": null,
      "active": true
    },
    "relationships": {
      "remote-sensors": {
        "links": {
          "self": "/api/rooms/8310/relationships/remote-sensors",
          "related": "/api/rooms/8310/remote-sensors"
        },
        "data": []
      },
      "pucks": {
        "links": {
          "self": "/api/rooms/8310/relationships/pucks",
          "related": "/api/rooms/8310/pucks"
        },
        "data": [\
          {\
            "type": "pucks",\
            "id": "46eb5eef-7324-5748-2384-3f9ff8996373"\
          }\
        ]
      },
      "zones": {
        "links": {
          "self": "/api/rooms/8310/relationships/zones",
          "related": "/api/rooms/8310/zones"
        },
        "data": [\
          {\
            "type": "zones",\
            "id": "35940"\
          }\
        ]
      },
      "hvac-units": {
        "links": {
          "self": "/api/rooms/8310/relationships/hvac-units",
          "related": "/api/rooms/8310/hvac-units"
        },
        "data": [\
          {\
            "type": "hvac-units",\
            "id": "3b369fae-cc16-452c-80d8-4525e89efa42"\
          }\
        ]
      },
      "current-conclusions": {
        "links": {
          "related": "/api/rooms/8310/current-conclusions"
        }
      },
      "occupants": {
        "links": {
          "self": "/api/rooms/8310/relationships/occupants",
          "related": "/api/rooms/8310/occupants"
        }
      },
      "occupancy-conclusions": {
        "links": {
          "related": "/api/rooms/8310/occupancy-conclusions"
        }
      },
      "puck-apps": {
        "links": {
          "self": "/api/rooms/8310/relationships/puck-apps",
          "related": "/api/rooms/8310/puck-apps"
        }
      },
      "structure": {
        "links": {
          "self": "/api/rooms/8310/relationships/structure",
          "related": "/api/rooms/8310/structure"
        },
        "data": {
          "type": "structures",
          "id": "4351"
        }
      },
      "thermostat": {
        "links": {
          "self": "/api/rooms/8310/relationships/thermostat",
          "related": "/api/rooms/8310/thermostat"
        },
        "data": {
          "type": "thermostats",
          "id": null
        }
      },
      "room-states": {
        "links": {
          "related": "/api/rooms/8310/room-states"
        }
      },
      "room-auto-conclusions": {
        "links": {
          "related": "/api/rooms/8310/room-auto-conclusions"
        }
      },
      "vents": {
        "links": {
          "self": "/api/rooms/8310/relationships/vents",
          "related": "/api/rooms/8310/vents"
        },
        "data": []
      }
    },
    "id": "8310"
  },
  "meta": {
    "self": "/api/rooms/8310"
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

2455

Connection

keep-alive

GETPucks

https://api.flair.co/api/pucks

The Puck endpoint lists all the Flair Pucks associated with the home. Useful parameters are:

  • name: the user assigned name of the Puck
  • puck-display-color: this is the color of the background of the Puck, usually "black" refers to a black Puck, and "white" refers to a white Puck, although the user may have changed the display color
  • is-gateway: this is "true" if this Puck is plugged in, and is a WiFi gateway for the Flair system
  • current-temperature-c: this is the instantaneous temperature of the Puck

Note: Puck2 devices are a separate resource type and are accessed via the /api/puck2s endpoints. They are not included in /api/pucks responses.

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Pucks

curl

curl --location 'https://api.flair.co/api/pucks' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": [\
    {\
      "type": "pucks",\
      "attributes": {\
        "puck-display-color": "white",\
        "name": "Bedroom Puck",\
        "bluetooth-tx-power-mw": 500,\
        "sub-ghz-radio-tx-power-mw": null,\
        "beacon-interval-ms": 4095,\
        "ir-download": false,\
        "created-at": "2018-12-06T20:21:56.607171+00:00",\
        "is-gateway": true,\
        "drop-rate": 1.02708333333333,\
        "current-humidity": 61,\
        "temperature-offset-override-c": null,\
        "orientation": "standing",\
        "temperature-offset-c": null,\
        "updated-at": "2018-12-17T21:57:25.423970+00:00",\
        "current-rssi": 0,\
        "current-temperature-c": 20.4766666666667,\
        "ir-setup-enabled": null,\
        "demo-mode": 0,\
        "humidity-offset": null,\
        "display-number": "46eb",\
        "reporting-interval-ds": 255,\
        "inactive": false,\
        "oauth-app-assigned-at": null\
      },\
      "id": "46eb5eef-7324-5748-2384-3f9ff8996373",\
      "relationships": {\
        "room": {\
          "links": {\
            "self": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/relationships/room",\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/room"\
          },\
          "data": {\
            "type": "rooms",\
            "id": "8310"\
          }\
        },\
        "current-state": {\
          "links": {\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/current-state"\
          }\
        },\
        "closest-vents": {\
          "links": {\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/closest-vents"\
          }\
        },\
        "structure": {\
          "links": {\
            "self": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/relationships/structure",\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "hardware-version": {\
          "links": {\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/hardware-version"\
          },\
          "data": {\
            "type": "hardware-versions",\
            "id": "ac5e0121-3917-44f2-a66b-6888961495ef"\
          }\
        },\
        "puck-states": {\
          "links": {\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/puck-states"\
          }\
        },\
        "sensor-readings": {\
          "links": {\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/sensor-readings"\
          }\
        },\
        "beacon-sightings": {\
          "links": {\
            "related": "/api/pucks/46eb5eef-7324-5748-2384-3f9ff8996373/beacon-sightings"\
          }\
        }\
      }\
    },\
    {\
      "type": "pucks",\
      "attributes": {\
        "puck-display-color": "white",\
        "name": "Office Puck",\
        "bluetooth-tx-power-mw": 500,\
        "sub-ghz-radio-tx-power-mw": null,\
        "beacon-interval-ms": 4095,\
        "ir-download": false,\
        "created-at": "2017-08-03T23:01:07.781904+00:00",\
        "is-gateway": false,\
        "drop-rate": 1.02,\
        "current-humidity": 61,\
        "temperature-offset-override-c": null,\
        "orientation": "standing",\
        "temperature-offset-c": null,\
        "updated-at": "2018-12-17T21:44:14.851239+00:00",\
        "current-rssi": -20,\
        "current-temperature-c": 21.805,\
        "ir-setup-enabled": null,\
        "demo-mode": 0,\
        "humidity-offset": null,\
        "display-number": "3b18",\
        "reporting-interval-ds": 255,\
        "inactive": false,\
        "oauth-app-assigned-at": "2017-08-03T23:01:07.757427+00:00"\
      },\
      "id": "3b186a59-5ec9-53e8-e662-29daf69dd897",\
      "relationships": {\
        "room": {\
          "links": {\
            "self": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/relationships/room",\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/room"\
          },\
          "data": {\
            "type": "rooms",\
            "id": "8704"\
          }\
        },\
        "current-state": {\
          "links": {\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/current-state"\
          }\
        },\
        "closest-vents": {\
          "links": {\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/closest-vents"\
          }\
        },\
        "structure": {\
          "links": {\
            "self": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/relationships/structure",\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "hardware-version": {\
          "links": {\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/hardware-version"\
          },\
          "data": {\
            "type": "hardware-versions",\
            "id": "ac5e0121-3917-44f2-a66b-6888961495ef"\
          }\
        },\
        "puck-states": {\
          "links": {\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/puck-states"\
          }\
        },\
        "sensor-readings": {\
          "links": {\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/sensor-readings"\
          }\
        },\
        "beacon-sightings": {\
          "links": {\
            "related": "/api/pucks/3b186a59-5ec9-53e8-e662-29daf69dd897/beacon-sightings"\
          }\
        }\
      }\
    }\
  ],
  "meta": {
    "self": "/api/pucks",
    "first": "/api/pucks?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/pucks?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

4089

Connection

keep-alive

GETPuck Current Reading

https://api.flair.co/api/pucks/cadb1a39-59e0-5f39-9ae8-44aafcfa18f2/current-reading

The Puck endpoint will have a link to the Puck current-reading endpoint. Here you will find the latest set of sensor readings for this device, with additional information such as:

  • created_at: date and time of this reading, in GMT
  • room-temperature-c: the temperature read by this Puck, in Celsius
  • room-pressure: the pressure read by this Puck, in kPA
  • humidity: the humidity read by this Puck, in %RH
  • system-voltage: if a Puck is battery powered, this will display the battery voltage in V
  • rssi: the 915MHz radio signal strength

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Pucks

curl

curl --location 'https://api.flair.co/api/pucks' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

4089

Connection

keep-alive

GETPuck2s

https://api.flair.co/api/puck2s

Lists all Puck2 devices associated with your account.

This endpoint returns a collection of Puck2 resources. Each item in the list follows the same structure as the individual GET /api/puck2s/{id} endpoint. Refer to that endpoint for the full attribute reference.

Results are paginated using standard JSON:API page-based pagination.

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/vnd.api+json

Accept

application/json

Authorization

Bearer ACCESS_TOKEN

Example Request

Puck2s

curl

curl --location 'https://api.flair.co/api/puck2s' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

Example Response

  • Body
  • Headers (0)

No response body

This request doesn't return any response body

No response headers

This request doesn't return any response headers

GETPuck2 by ID

https://api.flair.co/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3

Returns a single Puck2 device by its id.

The Puck2 is a second-generation puck device that supports additional features for controlling HVAC equipment. This endpoint returns the full Puck2 object with all of its attributes and relationships.

Key attributes:

  • name — User-assigned name for the Puck2
  • display-number — The 4-character display number shown on the device
  • hardware-version-name — Hardware revision identifier (e.g. ep_puck2)
  • firmware-version — Current firmware version number
  • mode — Operating mode: "Sensor" or "Standalone"
  • inactive — Whether the device has been removed from its assigned structure
  • current-temperature-c — Latest reported temperature in Celsius
  • current-humidity — Latest reported humidity percentage
  • power-source — Device power source: "USB" or "BATTERY"
  • voltage / last-reported-voltage — Battery voltage (if battery-powered)

Additional fields relate to device-specific features (IR control, HVAC integration, etc.) and are reserved for use with supported HVAC equipment. These fields may not be present or populated for all devices.

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/vnd.api+json

Accept

application/json

Authorization

Bearer ACCESS_TOKEN

PATH VARIABLES

id

ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3

Example Request

Puck2

curl

curl --location 'https://api.flair.co/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (1)

View More

Text

{
  "data": {
    "type": "puck2s",
    "id": "ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3",
    "attributes": {
      "name": "Kitchen-ae4b",
      "display-number": "ae4b",
      "hardware-version-name": "ep_puck2",
      "firmware-version": 51,
      "mode": "Sensor",
      "inactive": false,
      "current-temperature-c": 22.57,
      "current-humidity": 36,
      "power-source": "USB",
      "voltage": 0
    },
    "relationships": {
      "room": {
        "links": {
          "related": "/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3/room"
        }
      },
      "structure": {
        "links": {
          "related": "/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3/structure"
        }
      },
      "current-reading": {
        "links": {
          "related": "/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3/current-reading"
        }
      },
      "hvac-units": {
        "links": {
          "related": "/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3/hvac-units"
        }
      }
    }
  }
}

Content-Type

application/vnd.api+json

GETPuck2 Current Reading

https://api.flair.co/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3/current-reading

Returns the latest sensor reading from a Puck2 device.

The response type is puck2-sensor-readings. This contains real-time sensor data and any active HVAC/IR state reported by the device.

Key attributes:

  • room-temperature-c — Processed room temperature in Celsius
  • humidity — Current humidity percentage
  • firmware-version — Firmware version at time of reading
  • mode — Puck2 operating mode
  • created-at — Timestamp of the reading
  • sub-ghz-rssi — Sub-GHz radio signal strength
  • wifi-rssi — WiFi signal strength (if applicable)
  • connected-gateway-name — Name of the bridge this Puck2 connects through
  • power-source — Current power source
  • power-status — HVAC power state: "ON" or "OFF"
  • error — Device error state, if any

HVAC-related attributes (present when the Puck2 is paired with an HVAC unit):

  • mode-status — HVAC mode: e.g. "HEAT", "COOL", "DRY", "FAN", "AUTO"
  • fan-speed-status — Fan speed setting: e.g. "AUTO", "LOW", "MEDIUM", "HIGH"
  • temperature-scale — Display scale: "C" or "F"
  • ir-device-set-point — Target temperature for the IR-controlled HVAC device
  • set-point-c — Current set point in Celsius
  • ir-status — Current IR communication status. "NONE" when idle. Other values may appear during IR setup or lookup operations.
  • local-ir-sent — Whether an IR command was sent locally

Error states may appear in the error field when the device has detected a problem with one of its subsystems (e.g. "TEMPERATURE_SENSOR", "IR_EMITTER", "WIFI"). If your Puck2 is reporting a persistent error, please contact support@flair.co with the device display number and reading timestamp for assistance.

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/vnd.api+json

Accept

application/json

Authorization

Bearer ACCESS_TOKEN

PATH VARIABLES

id

ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3

Example Request

Puck2 Current Reading

curl

curl --location 'https://api.flair.co/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3/current-reading' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (1)

View More

Text

{
  "meta": {
    "self": "/api/puck2s/ae4bfdb0-acc3-4b0b-8cb4-7ce6badde4a3/current-reading"
  },
  "data": {
    "type": "puck2-sensor-readings",
    "id": "bb17e42f-8fed-4b3b-ae1c-2d95f3d6c40a",
    "attributes": {
      "room-temperature-c": 22.57,
      "humidity": 36,
      "firmware-version": 51,
      "mode": "Sensor",
      "power-source": "USB",
      "power-status": "OFF",
      "created-at": "2026-05-22T17:00:03.121520+00:00",
      "sub-ghz-rssi": -50,
      "connected-gateway-name": "Bridge-2ddd"
    }
  }
}

Content-Type

application/vnd.api+json

GETVents

https://api.flair.co/api/vents

The vents endpoint lists all associated Vents in the home. The most useful parameters are:

  • name: user assigned name of the Vent
  • percent-open: 0 for closed, 100 for open

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Vents

curl

curl --location 'https://api.flair.co/api/vents' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": [\
    {\
      "type": "vents",\
      "relationships": {\
        "current-state": {\
          "links": {\
            "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/current-state"\
          }\
        },\
        "closest-puck": {\
          "links": {\
            "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/closest-pucks"\
          }\
        },\
        "vent-states": {\
          "links": {\
            "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/vent-states"\
          }\
        },\
        "sensor-readings": {\
          "links": {\
            "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/sensor-readings"\
          }\
        },\
        "structure": {\
          "links": {\
            "self": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/relationships/structure",\
            "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "room": {\
          "links": {\
            "self": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/relationships/room",\
            "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/room"\
          },\
          "data": {\
            "type": "rooms",\
            "id": "8704"\
          }\
        }\
      },\
      "attributes": {\
        "percent-open": 0,\
        "setup-lightstrip": 1,\
        "created-at": "2017-08-03T01:06:38.367916+00:00",\
        "name": "Office Vent",\
        "updated-at": "2018-12-17T21:44:16.360362+00:00",\
        "inactive": false\
      },\
      "id": "13c44351-5883-5cbe-52cf-da0c1a1505f7"\
    }\
  ],
  "meta": {
    "self": "/api/vents",
    "first": "/api/vents?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/vents?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

1326

Connection

keep-alive

GETVent Current Reading

https://api.flair.co/api/vents/53d69ae0-59d4-5de0-4a86-4d468cacda63/current-reading

The Vent endpoint will have a link to the Vent current-reading endpoint. Here you will find the latest set of sensor readings for this device, with information such as:

  • created_at: date and time of this reading, in GMT
  • duct-temperature-c: the temperature read by this Vent, in Celsius
  • duct-pressure: the pressure read by this Vent, in kPA
  • percent-open: the status of this Vent (100 refers to 100% open, 0 refers to closed)
  • system-voltage: the battery voltage, in V
  • rssi: the 915MHz radio signal strength

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Vents

curl

curl --location 'https://api.flair.co/api/vents' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

1326

Connection

keep-alive

PATCHOpen or Close a Vent

https://api.flair.co/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7

You can use the API to open and close a vent by setting percent-open to 100 or 0, respectively. The link to use should be api/vents/[VENT_ID]. See the attached example on how to structure the JSON body.

IMPORTANT: Please make sure structure mode is set to "manual". In "auto" mode, Flair will automatically adjust Vents to match the room set point, so your Vent command will get overwritten. In "manual" mode, there will be no further changes to the Vent position unless application or user makes an adjustment.

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Bodyraw

{
    "data": {
        "type": "vents",
        "attributes": {
            "percent-open": 100
        },
        "relationships": {}
    }
}

Example Request

Open or Close a Vent

View More

curl

curl --location --request PATCH 'https://api.flair.co/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data '{
    "data": {
        "type": "vents",
        "attributes": {
            "percent-open": 100
        },
        "relationships": {}
    }
}'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": {
    "type": "vents",
    "relationships": {
      "closest-puck": {
        "links": {
          "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/closest-pucks"
        }
      },
      "structure": {
        "links": {
          "self": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/relationships/structure",
          "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/structure"
        },
        "data": {
          "type": "structures",
          "id": "4351"
        }
      },
      "vent-states": {
        "links": {
          "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/vent-states"
        }
      },
      "room": {
        "links": {
          "self": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/relationships/room",
          "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/room"
        },
        "data": {
          "type": "rooms",
          "id": "8704"
        }
      },
      "current-state": {
        "links": {
          "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/current-state"
        }
      },
      "sensor-readings": {
        "links": {
          "related": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7/sensor-readings"
        }
      }
    },
    "attributes": {
      "created-at": "2017-08-03T01:06:38.367916+00:00",
      "name": "Office Vent",
      "setup-lightstrip": 1,
      "inactive": false,
      "percent-open": 100,
      "updated-at": "2018-12-17T23:16:44.130172+00:00"
    },
    "id": "13c44351-5883-5cbe-52cf-da0c1a1505f7"
  },
  "meta": {
    "self": "/api/vents/13c44351-5883-5cbe-52cf-da0c1a1505f7"
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

1220

Connection

keep-alive

GETThermostats

https://api.flair.co/api/thermostats

The thermostats endpoint lists the thermostats associated with the home. The important parameters are the "name", as well as "static-vents". The number of static vents is a user-provided estimate of how many vents (both Flair and non-Flair) are serviced by this thermostat.

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Thermostats

curl

curl --location 'https://api.flair.co/api/thermostats' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": [\
    {\
      "type": "thermostats",\
      "relationships": {\
        "structure": {\
          "links": {\
            "self": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/relationships/structure",\
            "related": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "remote-sensor": {\
          "links": {\
            "related": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/remote-sensor"\
          }\
        },\
        "integration-structure": {\
          "links": {\
            "self": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/relationships/integration_structures",\
            "related": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/integration_structures"\
          },\
          "data": {\
            "type": "integration-structures",\
            "id": "ed85df89-2fcc-4e19-a6e3-1dd47cf13294"\
          }\
        },\
        "room": {\
          "links": {\
            "self": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/relationships/room",\
            "related": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/room"\
          },\
          "data": {\
            "type": "rooms",\
            "id": "8844"\
          }\
        },\
        "thermostat-states": {\
          "links": {\
            "related": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/thermostat-states"\
          }\
        },\
        "current-state": {\
          "links": {\
            "related": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/current-state"\
          }\
        },\
        "zone": {\
          "links": {\
            "self": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/relationships/zone",\
            "related": "/api/thermostats/1c118d41-ea4d-406a-87c6-990cc0478bf5/zone"\
          },\
          "data": {\
            "type": "zones",\
            "id": "35941"\
          }\
        }\
      },\
      "attributes": {\
        "source-id": "UyjfvFApM1H-1m3bZDb-4JHVt2k_js9E",\
        "thermostat-model": null,\
        "created-at": "2018-12-17T21:42:20.450662+00:00",\
        "capabilities": "Both",\
        "disabled": false,\
        "name": "Upstairs Thermostat",\
        "enable-room-tile-set-point-adjust": true,\
        "make": "nest",\
        "static-vents": 16,\
        "updated-at": "2018-12-17T21:43:19.482052+00:00"\
      },\
      "id": "1c118d41-ea4d-406a-87c6-990cc0478bf5"\
    },\
    {\
      "type": "thermostats",\
      "relationships": {\
        "structure": {\
          "links": {\
            "self": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/relationships/structure",\
            "related": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/structure"\
          },\
          "data": null\
        },\
        "remote-sensor": {\
          "links": {\
            "related": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/remote-sensor"\
          }\
        },\
        "integration-structure": {\
          "links": {\
            "self": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/relationships/integration_structures",\
            "related": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/integration_structures"\
          },\
          "data": {\
            "type": "integration-structures",\
            "id": "5da88405-068c-4ac8-bfc9-4718450aa64d"\
          }\
        },\
        "room": {\
          "links": {\
            "self": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/relationships/room",\
            "related": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/room"\
          },\
          "data": null\
        },\
        "thermostat-states": {\
          "links": {\
            "related": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/thermostat-states"\
          }\
        },\
        "current-state": {\
          "links": {\
            "related": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/current-state"\
          }\
        },\
        "zone": {\
          "links": {\
            "self": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/relationships/zone",\
            "related": "/api/thermostats/56e38150-8da8-48e0-a467-3235fbd4932a/zone"\
          },\
          "data": {\
            "type": "zones",\
            "id": "9494"\
          }\
        }\
      },\
      "attributes": {\
        "source-id": "511829661106",\
        "thermostat-model": "apolloSmart",\
        "created-at": "2018-02-13T06:00:56.835670+00:00",\
        "capabilities": "Both",\
        "disabled": false,\
        "name": "Ecobeeeee",\
        "enable-room-tile-set-point-adjust": null,\
        "make": "ecobee",\
        "static-vents": null,\
        "updated-at": "2018-02-13T06:00:56.853091+00:00"\
      },\
      "id": "56e38150-8da8-48e0-a467-3235fbd4932a"\
    }\
  ],
  "meta": {
    "self": "/api/thermostats",
    "first": "/api/thermostats?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/thermostats?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

3680

Connection

keep-alive

GETHVAC-Units

https://api.flair.co/api/hvac-units

The HVAC-Units endpoint shows the current state of the minisplit, as well as the possible states supported by this minisplit. HVAC-Unit and minisplit are both terms referring to the same thing and is used interchangeably.

The attributes are:

  • name: the user assigned name of the minisplit
  • temperature: the temperature the unit was last set to by Flair, in F or C, depending on the "temperature-scale" constraint
  • constraints: the possible states supported
  • fan-speed: the fan speed last set by Flair "High", "Medium", "Low", "Auto"
  • swing: "On" for swing, "Off" for no swing, if available
  • mode: "Heat", "Cool", "Fan", "Dry" or "Auto", depending on availability
  • power: the last power state set by Flair "On" or "Off"

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

HVAC-Units

curl

curl --location 'https://api.flair.co/api/hvac-units' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": [\
    {\
      "type": "hvac-units",\
      "attributes": {\
        "incremental": false,\
        "temperature": 75,\
        "button-presses": [],\
        "type": "MiniSplit",\
        "temperature-compensation": "THIRD PARTY",\
        "constraints": {\
          "ON": {\
            "DRY": {\
              "OFF": {\
                "FAN AUTO": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ]\
              }\
            },\
            "FAN": {\
              "OFF": {\
                "FAN HI": [\
                  "--"\
                ],\
                "FAN LOW": [\
                  "--"\
                ],\
                "FAN MID": [\
                  "--"\
                ],\
                "FAN AUTO": [\
                  "--"\
                ]\
              }\
            },\
            "AUTO": {\
              "OFF": {\
                "FAN AUTO": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ]\
              }\
            },\
            "COOL": {\
              "OFF": {\
                "FAN HI": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ],\
                "FAN LOW": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ],\
                "FAN MID": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ],\
                "FAN AUTO": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ]\
              }\
            },\
            "HEAT": {\
              "OFF": {\
                "FAN HI": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ],\
                "FAN LOW": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ],\
                "FAN MID": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ],\
                "FAN AUTO": [\
                  "62",\
                  "63",\
                  "64",\
                  "65",\
                  "66",\
                  "67",\
                  "68",\
                  "69",\
                  "70",\
                  "71",\
                  "72",\
                  "73",\
                  "74",\
                  "75",\
                  "76",\
                  "77",\
                  "78",\
                  "79",\
                  "80",\
                  "81",\
                  "82",\
                  "83",\
                  "84",\
                  "85",\
                  "86"\
                ]\
              }\
            }\
          },\
          "OFF": {\
            "AUTO": {\
              "OFF": {\
                "FAN AUTO": [\
                  "72"\
                ]\
              }\
            }\
          },\
          "temperature-scale": "F"\
        },\
        "model-id": "2efdce3c-4034-4901-96ca-cdecd546b3d4",\
        "quiet-hours-end": null,\
        "to-download": false,\
        "fan-speed": "Auto",\
        "default-fan-speed": "AUTO",\
        "swing-auto": true,\
        "make-name": "LENNOX",\
        "mode": "Heat",\
        "ir-device-model-id": null,\
        "codesets": [\
          {\
            "id": 11,\
            "codeset-id": "ab48bedc-069c-46e6-bc3c-9a48bbad3d5b",\
            "capabilities": "Both",\
            "rank": 1\
          }\
        ],\
        "quiet-hours-start": null,\
        "swing": "Off",\
        "name": "New HVAC Device",\
        "make-id": "a3a2ea6d-4ebf-4357-98c3-21f18b567b44",\
        "codeset-id": "ab48bedc-069c-46e6-bc3c-9a48bbad3d5b",\
        "capabilities": "Both",\
        "power": "On"\
      },\
      "relationships": {\
        "structure": {\
          "links": {\
            "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/structure",\
            "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "4351"\
          }\
        },\
        "room": {\
          "links": {\
            "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/room",\
            "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/room"\
          },\
          "data": {\
            "type": "rooms",\
            "id": "8310"\
          }\
        },\
        "make": {\
          "links": {\
            "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/make",\
            "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/make"\
          }\
        },\
        "puck": {\
          "links": {\
            "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/puck",\
            "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/puck"\
          },\
          "data": {\
            "type": "pucks",\
            "id": "46eb5eef-7324-5748-2384-3f9ff8996373"\
          }\
        },\
        "current-state": {\
          "links": {\
            "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/current-state"\
          },\
          "data": {\
            "type": "hvac-unit-states",\
            "id": "dd4c1d7d-b333-4418-8837-57adc36030ab"\
          }\
        },\
        "zone": {\
          "links": {\
            "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/zone",\
            "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/zone"\
          },\
          "data": {\
            "type": "zones",\
            "id": "35940"\
          }\
        },\
        "hvac-unit-states": {\
          "links": {\
            "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/hvac-unit-states"\
          }\
        }\
      },\
      "id": "3b369fae-cc16-452c-80d8-4525e89efa42"\
    },\
    {\
      "type": "hvac-units",\
      "attributes": {\
        "incremental": false,\
        "temperature": null,\
        "button-presses": null,\
        "type": "MiniSplit",\
        "temperature-compensation": null,\
        "constraints": {},\
        "model-id": null,\
        "quiet-hours-end": null,\
        "to-download": null,\
        "fan-speed": null,\
        "default-fan-speed": null,\
        "swing-auto": true,\
        "make-name": "GE (GENERAL ELECTRIC)",\
        "mode": null,\
        "ir-device-model-id": null,\
        "codesets": [\
          {\
            "id": 3,\
            "codeset-id": "7593da1e-bc50-4b86-8576-02dc1bd1fa13",\
            "capabilities": "Fan Only",\
            "rank": 1\
          },\
          {\
            "id": 2,\
            "codeset-id": "292",\
            "capabilities": "Both",\
            "rank": 4\
          },\
          {\
            "id": 5,\
            "codeset-id": "a680ed8a-0c53-4ea7-af5a-7d87f8299d96",\
            "capabilities": "Fan Only",\
            "rank": 1\
          },\
          {\
            "id": 6,\
            "codeset-id": "1a9c3ff0-1b7d-4b8a-8b4f-a2759cd693e6",\
            "capabilities": "Fan Only",\
            "rank": 1\
          },\
          {\
            "id": 7,\
            "codeset-id": "28566893-f929-45d1-acf2-eb91284668a9",\
            "capabilities": "Fan Only",\
            "rank": 1\
          },\
          {\
            "id": 8,\
            "codeset-id": "aae58e41-5046-4e4b-8453-e5f1e5423049",\
            "capabilities": "Fan Only",\
            "rank": 1\
          },\
          {\
            "id": 1,\
            "codeset-id": "40",\
            "capabilities": "Both",\
            "rank": 3\
          },\
          {\
            "id": 9,\
            "codeset-id": "40",\
            "capabilities": null,\
            "rank": null\
          },\
          {\
            "id": 4,\
            "codeset-id": "637",\
            "capabilities": "Both",\
            "rank": 4\
          }\
        ],\
        "quiet-hours-start": null,\
        "swing": null,\
        "name": "Minisplit",\
        "make-id": "226e310b-07fa-48e9-8ac6-af8a025b5935",\
        "codeset-id": null,\
        "capabilities": "Both",\
        "power": null\
      },\
      "relationships": {\
        "structure": {\
          "links": {\
            "self": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/relationships/structure",\
            "related": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/structure"\
          },\
          "data": null\
        },\
        "room": {\
          "links": {\
            "self": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/relationships/room",\
            "related": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/room"\
          },\
          "data": null\
        },\
        "make": {\
          "links": {\
            "self": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/relationships/make",\
            "related": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/make"\
          }\
        },\
        "puck": {\
          "links": {\
            "self": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/relationships/puck",\
            "related": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/puck"\
          },\
          "data": null\
        },\
        "current-state": {\
          "links": {\
            "related": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/current-state"\
          },\
          "data": null\
        },\
        "zone": {\
          "links": {\
            "self": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/relationships/zone",\
            "related": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/zone"\
          },\
          "data": {\
            "type": "zones",\
            "id": "15033"\
          }\
        },\
        "hvac-unit-states": {\
          "links": {\
            "related": "/api/hvac-units/af66f947-e9e2-4a39-a0bd-e0f4e0ab6956/hvac-unit-states"\
          }\
        }\
      },\
      "id": "af66f947-e9e2-4a39-a0bd-e0f4e0ab6956"\
    }\
  ],
  "meta": {
    "self": "/api/hvac-units",
    "first": "/api/hvac-units?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/hvac-units?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

6957

Connection

keep-alive

PATCHChange Minisplit Settings

https://api.flair.co/api/hvac-units/d5edfafc-34d2-4096-9519-b2280288f855

Use PATCH commands to api/hvac-units/[HVACUNIT_ID] to adjust minisplit settings. See the attached example on how to structure the JSON body. Power can be "On" or "Off". Mode is "Heat" or "Cool". Fan speed is "High", "Mid", "Low". Swing is either "On" or "Off". Temperature may only be the same units as listed in the constraints field. If the constraints are in Fahrenheit, please only send Fahrenheit requests, and vice versa.

IMPORTANT: Please make sure structure mode is set to "manual". In "auto" mode, Flair will automatically adjust minisplits to match the room set point, so your minisplit command will get overwritten. In "manual" mode, there will be no further changes to the minisplit settings unless application or user makes an adjustment.

IMPORTANT: Please check the constraints field to determine what states are allowable, as well as if you need to use Fahrenheit or Celsius. If you provide a state that is not support in the contraints object, Flair will do it's best to find the closest fit. To ensure deterministic behavior, please follow the constraints closely.

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Bodyraw

View More

{
    "data": {
        "type": "hvac-units",
        "attributes": {
            "temperature": 70,
            "fan-speed": "High",
            "swing": "Off",
            "mode": "Heat",
            "power": "On"
        },
        "relationships": {}
    }
}

Example Request

Change Minisplit Settings

View More

curl

curl --location --request PATCH 'https://api.flair.co/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data '{
    "data": {
        "type": "hvac-units",
        "attributes": {
            "temperature": 70,
            "fan-speed": "High"
        },
        "relationships": {}
    }
}'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "data": {
    "type": "hvac-units",
    "attributes": {
      "swing-auto": true,
      "make-id": "a3a2ea6d-4ebf-4357-98c3-21f18b567b44",
      "codeset-id": "ab48bedc-069c-46e6-bc3c-9a48bbad3d5b",
      "quiet-hours-end": null,
      "quiet-hours-start": null,
      "power": "On",
      "temperature-compensation": "THIRD PARTY",
      "codesets": [\
        {\
          "id": 11,\
          "codeset-id": "ab48bedc-069c-46e6-bc3c-9a48bbad3d5b",\
          "capabilities": "Both",\
          "rank": 1\
        }\
      ],
      "to-download": false,
      "name": "New HVAC Device",
      "constraints": {
        "ON": {
          "DRY": {
            "OFF": {
              "FAN AUTO": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ]
            }
          },
          "FAN": {
            "OFF": {
              "FAN HI": [\
                "--"\
              ],
              "FAN LOW": [\
                "--"\
              ],
              "FAN MID": [\
                "--"\
              ],
              "FAN AUTO": [\
                "--"\
              ]
            }
          },
          "AUTO": {
            "OFF": {
              "FAN AUTO": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ]
            }
          },
          "COOL": {
            "OFF": {
              "FAN HI": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ],
              "FAN LOW": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ],
              "FAN MID": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ],
              "FAN AUTO": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ]
            }
          },
          "HEAT": {
            "OFF": {
              "FAN HI": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ],
              "FAN LOW": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ],
              "FAN MID": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ],
              "FAN AUTO": [\
                "62",\
                "63",\
                "64",\
                "65",\
                "66",\
                "67",\
                "68",\
                "69",\
                "70",\
                "71",\
                "72",\
                "73",\
                "74",\
                "75",\
                "76",\
                "77",\
                "78",\
                "79",\
                "80",\
                "81",\
                "82",\
                "83",\
                "84",\
                "85",\
                "86"\
              ]
            }
          }
        },
        "OFF": {
          "AUTO": {
            "OFF": {
              "FAN AUTO": [\
                "72"\
              ]
            }
          }
        },
        "temperature-scale": "F"
      },
      "fan-speed": "High",
      "temperature": 70,
      "ir-device-model-id": null,
      "swing": "Off",
      "incremental": false,
      "make-name": "LENNOX",
      "mode": "Heat",
      "button-presses": [],
      "model-id": "2efdce3c-4034-4901-96ca-cdecd546b3d4",
      "capabilities": "Both",
      "type": "MiniSplit",
      "default-fan-speed": "AUTO"
    },
    "relationships": {
      "hvac-unit-states": {
        "links": {
          "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/hvac-unit-states"
        }
      },
      "puck": {
        "links": {
          "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/puck",
          "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/puck"
        },
        "data": {
          "type": "pucks",
          "id": "46eb5eef-7324-5748-2384-3f9ff8996373"
        }
      },
      "room": {
        "links": {
          "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/room",
          "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/room"
        },
        "data": {
          "type": "rooms",
          "id": "8310"
        }
      },
      "make": {
        "links": {
          "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/make",
          "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/make"
        }
      },
      "zone": {
        "links": {
          "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/zone",
          "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/zone"
        },
        "data": {
          "type": "zones",
          "id": "35940"
        }
      },
      "structure": {
        "links": {
          "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/relationships/structure",
          "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/structure"
        },
        "data": {
          "type": "structures",
          "id": "4351"
        }
      },
      "current-state": {
        "links": {
          "related": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42/current-state"
        },
        "data": {
          "type": "hvac-unit-states",
          "id": "ce1d512c-20af-478e-90fe-ab97f0628761"
        }
      }
    },
    "id": "3b369fae-cc16-452c-80d8-4525e89efa42"
  },
  "meta": {
    "self": "/api/hvac-units/3b369fae-cc16-452c-80d8-4525e89efa42"
  }
}

Access-Control-Allow-Credentials

true

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode

Access-Control-Allow-Origin

None

Access-Control-Max-Age

21600

Content-Type

application/json; charset=utf-8

Strict-Transport-Security

max-age=31536000

Content-Length

4188

Connection

keep-alive

GETBridges

https://api.flair.co/api/bridges

The Bridge endpoint lists all the Flair Bridges associated with the home. Useful parameters are:

  • name: the Flair-generated name of the Bridge

  • current-rssi: the current 915MHz radio signal strength

  • display-number: the 4-character code identifying this bridge during setup

  • led-brightness: the brightness level of the Bridge LEDs

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Bridges

curl

curl --location 'https://api.flair.co/api/bridges' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (1)

View More

json

{
  "meta": {
    "self": "/api/bridges",
    "first": "/api/bridges?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "last": "/api/bridges?page%5Bsize%5D=50&page%5Bpage%5D=1",
    "next": null,
    "prev": null
  },
  "data": [\
    {\
      "type": "bridges",\
      "attributes": {\
        "inactive": false,\
        "led-brightness": 100,\
        "features": null,\
        "name": "Bridge-0088",\
        "updated-at": "2024-05-30T22:04:25.485114+00:00",\
        "reporting-interval-ds": 255,\
        "display-number": "0088",\
        "current-rssi": -34,\
        "created-at": "2024-05-14T22:07:37.983599+00:00"\
      },\
      "relationships": {\
        "bridge-states": {\
          "links": {\
            "related": "/api/bridges/0088858b-a8f9-5165-f57e-d694ff7b283f/bridge-states"\
          }\
        },\
        "room": {\
          "links": {\
            "self": "/api/bridges/0088858b-a8f9-5165-f57e-d694ff7b283f/relationships/room",\
            "related": "/api/bridges/0088858b-a8f9-5165-f57e-d694ff7b283f/room"\
          },\
          "data": {\
            "type": "rooms",\
            "id": null\
          }\
        },\
        "hardware-version": {\
          "links": {\
            "related": "/api/bridge/0088858b-a8f9-5165-f57e-d694ff7b283f/hardware-version"\
          },\
          "data": {\
            "type": "hardware-versions",\
            "id": "620a685e-846a-4d91-8ae3-894c966a13f3"\
          }\
        },\
        "current-reading": {\
          "links": {\
            "related": "/api/bridges/0088858b-a8f9-5165-f57e-d694ff7b283f/current-reading"\
          }\
        },\
        "current-state": {\
          "links": {\
            "related": "/api/bridges/0088858b-a8f9-5165-f57e-d694ff7b283f/current-state"\
          }\
        },\
        "structure": {\
          "links": {\
            "self": "/api/bridge/0088858b-a8f9-5165-f57e-d694ff7b283f/relationships/structure",\
            "related": "/api/bridge/0088858b-a8f9-5165-f57e-d694ff7b283f/structure"\
          },\
          "data": {\
            "type": "structures",\
            "id": "38938"\
          }\
        },\
        "sensor-readings": {\
          "links": {\
            "related": "/api/bridges/0088858b-a8f9-5165-f57e-d694ff7b283f/sensor-readings"\
          }\
        }\
      },\
      "id": "0088858b-a8f9-5165-f57e-d694ff7b283f"\
    }\
  ]
}

Content-Type

application/json

GETBridge Current Reading

https://api.flair.co/api/bridges/0088858b-a8f9-5165-f57e-d694ff7b283f/current-reading

The Bridge endpoint will have a link to the Bridge current-reading endpoint. Here you will find the latest set of sensor readings for this device, with information such as:

  • created_at: date and time of this reading, in GMT

  • die-temperature: not currently implemented

  • rssi: the WiFi radio signal strength (integer). 0 if Bridge is connected via Ethernet

  • system-voltage: not currently implemented

AUTHORIZATIONOAuth 2.0

Access Token

HEADERS

Content-Type

application/vnd.api+json

Example Request

Bridge Current Reading

curl

curl --location 'https://api.flair.co/api/bridges/3f1fe85d-e9a1-52c0-b224-e48590fe8aa5/current-reading' \
--header 'Authorization: Bearer ACCESS_TOKEN'

200 OK

Example Response

  • Body
  • Headers (1)

View More

json

{
  "meta": {
    "self": "/api/bridges/3f1fe85d-e9a1-52c0-b224-e48590fe8aa5/current-reading"
  },
  "data": {
    "type": "bridge-sensor-readings",
    "relationships": {
      "bridge": {
        "links": {
          "related": "/api/bridge-sensor-readings/28d0b26f-26e0-436a-9f32-10959f4ac8dd/bridge"
        },
        "data": {
          "type": "bridges",
          "id": "3f1fe85d-e9a1-52c0-b224-e48590fe8aa5"
        }
      }
    },
    "attributes": {
      "system-voltage": null,
      "die-temperature": null,
      "message-version": 0,
      "rssi": 0,
      "firmware-version-w": 276,
      "created-at": "2024-05-31T20:37:06.020518+00:00"
    },
    "id": "28d0b26f-26e0-436a-9f32-10959f4ac8dd"
  }
}

Content-Type

application/json

GETRemote Sensor Current Reading

https://api.flair.co/api/remote-sensors/6cb639a3-6372-48fc-8624-704ba812cae0/current-reading

Returns the latest sensor reading from a Flair Remote Sensor.

A Remote Sensor is a small, battery-powered, wireless temperature and humidity sensor that pairs with a Puck or Bridge to extend climate monitoring beyond the device's onboard sensors. Each Remote Sensor reports temperature (in Celsius and Fahrenheit), relative humidity (%), battery level (%), and radio signal strength (RSSI in dBm).

Use this endpoint to poll the most recent reading for a single sensor identified by its id. To enumerate all Remote Sensors associated with the authenticated user, use GET /api/remote-sensors.

Rate limited: yes — see collection-level rate-limit notes.

AUTHORIZATIONOAuth 2.0

HEADERS

Content-Type

application/vnd.api+json

Example Request

Remote Sensor Current Reading

View More

curl

curl --location 'https://api.flair.co/api/remote-sensors/ee0f9a3f-31c2-46aa-b573-6c3b30923fa4/current-reading'

200 OK

Example Response

  • Body
  • Headers (8)

View More

json

{
  "meta": {
    "self": "/api/remote-sensors/ee0f9a3f-31c2-46aa-b573-6c3b30923fa4/current-reading"
  },
  "data": {
    "type": "remote-sensor-readings",
    "attributes": {
      "occupied": null,
      "humidity": null,
      "temperature-c": 27.222222222222225,
      "created-at": "2024-07-05T02:00:36.322347+00:00"
    },
    "relationships": {
      "remote-sensor": {
        "links": {
          "related": "/api/remote-sensor-readings/7db825e3-4d34-499b-9199-5439ba27aa9e/remote-sensor"
        },
        "data": {
          "type": "remote-sensors",
          "id": "ee0f9a3f-31c2-46aa-b573-6c3b30923fa4"
        }
      }
    },
    "id": "7db825e3-4d34-499b-9199-5439ba27aa9e"
  }
}

Content-Type

application/json; charset=utf-8

Access-Control-Allow-Origin

*

Access-Control-Max-Age

21600

Access-Control-Allow-Headers

authorization, content-type, accept, x-admin-mode, user-agent

Access-Control-Allow-Credentials

true

Connection

close

Server

Werkzeug/0.14.1 Python/3.9.19

Date

Fri, 05 Jul 2024 14:56:50 GMT