{
  "swagger": "2.0",
  "info": {
    "title": "HouseRater QA",
    "description": "Connect to the HouseRater QA Cloud to create, update, and subscribe to inspections for your rating company using Power Automate. Contact HouseRater at support@houserater.com if you want to try using our system to improve your Energy Rating processes.",
    "version": "1.0"
  },
  "host": "qa.houserater.com",
  "basePath": "/api/v1/notify/powerAutomate",
  "schemes": [
    "https"
  ],
  "consumes": [],
  "produces": [],
  "paths": {
    "/createInspection": {},
    "/createNewInspection": {},
    "/updateInspection": {
      "post": {
        "responses": {
          "default": {
            "description": "default",
            "schema": {
              "type": "object",
              "properties": {}
            }
          }
        },
        "operationId": "UpdateInspection",
        "summary": "Create or update Inspection",
        "description": "Create or update an inspection inside of HouseRater",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "inspectionTemplateId": {
                  "type": "string",
                  "description": "inspectionTemplateId",
                  "title": ""
                },
                "builderId": {
                  "type": "string",
                  "description": "builderId",
                  "title": ""
                },
                "programs": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "programs"
                },
                "raters": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "raters"
                },
                "sharePointSubscriberId": {
                  "type": "string",
                  "description": "sharePointSubscriberId",
                  "title": "Share Point Subscriber Id"
                },
                "outlookEventId": {
                  "type": "string",
                  "description": "outlookEventId",
                  "title": ""
                },
                "address1": {
                  "type": "string",
                  "description": "address1"
                },
                "address2": {
                  "type": "string",
                  "description": "address2"
                },
                "city": {
                  "type": "string",
                  "description": "city"
                },
                "state": {
                  "type": "string",
                  "description": "state"
                },
                "zip": {
                  "type": "string",
                  "description": "zip"
                },
                "startTime": {
                  "type": "string",
                  "description": "startTime",
                  "title": ""
                },
                "endTime": {
                  "type": "string",
                  "description": "endTime",
                  "title": ""
                },
                "timeZone": {
                  "type": "string",
                  "description": "timeZone"
                }
              },
              "required": [
                "inspectionTemplateId",
                "builderId",
                "startTime",
                "endTime"
              ]
            }
          }
        ]
      }
    },
    "/createWebhook/onHouseUpdate": {
      "x-ms-notification-content": {
        "description": "Response from InspectionDataUpdated",
        "schema": {
          "type": "object",
          "properties": {
            "_id": {
              "type": "string",
              "description": "_id"
            }
          }
        }
      }
    },
    "/createWebhook/onSVStatusChange": {
      "x-ms-notification-content": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "name"
            },
            "status": {
              "type": "string",
              "description": "status"
            },
            "data": {
              "type": "object",
              "properties": {
                "sharePointSubscriberId": {
                  "type": "string",
                  "description": "Share Point Subscriber Id"
                },
                "outlookCalendarId": {
                  "type": "string",
                  "description": "Outlook Calendar Event Id"
                },
                "siteVisitDate": {
                  "type": "string",
                  "description": "siteVisitDate"
                },
                "notes": {
                  "type": "string",
                  "description": "notes"
                },
                "meters": {
                  "type": "object",
                  "properties": {
                    "electric": {
                      "type": "object",
                      "properties": {
                        "meterNumber": {
                          "type": "string",
                          "description": "Electric Meter Number"
                        }
                      },
                      "description": "electric"
                    }
                  },
                  "description": "meters"
                },
                "existingThermostats": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "outdoorTemp": {
                        "type": "integer",
                        "format": "int32",
                        "description": "Exisiting Thermostat Outdoor Temp"
                      },
                      "indoorTemp": {
                        "type": "integer",
                        "format": "int32",
                        "description": "Exisiting Thermostat Indoor Temp"
                      },
                      "supplyTemp": {
                        "type": "integer",
                        "format": "int32",
                        "description": "Exisiting Thermostat Supply Temp"
                      },
                      "modeOfOperation": {
                        "type": "string",
                        "description": "Exisiting Thermostat Mode of Operation"
                      },
                      "heating": {
                        "type": "object",
                        "properties": {
                          "ran": {
                            "type": "boolean",
                            "description": "Exisiting Thermostat Heating Ran"
                          },
                          "supplyTemp": {
                            "type": "integer",
                            "format": "int32",
                            "description": "Exisiting Thermostat Heating Supply Temp"
                          }
                        },
                        "description": "heating"
                      },
                      "emergencyHeat": {
                        "type": "object",
                        "properties": {
                          "ran": {
                            "type": "boolean",
                            "description": "ran"
                          },
                          "supplyTemp": {
                            "type": "integer",
                            "format": "int32",
                            "description": "Exisiting Thermostat Emergency Heat Supply Temp"
                          }
                        },
                        "description": "emergencyHeat"
                      },
                      "cooling": {
                        "type": "object",
                        "properties": {
                          "ran": {
                            "type": "boolean",
                            "description": "ran"
                          },
                          "supplyTemp": {
                            "type": "integer",
                            "format": "int32",
                            "description": "Exisiting Thermostat Cooling Supply Temp"
                          }
                        },
                        "description": "cooling"
                      },
                      "issues": {
                        "type": "string",
                        "description": "Exisiting Thermostat Issues"
                      },
                      "powerCutToThermostat": {
                        "type": "boolean",
                        "description": "Exisiting Thermostat Power Cut"
                      },
                      "existingWiring": {
                        "type": "object",
                        "properties": {
                          "selectedFiles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Exisiting Thermostat Existing Wire Selected Files"
                          }
                        },
                        "description": "existingWiring"
                      },
                      "newThermostatInstalled": {
                        "type": "boolean",
                        "description": "Exisiting Thermostat New Thermostat Installed"
                      },
                      "newWiring": {
                        "type": "object",
                        "properties": {
                          "selectedFiles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Exisiting Thermostat New Wiring Selected Files"
                          }
                        },
                        "description": "newWiring"
                      }
                    }
                  },
                  "description": "existingThermostats"
                },
                "newThermostats": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "model": {
                        "type": "string",
                        "description": "New Thermostat Model"
                      },
                      "serialNumber": {
                        "type": "string",
                        "description": "New Thermostat Serial Number"
                      },
                      "outdoorTemp": {
                        "type": "integer",
                        "format": "int32",
                        "description": "New Thermostat Outdoor Temp"
                      },
                      "indoorTemp": {
                        "type": "integer",
                        "format": "int32",
                        "description": "New Thermostat Indoor Temp"
                      },
                      "supplyTemp": {
                        "type": "integer",
                        "format": "int32",
                        "description": "New Thermostat Supply Temp"
                      },
                      "modeOfOperation": {
                        "type": "string",
                        "description": "New Thermostat Mode Of Operation"
                      },
                      "heating": {
                        "type": "object",
                        "properties": {
                          "ran": {
                            "type": "boolean",
                            "description": "New Thermostat Heating Ran"
                          },
                          "supplyTemp": {
                            "type": "integer",
                            "format": "int32",
                            "description": "New Thermostat Supply Temp"
                          }
                        },
                        "description": "heating"
                      },
                      "emergencyHeat": {
                        "type": "object",
                        "properties": {
                          "ran": {
                            "type": "boolean",
                            "description": "New Thermostat Emergency Heat Ran"
                          },
                          "supplyTemp": {
                            "type": "integer",
                            "format": "int32",
                            "description": "New Thermostat Emergency Heat Supply Temp"
                          }
                        },
                        "description": "emergencyHeat"
                      },
                      "cooling": {
                        "type": "object",
                        "properties": {
                          "ran": {
                            "type": "boolean",
                            "description": "New Thermostat Ran"
                          },
                          "supplyTemp": {
                            "type": "integer",
                            "format": "int32",
                            "description": "New Thermostat Cooling Supply Temp"
                          }
                        },
                        "description": "cooling"
                      },
                      "issues": {
                        "type": "string",
                        "description": "New Thermostat Issues"
                      },
                      "comments": {
                        "type": "string",
                        "description": "New Thermostat Comments"
                      },
                      "programmed": {
                        "type": "boolean",
                        "description": "New Thermostat Programmed"
                      },
                      "educateCustomer": {
                        "type": "boolean",
                        "description": "New Thermostat Educated Customer"
                      },
                      "selectedFiles": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "New Thermostat Selected Files"
                      }
                    }
                  },
                  "description": "newThermostats"
                }
              },
              "description": "data"
            }
          }
        },
        "description": "default"
      },
      "post": {
        "responses": {},
        "summary": "Inspection Status Change",
        "operationId": "InspectionStatusChange",
        "x-ms-trigger": "single",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "callbackURL": {
                  "type": "string",
                  "description": "callbackURL",
                  "x-ms-notification-url": true,
                  "x-ms-visibility": "internal",
                  "title": ""
                }
              },
              "required": [
                "callbackURL"
              ]
            }
          }
        ],
        "description": "On Inspection Status Change"
      }
    }
  },
  "definitions": {},
  "parameters": {},
  "responses": {},
  "securityDefinitions": {
    "API Key": {
      "type": "apiKey",
      "in": "query",
      "name": "API Key"
    }
  },
  "security": [
    {
      "API Key": []
    }
  ],
  "tags": []
}