{
  "swagger": "2.0",
  "info": {
    "title": "OpenAPI Document on Azure Functions",
    "description": "This is the OpenAPI Document on Azure Functions",
    "version": "1.0.0"
  },
  "host": "api.fairerwarmth.com",
  "schemes": [
    "https"
  ],
  "paths": {
    "/GetResultsFromEpcData": {
      "post": {
        "tags": [
          "Send EPC and Misc data to API"
        ],
        "operationId": "GetEpcDataForAddress",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Composite payload containing EPC and Misc Data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/inputBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The OK response",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "energySavingAction": {
      "type": "object",
      "properties": {
        "reference": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "capitalCost": {
          "format": "double",
          "type": "number"
        }
      }
    },
    "epcData": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "address1": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "lodgement_date": {
          "type": "string"
        },
        "lmk-key": {
          "type": "string"
        },
        "construction_age_band": {
          "type": "string"
        },
        "property_type": {
          "type": "string"
        },
        "built_form": {
          "type": "string"
        },
        "epc_rating": {
          "type": "string"
        },
        "number_habitable_rooms": {
          "type": "string"
        },
        "main_heat_description": {
          "type": "string"
        },
        "wall_description": {
          "type": "string"
        },
        "roof_description": {
          "type": "string"
        },
        "floor_description": {
          "type": "string"
        },
        "floor_area": {
          "type": "string"
        },
        "windows_description": {
          "type": "string"
        },
        "mains-gas-flag": {
          "type": "string"
        },
        "floor-level": {
          "type": "string"
        },
        "floor-height": {
          "type": "string"
        },
        "main_heating_control": {
          "type": "string"
        },
        "hotwater-description": {
          "type": "string"
        },
        "photo_supply": {
          "type": "string"
        },
        "solar_water_heating_flag": {
          "type": "string"
        }
      }
    },
    "inputBody": {
      "required": [
        "propertyReference",
        "propertyInformation"
      ],
      "type": "object",
      "properties": {
        "propertyReference": {
          "minLength": 1,
          "type": "string"
        },
        "propertyInformation": {
          "$ref": "#/definitions/propertyInformation"
        }
      }
    },
    "misc": {
      "type": "object",
      "properties": {
        "occupants": {
          "type": "string"
        },
        "drawdownDate": {
          "type": "string"
        },
        "latlng": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        }
      }
    },
    "propertyInformation": {
      "type": "object",
      "properties": {
        "energySavingActions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/energySavingAction"
          }
        },
        "epcData": {
          "$ref": "#/definitions/epcData"
        },
        "miscData": {
          "$ref": "#/definitions/misc"
        }
      }
    }
  }
}