{"paths": {"/demand-response-devices": {"get": {"description": "", "responses": {"200": {"description": "List of Resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseDevice"}}}}}}}}, "security": [{"flair_api_auth": ["demand-response.view"]}]}, "summary": "List available resources and create new ones when permitted"}, "/demand-response-devices/{resource_id}": {"get": {"description": "", "responses": {"200": {"description": "The requested resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseDevice"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.view"]}]}, "summary": "List available resources and create new ones when permitted", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-devices/{resource_id}/program": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}}, "summary": "Retrieve related demand-response-programs", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-partners": {"get": {"description": "Returns a list of Partners filtered by owner. Each Partner resources is a brief summary of a utility that is administering Flair DR programs. Includes contact information for the utility's demand response program support to allow the Flair App to inform users how to get further information from the company. Supports a relative URL on the assets.flair.co domain to be displayed. Logos should be emailed to support@flair.co until further administrative tools are developed.", "responses": {"200": {"description": "List of Resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponsePartner"}}}}}}}}, "security": [{"flair_api_auth": ["structures.view"]}]}, "post": {"description": "\"When creating a new Partner resource using this endpoint, it will be automatically linked to the User that creates it. That user will have the ability to update this resource and its child resources (Programs, Documents), and to create new Demand Response Events for Programs adminsterd by this partner. Creating new resources requires your API Token to have the demand-response.edit scope.", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponsePartner"}}}}}}, "responses": {"201": {"description": "Newly created resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponsePartner"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources representing a utility"}, "/demand-response-partners/{resource_id}": {"get": {"description": "Returns information about one Partner resource.", "responses": {"200": {"description": "The requested resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponsePartner"}}}}}}}, "security": [{"flair_api_auth": ["structures.view"]}]}, "patch": {"description": "Deletes the Partner resource. After deletion you will be unable to modify, update, or created associated resources like programs and events.", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponsePartner"}}}}}}, "responses": {"200": {"description": "Updated resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponsePartner"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "delete": {"description": "Deletes the Partner resource. After deletion you will be unable to modify, update, or created associated resources like programs and events.", "responses": {"204": {"description": "The resource has been deleted"}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources representing a utility", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-partners/{resource_id}/relationships/programs": {"patch": {"description": "Replace the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "post": {"description": "Update the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "delete": {"description": "Update the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "summary": "Modify related demand-response-programs", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-partners/{resource_id}/programs": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}}}, "summary": "Retrieve related demand-response-programs", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-programs": {"get": {"description": "Returns a list of Programs filtered by owner. Programs have names, postal codes, brief descriptions, and logos. Logo URLs are relative from assets.flair.co, so please email the desired logo to support@flair.co until further administrative tools are developed.", "responses": {"200": {"description": "List of Resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}}, "security": [{"flair_api_auth": ["structures.view"]}]}, "post": {"description": "Create a new demand response program. It must include an owning partner, that the requesting user has access to, in the demand-response-partner relationship or you will not be able to edit it further or create related resources like events.", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}, "responses": {"201": {"description": "Newly created resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources representing a utility's Demand Response Program"}, "/demand-response-programs/{resource_id}": {"get": {"description": "Returns information about one Program resource.", "responses": {"200": {"description": "The requested resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}, "security": [{"flair_api_auth": ["structures.view"]}]}, "patch": {"description": "Deletes the Program resource. After deletion you will be unable to modify, update, or created associated resources like events.", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}, "responses": {"200": {"description": "Updated resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "delete": {"description": "Deletes the Program resource. After deletion you will be unable to modify, update, or created associated resources like events.", "responses": {"204": {"description": "The resource has been deleted"}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources representing a utility's Demand Response Program", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-programs/{resource_id}/relationships/demand-response-partner": {"patch": {"description": "Replace the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-partners"], "description": "type of the resource to link to"}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "summary": "Modify related demand-response-partners", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-programs/{resource_id}/demand-response-partner": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponsePartner"}}}}}}}}, "summary": "Retrieve related demand-response-partners", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-programs/{resource_id}/relationships/documents": {"patch": {"description": "Replace the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-documents"], "description": "type of the resource to link to"}}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "post": {"description": "Update the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-documents"], "description": "type of the resource to link to"}}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "delete": {"description": "Update the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-documents"], "description": "type of the resource to link to"}}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "summary": "Modify related demand-response-documents", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-programs/{resource_id}/documents": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseDocument"}}}}}}}}}, "summary": "Retrieve related demand-response-documents", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-documents": {"get": {"description": "Returns a list of Documents. This list is not filtered by owner order or program.", "responses": {"200": {"description": "List of Resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseDocument"}}}}}}}}, "security": [{"flair_api_auth": ["structures.view"]}]}, "post": {"description": "Create a new Demand Response Document. It must include an owning program, that the requesting user has access to, in the demand-response-program relationship or you will not be able to edit it further.", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseDocument"}}}}}}, "responses": {"201": {"description": "Newly created resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseDocument"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources describing user registration documents."}, "/demand-response-documents/{resource_id}": {"get": {"description": "Returns information about one Document resource.", "responses": {"200": {"description": "The requested resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseDocument"}}}}}}}, "security": [{"flair_api_auth": ["structures.view"]}]}, "patch": {"description": "Deletes the Document resource.", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseDocument"}}}}}}, "responses": {"200": {"description": "Updated resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseDocument"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "delete": {"description": "Deletes the Document resource.", "responses": {"204": {"description": "The resource has been deleted"}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources describing user registration documents.", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-documents/{resource_id}/relationships/program": {"patch": {"description": "Replace the current relationship links", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}}}}, "responses": {"204": {"description": "Relationship updated"}}}, "summary": "Modify related demand-response-programs", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-documents/{resource_id}/program": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}}, "summary": "Retrieve related demand-response-programs", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-events": {"get": {"description": "Returns a list of Events belonging to programs owned by the requesting user", "responses": {"200": {"description": "List of Resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseEvent"}}}}}}}}, "security": [{"flair_api_auth": ["demand-response.view"]}]}, "post": {"description": "Create a new Demand Response Event. start-time, end-time, and linking to the demand-response-program this event is attached to are required to create it. Optionally, you can specify a subset of postal codes or structure ids to apply this event to if it should not be applied to all structures and postal codes in the program.", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseEvent"}}}}}}, "responses": {"201": {"description": "Newly created resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseEvent"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources representing Demand Response Events."}, "/demand-response-events/{resource_id}": {"get": {"description": "Returns information about one Event resource.", "responses": {"200": {"description": "The requested resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseEvent"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.view"]}]}, "delete": {"description": "Cancels, the event resource. It will no longer show up in the list of events, but will propogate it cancelation to all affected structures.", "responses": {"204": {"description": "The resource has been deleted"}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List or Create resources representing Demand Response Events.", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-events/{resource_id}/program": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseProgram"}}}}}}}}, "summary": "Retrieve related demand-response-programs", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-events/{resource_id}/selected-structures": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Structure"}}}}}}}}}, "summary": "Retrieve related structures", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-events/{resource_id}/selected-devices": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseDevice"}}}}}}}}}, "summary": "Retrieve related demand-response-devices", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-subscriptions": {"get": {"description": "", "responses": {"200": {"description": "List of Resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DemandResponseSubscription"}}}}}}}}, "security": [{"flair_api_auth": ["demand-response.view"]}]}, "post": {"description": "", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseSubscription"}}}}}}, "responses": {"201": {"description": "Newly created resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseSubscription"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List available resources and create new ones when permitted"}, "/demand-response-subscriptions/{resource_id}": {"get": {"description": "", "responses": {"200": {"description": "The requested resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseSubscription"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.view"]}]}, "post": {"description": "", "responses": {"200": {"description": "The requested resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseSubscription"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.view"]}]}, "patch": {"description": "", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseSubscription"}}}}}}, "responses": {"200": {"description": "Updated resource", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseSubscription"}}}}}}}, "security": [{"flair_api_auth": ["demand-response.edit"]}]}, "summary": "List available resources and create new ones when permitted", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}, "/demand-response-subscriptions/{resource_id}/device": {"get": {"description": "Retrieve related resources", "responses": {"200": {"description": "The related resources", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DemandResponseDevice"}}}}}}}}, "summary": "Retrieve related demand-response-devices", "parameters": [{"in": "path", "name": "resource_id", "schema": {"type": "string", "format": "uuid"}, "required": true, "description": "ID of the resource"}]}}, "info": {"title": "Flair API", "version": "1.0.0"}, "openapi": "3.0.2", "components": {"schemas": {"DemandResponseDevice": {"type": "object", "properties": {"type": {"type": "string"}, "attributes": {"type": "object", "properties": {"operation-mode": {"description": "Operation Mode (Heat/Cool/Etc) of the Device. Enum of:\n* Heat\n* Cool\n* Fan\n* Dry\n* Auto", "type": "string", "enum": ["UNKNOWN", "AUTO", "COOL", "DRY", "FAN", "HEAT", "OTHER"]}, "written": {"type": "boolean", "readOnly": true, "description": "true if this IR codes for this state has been sent to the device"}, "swing": {"description": "Swing setting of the Device. Enum of:\n* On\n* Off", "type": "string", "enum": ["ON", "TOP", "OFF"]}, "written-at": {"type": "string", "format": "date-time", "readOnly": true, "description": "Time the IR code was sent to the device. In UTC"}, "fan-speed": {"description": "Fan speed setting of the Device. Enum of:\n* High\n* Medium\n* Low\n* Auto", "type": "string", "enum": ["AUTO", "LOW", "MEDIUM", "HIGH"]}, "power": {"description": "Power status of the Device. Enum of:\n* On\n* Off", "type": "string", "enum": ["ON", "OFF"]}, "set-point-temperature": {"type": "number", "format": "float", "description": "Current temperature the device is set to. Temperature scale depends on the internal scale used by the device."}, "created-at": {"type": "string", "format": "date-time", "readOnly": true, "description": "When the device was first created"}, "ambient-temperature": {"type": "number", "format": "float", "description": "Current ambient temperature in the room with the device in degrees C"}, "updated-at": {"type": "string", "format": "date-time", "readOnly": true, "description": "When the device or device state was last updated"}}}, "relationships": {"type": "object", "properties": {"program": {"description": "Program this device is associated with.", "type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}}}, "id": {"type": "string", "format": "uuid", "readOnly": true}}, "required": ["program"]}, "DemandResponseProgram": {"type": "object", "properties": {"type": {"type": "string"}, "attributes": {"type": "object", "properties": {"program-logo": {"type": "string", "description": "Path to logo on assets2.flair.co domain."}, "program-descriptions": {"type": "string", "description": "Longer Text description of Program. Limit to 140 chars"}, "program-name": {"type": "string", "description": "Advertising Name of the Demand Response Program the User is joining. Limit 50 chars"}, "event-name": {"type": "string", "description": "Custom name for DR events that will be shown to the User in the format \"{name} Event\", so if the events are called\"Energy Sense\" the user will see \"Energy Sense Events\""}, "created-at": {"type": "string", "format": "date-time", "readOnly": true}, "authorization-url": {"type": "string", "readOnly": true}, "postal-codes": {"type": "array", "description": "List of Postal (ZIP) codes the program is available in. Programs can be filtered on this value", "items": {"type": "string"}}, "updated-at": {"type": "string", "format": "date-time", "readOnly": true}}}, "relationships": {"type": "object", "properties": {"demand-response-partner": {"description": "Utility that is administering this program", "type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-partners"], "description": "type of the resource to link to"}}}}}, "documents": {"description": "List of legal documents the user needs to agree to join the program.", "type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-documents"], "description": "type of the resource to link to"}}}}}}}}, "id": {"type": "string", "format": "uuid", "readOnly": true}}}, "DemandResponsePartner": {"type": "object", "properties": {"type": {"type": "string"}, "attributes": {"type": "object", "properties": {"utility-name": {"type": "string", "description": "Name of the Utility, as you want it shown to users. Limit 50 chars."}, "support-email": {"type": "string", "format": "email", "description": "Email users can contact with questions about Demand Response programs."}, "support-website": {"type": "string", "description": "Website of Demand Response program(s)."}, "support-phone": {"type": "string", "description": "Phone number users can contact for Demand Response support."}, "created-at": {"type": "string", "format": "date-time", "readOnly": true}, "utility-logo": {"type": "string", "description": "Path to logo on assets2.flair.co domain."}, "updated-at": {"type": "string", "format": "date-time", "readOnly": true}}}, "relationships": {"type": "object", "properties": {"programs": {"description": "List of available Demand Response programs.", "type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}}}}, "id": {"type": "string", "format": "uuid", "readOnly": true}}}, "DemandResponseDocument": {"type": "object", "properties": {"type": {"type": "string"}, "attributes": {"type": "object", "properties": {"document-text": {"type": "string", "description": "Text for the document. Can use HTML for Formatting. No Limit"}, "document-title": {"type": "string", "description": "Summary of Document Purpose. Limit 50 chars."}, "created-at": {"type": "string", "format": "date-time", "readOnly": true}, "order-idnex": {"type": "integer", "format": "int32", "description": "Order document should be presented in. Lowest to highest."}, "updated-at": {"type": "string", "format": "date-time", "readOnly": true}}}, "relationships": {"type": "object", "properties": {"program": {"description": "Associated Program these documents belong to", "type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}}}, "id": {"type": "string", "format": "uuid", "readOnly": true}}}, "DemandResponseEvent": {"type": "object", "properties": {"type": {"type": "string"}, "attributes": {"type": "object", "properties": {"operation-mode": {"description": "When 'selected-devices' is also set. Set device(s) to power state. Enum of:\n* Heat\n* Cool\n* Fan\n* Dry\n* Auto", "type": "string", "enum": ["UNKNOWN", "AUTO", "COOL", "DRY", "FAN", "HEAT", "OTHER"]}, "swing": {"description": "When 'selected-devices' is also set. Set device(s) to swing state. Enum of:\n* On\n* Off", "type": "string", "enum": ["ON", "TOP", "OFF"]}, "fan-speed": {"description": "When 'selected-devices' is also set. Set device(s) to fan speed. Enum of:\n* High\n* Medium\n* Low\n* Auto", "type": "string", "enum": ["AUTO", "LOW", "MEDIUM", "HIGH"]}, "postal-codes": {"type": "array", "description": "List of Postal (ZIP) codes the event will be applied to.", "items": {"type": "string"}}, "event-type": {"description": "One of the following enum fields:\n* EmergencyEvent - Imminent Problem, Attempt to save maximum amount of power.\n* ScheduledPeak- Pre-planned DR event.\n* LoadShift - the event will increase the set point by the offset to shift load from gas to electric.\n        ", "type": "string", "enum": ["EmergencyEvent", "ScheduledPeak", "LoadShift"]}, "set-point-temperature-offset": {"type": "number", "format": "float", "description": "Offset the current set point of the structure(s)/device(s) in degrees C"}, "end-time": {"type": "string", "format": "date-time", "description": "Event end time. In UTC"}, "randomize-start-time": {"type": "boolean", "description": "Should apply randomized offset to the start time of the event"}, "power": {"description": "When 'selected-devices' is also set. Set device(s) to power state. Enum of:\n* On\n* Off", "type": "string", "enum": ["ON", "OFF"]}, "set-point-temperature": {"type": "number", "format": "float", "description": "When 'selected-devices' is also set. Set device(s) to this temperature in degrees C"}, "created-at": {"type": "string", "format": "date-time", "readOnly": true}, "pre-cool-heat": {"type": "boolean", "description": "Should attempt to pre-heat/pre-cool structures before event starts."}, "randomize-end-time": {"type": "boolean", "description": "Should apply randomized offset to the end time of the event"}, "allow-user-override": {"type": "boolean", "description": "Allow the user to override the home setting chanages from this event."}, "state": {"readOnly": true, "description": "Status of the Event. Enum of:\n* pending: the event is scheduled for the future\n* in-progress: the event has been applied to its targets\n* failed: the event failed to apply to its targets\n* opt-out: when targeted to a single structure or device, the owner has opted-out of the event\n* cancelled: this event has been ended early by the event creator\n* completed: the event has finished for all targets\n        ", "type": "string", "enum": ["PENDING", "IN_PROGRESS", "FAILED", "OPT-OUT", "CANCELLED", "COMPLETED"]}, "equipment-off": {"type": "boolean", "description": "Should turn off hvac units in the home. Similar to Away Off-Only mode."}, "start-time": {"type": "string", "format": "date-time", "description": "Event start time. In UTC"}, "heat-source-preference": {"type": "string", "enum": ["Backup"]}}}, "relationships": {"type": "object", "properties": {"program": {"description": "Program this event was issued as part of.", "type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-programs"], "description": "type of the resource to link to"}}}}}, "selected-structures": {"description": "List of structures to apply this event to", "type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["structures"], "description": "type of the resource to link to"}}}}}}, "selected-devices": {"description": "List of devices to apply this event to", "type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-devices"], "description": "type of the resource to link to"}}}}}}}}, "id": {"type": "string", "format": "uuid", "readOnly": true}}, "required": ["end-time", "program", "start-time"]}, "Structure": {"type": "object", "properties": {"type": {"type": "string"}, "attributes": {"type": "object", "properties": {"home": {"type": "boolean"}, "hysteresis-b": {"type": "integer", "format": "int32"}, "installer-type": {"type": "string"}, "set-point-temperature-c": {"type": "number", "format": "float"}, "dr-program-enrolled": {"type": "boolean", "writeOnly": true}, "current-dr-event-type": {"readOnly": true, "nullable": true, "type": "string", "enum": ["EmergencyEvent", "ScheduledPeak", "LoadShift"], "description": null}, "structure-heat-cool-mode-calculated": {"type": "string", "enum": ["HEAT", "COOL", "FLOAT", "AUTO", "AWAY", "EMERGENCY_HEAT"], "description": null}, "setup-mode": {"type": "boolean"}, "current-dr-state": {"type": "string", "enum": ["PreStart", "StartingSoon", "Ended", "Cancelled", "Active", "Aborted"], "description": null}, "home-away-mode": {"type": "string"}, "temperature-scale": {"type": "string"}, "structure-type": {"type": "integer", "format": "int32"}, "preheat-precool": {"type": "boolean"}, "puck-client-id": {"type": "string", "readOnly": true}, "default-hold-duration": {"type": "string"}, "temperature-compensation": {"type": "string"}, "reporting-gateway": {"type": "boolean"}, "location-type": {"type": "string"}, "vent-identification-mode": {"type": "boolean"}, "country": {"type": "string"}, "setup-mode-first-time": {"type": "boolean"}, "name": {"type": "string"}, "longitude": {"type": "number", "format": "float"}, "hysteresis-heat-cool-mode": {"type": "integer", "format": "int32"}, "tombstone": {"type": "boolean"}, "zip-code": {"type": "string"}, "dr-end-time": {"type": "string", "format": "date-time", "readOnly": true}, "dr-program-enrollment-meta": {"type": "object", "writeOnly": true}, "setup-mode-changed-at": {"type": "string", "format": "date-time", "readOnly": true}, "hold-until": {"type": "string", "format": "date-time", "nullable": true}, "state": {"type": "string"}, "hold-until-schedule-event": {"type": "boolean"}, "backpressure-priority": {"type": "string"}, "city": {"type": "string"}, "humidity-away-min": {"type": "integer", "format": "int32"}, "hold-reason": {"type": "string"}, "puck-client-secret": {"type": "string", "readOnly": true}, "vent-identification-mode-changed-at": {"type": "string", "format": "date-time", "readOnly": true}, "location": {"type": "string"}, "hysteresis-a": {"type": "integer", "format": "int32"}, "is-active": {"type": "boolean"}, "flair-spc-zone-rule": {"type": "string"}, "licensed-features": {"type": "array", "readOnly": true, "items": {"type": "string"}}, "latitude": {"type": "number", "format": "float"}, "structure-heat-cool-mode-popup-resolved-at": {"type": "string", "format": "date-time"}, "updated-at": {"type": "string", "format": "date-time", "readOnly": true}, "hysteresis-room-sense": {"type": "integer", "format": "int32"}, "humidity-away-max": {"type": "integer", "format": "int32"}, "structure-heat-cool-mode": {"type": "string", "enum": ["HEAT", "COOL", "FLOAT", "AUTO", "AWAY", "EMERGENCY_HEAT"], "description": null}, "use-remote-sensor-occupancy": {"type": "boolean"}, "release-channel": {"type": "string"}, "active-schedule-id": {"type": "string", "nullable": true}, "dr-start-time": {"type": "string", "format": "date-time", "readOnly": true}, "hvac-unit-group-lock": {"type": "boolean"}, "structure-away-mode": {"type": "string"}, "use-single-set-point": {"type": "boolean"}, "callback-url": {"type": "string"}, "time-zone": {"type": "string"}, "temp-away-max-c": {"type": "number", "format": "float"}, "temp-away-min-c": {"type": "number", "format": "float"}, "setup-complete": {"type": "boolean"}, "mode": {"type": "string"}, "created-at": {"type": "string", "format": "date-time", "readOnly": true}, "state-updated-at": {"type": "string", "format": "date-time", "readOnly": true}, "frozen-pipe-pet-protect": {"type": "boolean"}, "set-point-mode": {"type": "string"}, "setup-step": {"type": "string", "nullable": true}}}, "relationships": {"type": "object", "properties": {"geofence-events": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["geofence-events"], "description": "type of the resource to link to"}}}}}}, "puck2s": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["puck2s"], "description": "type of the resource to link to"}}}}}}, "releases": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["firmware-releases"], "description": "type of the resource to link to"}}}}}}, "current-state": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["structure-states"], "description": "type of the resource to link to"}}}}}, "bridges": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["bridges"], "description": "type of the resource to link to"}}}}}}, "beacon-sightings": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["beacon-sightings"], "description": "type of the resource to link to"}}}}}}, "integration-structures": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["integration-structures"], "description": "type of the resource to link to"}}}}}}, "licenses": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["licenses"], "description": "type of the resource to link to"}}}}}}, "bridge-pros": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["bridge-pros"], "description": "type of the resource to link to"}}}}}}, "hvac-units": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["hvac-units"], "description": "type of the resource to link to"}}}}}}, "releases-v2": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["firmware-releases-v2"], "description": "type of the resource to link to"}}}}}}, "geofences": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["geofences"], "description": "type of the resource to link to"}}}}}}, "ui-notifications": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["notifications"], "description": "type of the resource to link to"}}}}}}, "remote-sensors": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["remote-sensors"], "description": "type of the resource to link to"}}}}}}, "alerts": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["alerts"], "description": "type of the resource to link to"}}}}}}, "supported-device-brands": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["hvac-device-brands"], "description": "type of the resource to link to"}}}}}}, "weather-readings": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["weather-readings"], "description": "type of the resource to link to"}}}}}}, "vents": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["vents"], "description": "type of the resource to link to"}}}}}}, "current-conclusions": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["structure-conclusions"], "description": "type of the resource to link to"}}}}}}, "invitations": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["invitations"], "description": "type of the resource to link to"}}}}}}, "device-summary": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["device-summaries"], "description": "type of the resource to link to"}}}}}, "viewer-users": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["users"], "description": "type of the resource to link to"}}}}}}, "editor-users": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["users"], "description": "type of the resource to link to"}}}}}}, "pucks": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["pucks"], "description": "type of the resource to link to"}}}}}}, "schedules": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["schedules"], "description": "type of the resource to link to"}}}}}}, "demand-response-program-eligibility": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-program-eligibilities"], "description": "type of the resource to link to"}}}}}, "occupancy-conclusions": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["structure-conclusions"], "description": "type of the resource to link to"}}}}}}, "demand-response-program-enrollments": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-program-enrollments"], "description": "type of the resource to link to"}}}}}}, "default-zone": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["zones"], "description": "type of the resource to link to"}}}}}, "structure-states": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["structure-states"], "description": "type of the resource to link to"}}}}}}, "active-schedule": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["schedules"], "description": "type of the resource to link to"}}}}}, "current-weather": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["weather-readings"], "description": "type of the resource to link to"}}}}}, "rooms": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["rooms"], "description": "type of the resource to link to"}}}}}}, "admin-users": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["users"], "description": "type of the resource to link to"}}}}}}, "thermostats": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["thermostats"], "description": "type of the resource to link to"}}}}}}, "hvac-unit-groups": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["hvac-unit-groups"], "description": "type of the resource to link to"}}}}}}, "zones": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["zones"], "description": "type of the resource to link to"}}}}}}, "release-approvals": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["structure-firmware-release-approvals"], "description": "type of the resource to link to"}}}}}}, "user-events": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["structure-user-events"], "description": "type of the resource to link to"}}}}}}, "installer": {"type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["companies"], "description": "type of the resource to link to"}}}}}}}, "id": {"type": "string", "readOnly": true}}}, "DemandResponseSubscription": {"type": "object", "properties": {"type": {"type": "string"}, "attributes": {"type": "object", "properties": {"state": {"description": "Enum Representing the state of the this subscription. Values can be:\n* Register - Used by client, request that this device be enrolled in a subscription\n* Unregister - Used by client, request that this device be unenrolled from a subscription\n* Enrolled - Used by server, the device is currently enrolled in a subscription\n* Unenrolled - Used by server, the device is currently not enrolled in a subscription after having been enrolled\n\nClients should only send Reigster/Unregister otherwise the server will return a 422 Error\n", "type": "string", "enum": ["Register", "Enrolled", "Unregister", "Unenrolled"]}, "device-secret": {"type": "string", "writeOnly": true, "description": "Secret key used by the device to verify itself to the subscription endpoint"}, "created-at": {"type": "string", "format": "date-time", "readOnly": true, "description": "When the subscription was created"}, "updated-at": {"type": "string", "format": "date-time", "readOnly": true, "description": "When the subscription was lasst updated"}}}, "relationships": {"type": "object", "properties": {"device": {"description": "The device this subscription is for", "type": "object", "properties": {"data": {"type": "object", "properties": {"id": {"type": "string", "description": "ID of resource to link to"}, "type": {"type": "string", "enum": ["demand-response-devices"], "description": "type of the resource to link to"}}}}}}}, "id": {"type": "string", "format": "uuid", "readOnly": true}}}}, "securitySchemes": {"flair_api_auth": {"type": "oauth2", "flows": {"authorizationCode": {"authorizationUrl": "/oauth/authorize", "tokenUrl": "/oauth/token", "scopes": {"demand-response.edit": "Allows demand response API resources to be created, editted, or destroyed", "demand-response.view": "Allows demand response API resources that are protected from ordinary users to be viewed", "logs.view": "Allows viewing CloudWatch logs (admin only)", "structures.view": "Allows resources related to creates to be viewed."}}, "clientCredentials": {"tokenUrl": "/oauth/token", "scopes": {"demand-response.edit": "Allows demand response API resources to be created, editted, or destroyed", "demand-response.view": "Allows demand response API resources that are protected from ordinary users to be viewed", "logs.view": "Allows viewing CloudWatch logs (admin only)", "structures.view": "Allows resources related to creates to be viewed."}}}}}}}