{
  "openapi": "3.1.0",
  "info": {
    "title": "Solarise Solar Potential & Financial Analysis API",
    "version": "1.0.0",
    "description": "One call returns a complete solar potential and financial analysis for a roof: the roof's area and pitch, the local climate, and for every system preset the panels, inverters, battery, price with discounts, payback, savings, generation and financing. Documentation: https://www.solarise.app/docs/api",
    "contact": {
      "name": "Solarise",
      "url": "https://www.solarise.app/contact-us"
    },
    "termsOfService": "https://www.solarise.app/terms"
  },
  "servers": [
    {
      "url": "https://app.solarise.app",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Solarise API documentation",
    "url": "https://www.solarise.app/docs/api"
  },
  "security": [
    {
      "SolariseApiKey": []
    }
  ],
  "paths": {
    "/api/v1/roof-analyses": {
      "post": {
        "tags": [
          "Roof analyses"
        ],
        "summary": "Analyse a roof's solar potential and financials",
        "description": "Runs Solarise's complete analysis for one property and returns the result: Solarise finds the location, selects the best aerial imagery, identifies the building and its roof faces, places panels, sizes a system for every preset of the SunnyForm, and prices and finances each one. A successful analysis uses one measurement of your plan; a failed one uses none. Analyses usually take 30 to 90 seconds.",
        "operationId": "create_roof_analysis",
        "security": [
          {
            "SolariseApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 255,
                  "pattern": "^[!-~]+$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A unique value per analysis, such as a UUID: 1 to 255 visible ASCII characters, compared exactly. Retrying with the same key returns the stored result of a finished analysis instead of paying for a second one.",
              "title": "Idempotency-Key"
            },
            "description": "A unique value per analysis, such as a UUID: 1 to 255 visible ASCII characters, compared exactly. Retrying with the same key returns the stored result of a finished analysis instead of paying for a second one."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoofAnalysisCreateInDTO"
              },
              "examples": {
                "coordinates": {
                  "summary": "Coordinates only: Solarise defaults for the country",
                  "value": {
                    "location": {
                      "latitude": 53.3438,
                      "longitude": -6.2546
                    }
                  }
                },
                "address_with_sunnyform": {
                  "summary": "An address analysed with a SunnyForm and the customer's consumption",
                  "value": {
                    "location": {
                      "address": "12 Example Close, Leicester LE2 0XX"
                    },
                    "country_code": "GB",
                    "sunnyform_id": "3f2c8a51-7d64-4e0b-9a1d-5c3e2b7f9a10",
                    "annual_consumption_kwh": 3200,
                    "usage_pattern": "MORNINGS_AND_EVENINGS",
                    "include_battery": true
                  }
                },
                "eircode_saved_lead": {
                  "summary": "An Eircode saved as a CRM lead and sent to the SunnyForm's webhooks",
                  "value": {
                    "location": {
                      "eircode": "D04 X2Y3"
                    },
                    "sunnyform_id": "3f2c8a51-7d64-4e0b-9a1d-5c3e2b7f9a10",
                    "average_monthly_energy_bill": 140,
                    "roof_material": "TILES",
                    "name": "Alex Murphy",
                    "email": "alex.murphy@example.com",
                    "phone_number": "+353861234567",
                    "save_to_crm": true,
                    "send_webhook": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoofAnalysisResultDTO"
                },
                "examples": {
                  "analysis": {
                    "summary": "A residential analysis with a battery",
                    "value": {
                      "analysis_id": "5b0e9c2a-8f1d-4c6e-a3b7-2d9f4e6a1c58",
                      "status": "OK",
                      "created_at": "2026-11-20T10:15:42Z",
                      "sunnyform_id": "3f2c8a51-7d64-4e0b-9a1d-5c3e2b7f9a10",
                      "building_type": "RESIDENTIAL",
                      "currency": "GBP",
                      "unit_system": "METRIC",
                      "location": {
                        "address": "12 Example Close, Leicester LE2 0XX, UK",
                        "latitude": 52.608512,
                        "longitude": -1.121704,
                        "country_code": "GB"
                      },
                      "roof": {
                        "total_area_m2": 118.4,
                        "usable_area_m2": 61.7,
                        "average_slope_degrees": 30.5
                      },
                      "climate": {
                        "sunny_hours_per_year": 1892.1,
                        "min_temperature_last_year_c": -6.1,
                        "max_temperature_last_year_c": 30.9,
                        "frost_days_last_year": 28
                      },
                      "electricity_prices": {
                        "import_price_per_kwh": 0.2541,
                        "export_price_per_kwh": 0.1203,
                        "import_price_source": "LOCATION_DEFAULT",
                        "export_price_source": "LOCATION_DEFAULT"
                      },
                      "usage_pattern": "MORNINGS_AND_EVENINGS",
                      "tariff": "STANDARD",
                      "battery_included": true,
                      "default_preset": "OPTIMAL_PANEL_PLACEMENT",
                      "presets": [
                        {
                          "preset": "FASTEST_BREAK_EVEN",
                          "name": "Fastest payback",
                          "is_default": false,
                          "system": {
                            "size_kwp": 0.88,
                            "panel": {
                              "id": "8a1f3c5e-2b7d-4e9a-b6c4-1d3f5a7b9c20",
                              "name": "Q.TRON BLK M-G2+ 440W",
                              "manufacturer": "Qcells",
                              "quantity": 2,
                              "power_w": 440.0
                            },
                            "inverters": [
                              {
                                "id": "4c6e8a0b-3d5f-4a7c-9e1b-6f8a2c4e6d31",
                                "name": "IQ8M-72-2-US",
                                "manufacturer": "Enphase",
                                "quantity": 2,
                                "rated_power_kw": 0.325
                              }
                            ],
                            "battery": {
                              "id": "9e2b4d6f-7a1c-4e3b-8d5f-0a2c4e6b8d42",
                              "name": "IQ Battery 5P",
                              "manufacturer": "Enphase",
                              "quantity": 1,
                              "usable_capacity_kwh": 5.0,
                              "expansion_name": null,
                              "expansion_quantity": 0
                            },
                            "estimated_cabling_m": 28.4
                          },
                          "pricing": {
                            "price_without_discounts": 6496.0,
                            "discounts": [],
                            "price_with_discounts": 6496.0
                          },
                          "financials": {
                            "payback_years": null,
                            "annual_savings": 121.04,
                            "twenty_five_year_savings": 3706.78,
                            "home_value_increase_percent": 8.0,
                            "self_consumption_rate": 0.9996
                          },
                          "battery_metrics": {
                            "backup_duration_hours": 3.2,
                            "annual_savings_without_battery": 120.84,
                            "self_consumption_rate_without_battery": 0.9962
                          },
                          "environment": {
                            "co2_reduction_kg_per_year": 101.0,
                            "trees_equivalent": 4.0
                          },
                          "generation": {
                            "annual_kwh": 476.4,
                            "monthly_kwh": [
                              18.3,
                              19.7,
                              37.4,
                              54.2,
                              63.5,
                              66.8,
                              61.2,
                              55.9,
                              43.0,
                              27.3,
                              18.4,
                              10.7
                            ]
                          },
                          "financing": []
                        },
                        {
                          "preset": "HIGHEST_PRODUCTION",
                          "name": "Highest production",
                          "is_default": false,
                          "system": {
                            "size_kwp": 6.6,
                            "panel": {
                              "id": "8a1f3c5e-2b7d-4e9a-b6c4-1d3f5a7b9c20",
                              "name": "Q.TRON BLK M-G2+ 440W",
                              "manufacturer": "Qcells",
                              "quantity": 15,
                              "power_w": 440.0
                            },
                            "inverters": [
                              {
                                "id": "4c6e8a0b-3d5f-4a7c-9e1b-6f8a2c4e6d31",
                                "name": "IQ8M-72-2-US",
                                "manufacturer": "Enphase",
                                "quantity": 15,
                                "rated_power_kw": 0.325
                              }
                            ],
                            "battery": {
                              "id": "9e2b4d6f-7a1c-4e3b-8d5f-0a2c4e6b8d42",
                              "name": "IQ Battery 5P",
                              "manufacturer": "Enphase",
                              "quantity": 1,
                              "usable_capacity_kwh": 5.0,
                              "expansion_name": null,
                              "expansion_quantity": 0
                            },
                            "estimated_cabling_m": 149.6
                          },
                          "pricing": {
                            "price_without_discounts": 16220.0,
                            "discounts": [],
                            "price_with_discounts": 16220.0
                          },
                          "financials": {
                            "payback_years": 22.4,
                            "annual_savings": 617.55,
                            "twenty_five_year_savings": 18595.44,
                            "home_value_increase_percent": 8.0,
                            "self_consumption_rate": 0.7005
                          },
                          "battery_metrics": {
                            "backup_duration_hours": 3.2,
                            "annual_savings_without_battery": 527.76,
                            "self_consumption_rate_without_battery": 0.4464
                          },
                          "environment": {
                            "co2_reduction_kg_per_year": 621.5,
                            "trees_equivalent": 28.0
                          },
                          "generation": {
                            "annual_kwh": 2931.6,
                            "monthly_kwh": [
                              85.6,
                              104.9,
                              216.8,
                              335.9,
                              424.5,
                              460.7,
                              413.6,
                              354.1,
                              247.8,
                              149.3,
                              87.1,
                              51.2
                            ]
                          },
                          "financing": []
                        },
                        {
                          "preset": "OPTIMAL_FOR_USER_ELECTRICITY_BILL",
                          "name": "Perfect fit",
                          "is_default": false,
                          "system": {
                            "size_kwp": 6.6,
                            "panel": {
                              "id": "8a1f3c5e-2b7d-4e9a-b6c4-1d3f5a7b9c20",
                              "name": "Q.TRON BLK M-G2+ 440W",
                              "manufacturer": "Qcells",
                              "quantity": 15,
                              "power_w": 440.0
                            },
                            "inverters": [
                              {
                                "id": "4c6e8a0b-3d5f-4a7c-9e1b-6f8a2c4e6d31",
                                "name": "IQ8M-72-2-US",
                                "manufacturer": "Enphase",
                                "quantity": 15,
                                "rated_power_kw": 0.325
                              }
                            ],
                            "battery": {
                              "id": "9e2b4d6f-7a1c-4e3b-8d5f-0a2c4e6b8d42",
                              "name": "IQ Battery 5P",
                              "manufacturer": "Enphase",
                              "quantity": 1,
                              "usable_capacity_kwh": 5.0,
                              "expansion_name": null,
                              "expansion_quantity": 0
                            },
                            "estimated_cabling_m": 149.6
                          },
                          "pricing": {
                            "price_without_discounts": 16220.0,
                            "discounts": [],
                            "price_with_discounts": 16220.0
                          },
                          "financials": {
                            "payback_years": 22.4,
                            "annual_savings": 617.55,
                            "twenty_five_year_savings": 18595.44,
                            "home_value_increase_percent": 8.0,
                            "self_consumption_rate": 0.7005
                          },
                          "battery_metrics": {
                            "backup_duration_hours": 3.2,
                            "annual_savings_without_battery": 527.76,
                            "self_consumption_rate_without_battery": 0.4464
                          },
                          "environment": {
                            "co2_reduction_kg_per_year": 621.5,
                            "trees_equivalent": 28.0
                          },
                          "generation": {
                            "annual_kwh": 2931.6,
                            "monthly_kwh": [
                              85.6,
                              104.9,
                              216.8,
                              335.9,
                              424.5,
                              460.7,
                              413.6,
                              354.1,
                              247.8,
                              149.3,
                              87.1,
                              51.2
                            ]
                          },
                          "financing": []
                        },
                        {
                          "preset": "OPTIMAL_PANEL_PLACEMENT",
                          "name": "Optimal panel placement",
                          "is_default": true,
                          "system": {
                            "size_kwp": 3.08,
                            "panel": {
                              "id": "8a1f3c5e-2b7d-4e9a-b6c4-1d3f5a7b9c20",
                              "name": "Q.TRON BLK M-G2+ 440W",
                              "manufacturer": "Qcells",
                              "quantity": 7,
                              "power_w": 440.0
                            },
                            "inverters": [
                              {
                                "id": "4c6e8a0b-3d5f-4a7c-9e1b-6f8a2c4e6d31",
                                "name": "IQ8M-72-2-US",
                                "manufacturer": "Enphase",
                                "quantity": 7,
                                "rated_power_kw": 0.325
                              }
                            ],
                            "battery": {
                              "id": "9e2b4d6f-7a1c-4e3b-8d5f-0a2c4e6b8d42",
                              "name": "IQ Battery 5P",
                              "manufacturer": "Enphase",
                              "quantity": 1,
                              "usable_capacity_kwh": 5.0,
                              "expansion_name": null,
                              "expansion_quantity": 0
                            },
                            "estimated_cabling_m": 74.4
                          },
                          "pricing": {
                            "price_without_discounts": 10236.0,
                            "discounts": [],
                            "price_with_discounts": 10236.0
                          },
                          "financials": {
                            "payback_years": 21.5,
                            "annual_savings": 403.41,
                            "twenty_five_year_savings": 12319.27,
                            "home_value_increase_percent": 8.0,
                            "self_consumption_rate": 0.9435
                          },
                          "battery_metrics": {
                            "backup_duration_hours": 3.2,
                            "annual_savings_without_battery": 333.41,
                            "self_consumption_rate_without_battery": 0.5952
                          },
                          "environment": {
                            "co2_reduction_kg_per_year": 353.5,
                            "trees_equivalent": 16.0
                          },
                          "generation": {
                            "annual_kwh": 1667.5,
                            "monthly_kwh": [
                              64.0,
                              69.0,
                              130.7,
                              189.8,
                              222.3,
                              233.9,
                              214.3,
                              195.7,
                              150.4,
                              95.5,
                              64.4,
                              37.5
                            ]
                          },
                          "financing": []
                        }
                      ],
                      "crm": {
                        "saved": false,
                        "lead_url": null
                      },
                      "webhook": {
                        "requested": false,
                        "receivers": 0
                      },
                      "measurements": {
                        "charged": 1,
                        "remaining": 249
                      }
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "The stored result of an earlier request with the same Idempotency-Key. The response carries the Idempotent-Replayed: true header and no measurement is used.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoofAnalysisResultDTO"
                }
              }
            }
          },
          "400": {
            "description": "The body is not valid JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "invalid_json": {
                    "summary": "The body is not valid JSON",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": null,
                      "error": {
                        "code": "invalid_json",
                        "message": "The request body is not valid JSON.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "invalid_api_key": {
                    "summary": "An unknown or mistyped key",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": null,
                      "error": {
                        "code": "invalid_api_key",
                        "message": "The API key is not valid.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "No measurements are left on the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "insufficient_measurements": {
                    "summary": "The plan has no measurements left",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "0b6f9a3e-1c2d-4e5f-8a7b-9c0d1e2f3a4b",
                      "error": {
                        "code": "insufficient_measurements",
                        "message": "Your plan has no measurements left, or your subscription is paused. Add measurements in the Solarise dashboard and try again.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The account of the key is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "The SunnyForm does not belong to the key's company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "sunnyform_not_found": {
                    "summary": "The SunnyForm belongs to another company",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "d97a8475-9762-487a-9bf2-62ba1118586d",
                      "error": {
                        "code": "sunnyform_not_found",
                        "message": "No SunnyForm with this ID belongs to the company of this API key.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The Idempotency-Key or the contact details conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "request_in_progress": {
                    "summary": "A retry while the first request still runs",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": null,
                      "error": {
                        "code": "request_in_progress",
                        "message": "An analysis with this Idempotency-Key is still running. Retry the same request later to get its result.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "The body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                }
              }
            }
          },
          "422": {
            "description": "The request is invalid, or the property cannot be analysed (location, imagery, roof, system).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "invalid_request": {
                    "summary": "Invalid fields",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "9f8d6da2-60fd-4458-bf14-f0814d165fd5",
                      "error": {
                        "code": "invalid_request",
                        "message": "The request does not match the API contract. See error.details.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": [
                          {
                            "field": "location",
                            "message": "Send latitude and longitude together."
                          },
                          {
                            "field": "tariff",
                            "message": "Input should be 'STANDARD', 'OCTOPUS_FLUX' or 'ECONOMY_7'"
                          }
                        ]
                      }
                    }
                  },
                  "location_not_specific": {
                    "summary": "A postcode instead of an address",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "a0aa7763-9b99-404d-8137-e18822c40626",
                      "error": {
                        "code": "location_not_specific",
                        "message": "The location is not specific enough to identify one building. Send a full street address with its house number, an Eircode, a Plus Code, or coordinates.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  },
                  "roof_not_found": {
                    "summary": "No roof at the location",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "5d1c7b2e-8f3a-4b6c-9d0e-1f2a3b4c5d6e",
                      "error": {
                        "code": "roof_not_found",
                        "message": "No roof could be identified at this location.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests or analyses running.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "rate_limited": {
                    "summary": "Too many requests in a minute",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": null,
                      "error": {
                        "code": "rate_limited",
                        "message": "Too many requests. Retry after the time in the Retry-After header.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The analysis failed. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "analysis_failed": {
                    "summary": "The analysis failed; nothing was charged",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "6e2d8c3f-9a4b-4c7d-8e1f-2a3b4c5d6e7f",
                      "error": {
                        "code": "analysis_failed",
                        "message": "The analysis could not be completed. You were not charged.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "A dependency is unavailable. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "service_unavailable": {
                    "summary": "A provider is down; retry later",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "7f3e9d4a-0b5c-4d8e-9f2a-3b4c5d6e7f80",
                      "error": {
                        "code": "service_unavailable",
                        "message": "A service the analysis depends on is temporarily unavailable. You were not charged. Retry later.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "The analysis took too long. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponseDTO"
                },
                "examples": {
                  "analysis_timeout": {
                    "summary": "The analysis ran too long",
                    "value": {
                      "status": "ERROR",
                      "analysis_id": "8a4f0e5b-1c6d-4e9f-8a3b-4c5d6e7f8091",
                      "error": {
                        "code": "analysis_timeout",
                        "message": "The analysis took too long and was stopped. You were not charged.",
                        "request_id": "kqzvtbmhwrcxfdpn",
                        "details": null
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiErrorCode": {
        "type": "string",
        "enum": [
          "missing_api_key",
          "invalid_api_key",
          "api_key_revoked",
          "account_inactive",
          "insufficient_measurements",
          "invalid_json",
          "invalid_request",
          "payload_too_large",
          "sunnyform_not_found",
          "building_type_not_supported",
          "roof_material_required",
          "roof_material_not_supported",
          "battery_not_available",
          "battery_required",
          "tariff_not_available",
          "location_not_found",
          "location_not_specific",
          "location_not_supported",
          "customer_contact_conflict",
          "idempotency_key_reused",
          "request_in_progress",
          "rate_limited",
          "too_many_concurrent_requests",
          "no_imagery_available",
          "roof_not_found",
          "no_suitable_system",
          "analysis_failed",
          "analysis_timeout",
          "service_unavailable",
          "internal_error"
        ],
        "title": "ApiErrorCode",
        "description": "Stable machine-readable error codes. Each code always comes with the same HTTP status; the x-error-codes\ncatalogue lists them with their default messages."
      },
      "ApiErrorDTO": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ApiErrorCode",
            "description": "Stable machine-readable error code."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "What went wrong and what to do, in English."
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id",
            "description": "Quote it when you contact Solarise support."
          },
          "details": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ApiFieldErrorDTO"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details",
            "description": "The invalid fields of the request."
          }
        },
        "type": "object",
        "required": [
          "code",
          "message",
          "request_id"
        ],
        "title": "ApiErrorDTO"
      },
      "ApiErrorResponseDTO": {
        "properties": {
          "status": {
            "type": "string",
            "const": "ERROR",
            "title": "Status",
            "description": "Always ERROR for an error response.",
            "default": "ERROR"
          },
          "analysis_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Id",
            "description": "The recorded request, also listed in the dashboard's request history."
          },
          "error": {
            "$ref": "#/components/schemas/ApiErrorDTO",
            "description": "What went wrong."
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ApiErrorResponseDTO"
      },
      "ApiFieldErrorDTO": {
        "properties": {
          "field": {
            "type": "string",
            "title": "Field",
            "description": "The request field, as a dotted path, for example 'location.latitude'."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Why the field is invalid."
          }
        },
        "type": "object",
        "required": [
          "field",
          "message"
        ],
        "title": "ApiFieldErrorDTO"
      },
      "Currency": {
        "type": "string",
        "enum": [
          "AED",
          "AFN",
          "ALL",
          "AMD",
          "ANG",
          "AOA",
          "ARS",
          "AUD",
          "AWG",
          "AZN",
          "BAM",
          "BBD",
          "BDT",
          "BGN",
          "BHD",
          "BIF",
          "BMD",
          "BND",
          "BOB",
          "BRL",
          "BSD",
          "BTC",
          "BTN",
          "BWP",
          "BYN",
          "BYR",
          "BZD",
          "CAD",
          "CDF",
          "CHF",
          "CLF",
          "CLP",
          "CNY",
          "CNH",
          "COP",
          "CRC",
          "CUC",
          "CUP",
          "CVE",
          "CZK",
          "DJF",
          "DKK",
          "DOP",
          "DZD",
          "EGP",
          "ERN",
          "ETB",
          "EUR",
          "FJD",
          "FKP",
          "GBP",
          "GEL",
          "GGP",
          "GHS",
          "GIP",
          "GMD",
          "GNF",
          "GTQ",
          "GYD",
          "HKD",
          "HNL",
          "HRK",
          "HTG",
          "HUF",
          "IDR",
          "ILS",
          "IMP",
          "INR",
          "IQD",
          "IRR",
          "ISK",
          "JEP",
          "JMD",
          "JOD",
          "JPY",
          "KES",
          "KGS",
          "KHR",
          "KMF",
          "KPW",
          "KRW",
          "KWD",
          "KYD",
          "KZT",
          "LAK",
          "LBP",
          "LKR",
          "LRD",
          "LSL",
          "LTL",
          "LVL",
          "LYD",
          "MAD",
          "MDL",
          "MGA",
          "MKD",
          "MMK",
          "MNT",
          "MOP",
          "MRU",
          "MUR",
          "MVR",
          "MWK",
          "MXN",
          "MYR",
          "MZN",
          "NAD",
          "NGN",
          "NIO",
          "NOK",
          "NPR",
          "NZD",
          "OMR",
          "PAB",
          "PEN",
          "PGK",
          "PHP",
          "PKR",
          "PLN",
          "PYG",
          "QAR",
          "RON",
          "RSD",
          "RUB",
          "RWF",
          "SAR",
          "SBD",
          "SCR",
          "SDG",
          "SEK",
          "SGD",
          "SHP",
          "SLE",
          "SLL",
          "SOS",
          "SRD",
          "STD",
          "SVC",
          "SYP",
          "SZL",
          "THB",
          "TJS",
          "TMT",
          "TND",
          "TOP",
          "TRY",
          "TTD",
          "TWD",
          "TZS",
          "UAH",
          "UGX",
          "USD",
          "UYU",
          "UZS",
          "VES",
          "VND",
          "VUV",
          "WST",
          "XAF",
          "XAG",
          "XAU",
          "XCD",
          "XDR",
          "XOF",
          "XPF",
          "YER",
          "ZAR",
          "ZMK",
          "ZMW",
          "ZWL"
        ],
        "title": "Currency"
      },
      "ElectricityUsagePatternType": {
        "type": "string",
        "enum": [
          "MORNINGS_AND_EVENINGS",
          "ALL_DAY"
        ],
        "title": "ElectricityUsagePatternType"
      },
      "OfferPresetType": {
        "type": "string",
        "enum": [
          "FASTEST_BREAK_EVEN",
          "HIGHEST_PRODUCTION",
          "OPTIMAL_FOR_USER_ELECTRICITY_BILL",
          "OPTIMAL_PANEL_PLACEMENT"
        ],
        "title": "OfferPresetType"
      },
      "OfferRoofMaterial": {
        "type": "string",
        "enum": [
          "TILES",
          "WOOD",
          "SLATE",
          "STANDING_SEAM"
        ],
        "title": "OfferRoofMaterial"
      },
      "RoofAnalysisBatteryDTO": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "The product in the Solarise catalogue."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The product's model name."
          },
          "manufacturer": {
            "type": "string",
            "title": "Manufacturer",
            "description": "The product's manufacturer."
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity",
            "description": "Number of units in the system."
          },
          "usable_capacity_kwh": {
            "type": "number",
            "title": "Usable Capacity Kwh",
            "description": "Usable capacity of one battery, in kWh."
          },
          "expansion_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expansion Name",
            "description": "The battery expansion module, when the system has one."
          },
          "expansion_quantity": {
            "type": "integer",
            "title": "Expansion Quantity",
            "description": "Number of battery expansion modules."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "manufacturer",
          "quantity",
          "usable_capacity_kwh",
          "expansion_name",
          "expansion_quantity"
        ],
        "title": "RoofAnalysisBatteryDTO"
      },
      "RoofAnalysisBatteryMetricsDTO": {
        "properties": {
          "backup_duration_hours": {
            "type": "number",
            "title": "Backup Duration Hours",
            "description": "Hours the battery can supply critical loads in an outage."
          },
          "annual_savings_without_battery": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annual Savings Without Battery",
            "description": "First-year savings of the same system without the battery."
          },
          "self_consumption_rate_without_battery": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Self Consumption Rate Without Battery",
            "description": "Self-consumption of the same system without the battery, from 0 to 1."
          }
        },
        "type": "object",
        "required": [
          "backup_duration_hours",
          "annual_savings_without_battery",
          "self_consumption_rate_without_battery"
        ],
        "title": "RoofAnalysisBatteryMetricsDTO"
      },
      "RoofAnalysisBuildingType": {
        "type": "string",
        "enum": [
          "RESIDENTIAL",
          "COMMERCIAL",
          "COMMUNITY"
        ],
        "title": "RoofAnalysisBuildingType",
        "description": "The building to analyse: RESIDENTIAL for houses, COMMERCIAL for business buildings, COMMUNITY for apartment\nbuildings with shared systems. The SunnyForm must serve the building type."
      },
      "RoofAnalysisClimateDTO": {
        "properties": {
          "sunny_hours_per_year": {
            "type": "number",
            "title": "Sunny Hours Per Year",
            "description": "Sunshine hours per year at the location."
          },
          "min_temperature_last_year_c": {
            "type": "number",
            "title": "Min Temperature Last Year C",
            "description": "Lowest air temperature at the location last year, °C."
          },
          "max_temperature_last_year_c": {
            "type": "number",
            "title": "Max Temperature Last Year C",
            "description": "Highest air temperature at the location last year, °C."
          },
          "frost_days_last_year": {
            "type": "integer",
            "title": "Frost Days Last Year",
            "description": "Days with frost at the location last year."
          }
        },
        "type": "object",
        "required": [
          "sunny_hours_per_year",
          "min_temperature_last_year_c",
          "max_temperature_last_year_c",
          "frost_days_last_year"
        ],
        "title": "RoofAnalysisClimateDTO"
      },
      "RoofAnalysisCreateInDTO": {
        "properties": {
          "location": {
            "$ref": "#/components/schemas/RoofAnalysisLocationInDTO",
            "description": "The property to analyse."
          },
          "country_code": {
            "type": "string",
            "title": "Country Code",
            "description": "ISO 3166-1 alpha-2 code of the property's country, for example 'GB'. It restricts address lookups to that country; coordinates do not need it.",
            "default": ""
          },
          "building_type": {
            "$ref": "#/components/schemas/RoofAnalysisBuildingType",
            "description": "The kind of building on the property.",
            "default": "RESIDENTIAL"
          },
          "sunnyform_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sunnyform Id",
            "description": "A SunnyForm of the API key's company whose products, prices, discounts, financing, presets and panel orientation the analysis uses. Without it, Solarise uses the company's API default SunnyForm for the location's country, which it creates on first use with the defaults of a new SunnyForm.",
            "default": null
          },
          "roof_material": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OfferRoofMaterial"
              },
              {
                "type": "null"
              }
            ],
            "description": "The roof's material. Required when the SunnyForm prices systems by roof material, and one of the SunnyForm's roof materials when given.",
            "default": null
          },
          "annual_consumption_kwh": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 50000000.0,
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Annual Consumption Kwh",
            "description": "The building's electricity use per year in kWh. Send this or average_monthly_energy_bill, not both. Without either, Solarise estimates the consumption.",
            "default": null
          },
          "average_monthly_energy_bill": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 10000000.0,
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Monthly Energy Bill",
            "description": "The average monthly electricity bill in the SunnyForm's currency. Send this or annual_consumption_kwh, not both.",
            "default": null
          },
          "usage_pattern": {
            "$ref": "#/components/schemas/ElectricityUsagePatternType",
            "description": "When the building uses most of its electricity: ALL_DAY, or MORNINGS_AND_EVENINGS for households that are out during the day.",
            "default": "ALL_DAY"
          },
          "import_price_per_kwh": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1000.0,
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Import Price Per Kwh",
            "description": "The price paid per kWh imported from the grid, in the SunnyForm's currency. Defaults to Solarise's average price for the location.",
            "default": null
          },
          "export_price_per_kwh": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1000.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Price Per Kwh",
            "description": "The price received per kWh exported to the grid, in the SunnyForm's currency. Defaults to Solarise's average export price for the location.",
            "default": null
          },
          "include_battery": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Battery",
            "description": "true: every system includes a battery, or the analysis fails with battery_not_available. false: no system includes one, or the analysis fails with battery_required. Left out, each system gets the first battery of the SunnyForm that fits it when sunnyform_id names a SunnyForm with a battery for the building type, and otherwise only a battery its inverter is built into.",
            "default": null
          },
          "tariff": {
            "$ref": "#/components/schemas/RoofAnalysisTariff",
            "description": "The electricity tariff after installation. OCTOPUS_FLUX and ECONOMY_7 are UK tariffs for systems with a battery and must be enabled in the SunnyForm's tariff step.",
            "default": "STANDARD"
          },
          "name": {
            "type": "string",
            "maxLength": 40,
            "title": "Name",
            "description": "The customer's name. Stored with the lead when save_to_crm is true; with send_webhook alone it goes only to the webhooks.",
            "default": ""
          },
          "email": {
            "type": "string",
            "maxLength": 255,
            "title": "Email",
            "description": "The customer's email address. Stored with the lead when save_to_crm is true: details of an existing customer of your account link the lead to that customer, and details that cannot be linked to one customer of your account are refused with customer_contact_conflict. With send_webhook alone it goes only to the webhooks.",
            "default": ""
          },
          "phone_number": {
            "type": "string",
            "maxLength": 15,
            "title": "Phone Number",
            "description": "The customer's phone number in international format, for example '+353861234567'. Stored with the lead when save_to_crm is true; with send_webhook alone it goes only to the webhooks.",
            "default": ""
          },
          "save_to_crm": {
            "type": "boolean",
            "title": "Save To Crm",
            "description": "Save the analysis as a lead in the SunnyForm's CRM, as if the customer had used the calculator. Left out or false, nothing of the analysis is kept but the record of the request in your API history.",
            "default": false
          },
          "send_webhook": {
            "type": "boolean",
            "title": "Send Webhook",
            "description": "Send the finished analysis once, as an offer.created event, to every enabled webhook of the SunnyForm that subscribes to it, right after the response and whatever the webhook's send interval. Left out or false, no webhook receives the analysis.",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "location"
        ],
        "title": "RoofAnalysisCreateInDTO"
      },
      "RoofAnalysisCrmDTO": {
        "properties": {
          "saved": {
            "type": "boolean",
            "title": "Saved",
            "description": "Whether the analysis was saved as a lead in the SunnyForm's CRM."
          },
          "lead_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lead Url",
            "description": "The lead in the Solarise dashboard, when it was saved."
          }
        },
        "type": "object",
        "required": [
          "saved",
          "lead_url"
        ],
        "title": "RoofAnalysisCrmDTO"
      },
      "RoofAnalysisDiscountDTO": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title",
            "description": "The discount's name, as the SunnyForm shows it."
          },
          "amount": {
            "type": "number",
            "title": "Amount",
            "description": "Discount amount, in the analysis currency."
          }
        },
        "type": "object",
        "required": [
          "title",
          "amount"
        ],
        "title": "RoofAnalysisDiscountDTO"
      },
      "RoofAnalysisElectricityPricesDTO": {
        "properties": {
          "import_price_per_kwh": {
            "type": "number",
            "title": "Import Price Per Kwh",
            "description": "Price per kWh imported from the grid, analysis currency."
          },
          "export_price_per_kwh": {
            "type": "number",
            "title": "Export Price Per Kwh",
            "description": "Price per kWh exported to the grid, analysis currency."
          },
          "import_price_source": {
            "type": "string",
            "enum": [
              "PROVIDED",
              "LOCATION_DEFAULT"
            ],
            "title": "Import Price Source",
            "description": "PROVIDED when the request set the price, LOCATION_DEFAULT when Solarise used its default for the location."
          },
          "export_price_source": {
            "type": "string",
            "enum": [
              "PROVIDED",
              "LOCATION_DEFAULT"
            ],
            "title": "Export Price Source",
            "description": "PROVIDED when the request set the price, LOCATION_DEFAULT when Solarise used its default for the location."
          }
        },
        "type": "object",
        "required": [
          "import_price_per_kwh",
          "export_price_per_kwh",
          "import_price_source",
          "export_price_source"
        ],
        "title": "RoofAnalysisElectricityPricesDTO"
      },
      "RoofAnalysisEnvironmentDTO": {
        "properties": {
          "co2_reduction_kg_per_year": {
            "type": "number",
            "title": "Co2 Reduction Kg Per Year",
            "description": "CO₂ emissions avoided per year, in kg."
          },
          "trees_equivalent": {
            "type": "number",
            "title": "Trees Equivalent",
            "description": "Number of trees that absorb that much CO₂."
          }
        },
        "type": "object",
        "required": [
          "co2_reduction_kg_per_year",
          "trees_equivalent"
        ],
        "title": "RoofAnalysisEnvironmentDTO"
      },
      "RoofAnalysisFinancialsDTO": {
        "properties": {
          "payback_years": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payback Years",
            "description": "Years until savings repay the discounted price; null when they never do within 25 years."
          },
          "annual_savings": {
            "type": "number",
            "title": "Annual Savings",
            "description": "Savings in the first year, in the analysis currency."
          },
          "twenty_five_year_savings": {
            "type": "number",
            "title": "Twenty Five Year Savings",
            "description": "Electricity savings over 25 years before the system's price is subtracted, in the analysis currency."
          },
          "home_value_increase_percent": {
            "type": "number",
            "title": "Home Value Increase Percent",
            "description": "Estimated increase of the property's value, in %."
          },
          "self_consumption_rate": {
            "type": "number",
            "title": "Self Consumption Rate",
            "description": "Share of the solar production the building uses itself, from 0 to 1."
          }
        },
        "type": "object",
        "required": [
          "payback_years",
          "annual_savings",
          "twenty_five_year_savings",
          "home_value_increase_percent",
          "self_consumption_rate"
        ],
        "title": "RoofAnalysisFinancialsDTO"
      },
      "RoofAnalysisFinancingDTO": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "LOAN",
              "LEASING",
              "PPA"
            ],
            "title": "Type",
            "description": "LOAN, LEASING or PPA (power purchase agreement)."
          },
          "package_id": {
            "type": "string",
            "format": "uuid",
            "title": "Package Id",
            "description": "The SunnyForm's financing package the figures use."
          },
          "term_years": {
            "type": "integer",
            "title": "Term Years",
            "description": "Length of the financing, in years."
          },
          "monthly_payment": {
            "type": "number",
            "title": "Monthly Payment",
            "description": "First-year monthly payment, in the analysis currency."
          },
          "twenty_five_year_net_savings": {
            "type": "number",
            "title": "Twenty Five Year Net Savings",
            "description": "Savings over 25 years after the financing payments, in the analysis currency."
          },
          "apr_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Apr Percent",
            "description": "The loan's annual percentage rate, for LOAN."
          },
          "escalator_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Escalator Percent",
            "description": "Yearly payment increase, for LEASING and PPA, in %."
          },
          "price_per_kwh": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Per Kwh",
            "description": "First-year price per kWh of solar electricity, for PPA."
          }
        },
        "type": "object",
        "required": [
          "type",
          "package_id",
          "term_years",
          "monthly_payment",
          "twenty_five_year_net_savings",
          "apr_percent",
          "escalator_percent",
          "price_per_kwh"
        ],
        "title": "RoofAnalysisFinancingDTO"
      },
      "RoofAnalysisGenerationDTO": {
        "properties": {
          "annual_kwh": {
            "type": "number",
            "title": "Annual Kwh",
            "description": "Electricity the system generates in its first year, in kWh."
          },
          "monthly_kwh": {
            "items": {
              "type": "number"
            },
            "type": "array",
            "title": "Monthly Kwh",
            "description": "Generation per calendar month, January first, in kWh."
          }
        },
        "type": "object",
        "required": [
          "annual_kwh",
          "monthly_kwh"
        ],
        "title": "RoofAnalysisGenerationDTO"
      },
      "RoofAnalysisInverterDTO": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "The product in the Solarise catalogue."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The product's model name."
          },
          "manufacturer": {
            "type": "string",
            "title": "Manufacturer",
            "description": "The product's manufacturer."
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity",
            "description": "Number of units in the system."
          },
          "rated_power_kw": {
            "type": "number",
            "title": "Rated Power Kw",
            "description": "Rated AC power of one inverter, in kW."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "manufacturer",
          "quantity",
          "rated_power_kw"
        ],
        "title": "RoofAnalysisInverterDTO"
      },
      "RoofAnalysisLocationDTO": {
        "properties": {
          "address": {
            "type": "string",
            "title": "Address",
            "description": "The address Solarise resolved and analysed."
          },
          "latitude": {
            "type": "number",
            "title": "Latitude",
            "description": "Latitude of the analysed building, in decimal degrees."
          },
          "longitude": {
            "type": "number",
            "title": "Longitude",
            "description": "Longitude of the analysed building, in decimal degrees."
          },
          "country_code": {
            "type": "string",
            "title": "Country Code",
            "description": "ISO 3166-1 alpha-2 code of the location's country."
          }
        },
        "type": "object",
        "required": [
          "address",
          "latitude",
          "longitude",
          "country_code"
        ],
        "title": "RoofAnalysisLocationDTO"
      },
      "RoofAnalysisLocationInDTO": {
        "properties": {
          "latitude": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 90.0,
                "minimum": -90.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Latitude",
            "description": "Latitude of a point on the building, in decimal degrees (WGS 84). Send with longitude.",
            "default": null
          },
          "longitude": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 180.0,
                "minimum": -180.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Longitude",
            "description": "Longitude of a point on the building, in decimal degrees (WGS 84). Send with latitude.",
            "default": null
          },
          "address": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Address",
            "description": "A full street address including the house number, for example '1600 Amphitheatre Parkway, Mountain View, CA 94043'. A postcode, street or town alone is rejected.",
            "default": null
          },
          "eircode": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Eircode",
            "description": "An Irish Eircode, which identifies one address, for example 'D02 X285'.",
            "default": null
          },
          "plus_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Plus Code",
            "description": "An Open Location Code (Plus Code): a full code such as '9C5M8WRQ+2V', or a short code with its town, such as '8WRQ+2V Dublin'.",
            "default": null
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "RoofAnalysisLocationInDTO",
        "description": "Where the property is: exactly one of latitude and longitude together, address, eircode or plus_code."
      },
      "RoofAnalysisMeasurementsDTO": {
        "properties": {
          "charged": {
            "type": "integer",
            "title": "Charged",
            "description": "Measurements the analysis took from the plan: 1. A replay (HTTP 200 with Idempotent-Replayed: true) returns this stored answer unchanged and takes none."
          },
          "remaining": {
            "type": "integer",
            "title": "Remaining",
            "description": "Measurements left on the plan when the analysis finished; a replay repeats the stored value."
          }
        },
        "type": "object",
        "required": [
          "charged",
          "remaining"
        ],
        "title": "RoofAnalysisMeasurementsDTO"
      },
      "RoofAnalysisPanelDTO": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "The product in the Solarise catalogue."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The product's model name."
          },
          "manufacturer": {
            "type": "string",
            "title": "Manufacturer",
            "description": "The product's manufacturer."
          },
          "quantity": {
            "type": "integer",
            "title": "Quantity",
            "description": "Number of units in the system."
          },
          "power_w": {
            "type": "number",
            "title": "Power W",
            "description": "Rated power of one panel at standard test conditions, in W."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "manufacturer",
          "quantity",
          "power_w"
        ],
        "title": "RoofAnalysisPanelDTO"
      },
      "RoofAnalysisPresetDTO": {
        "properties": {
          "preset": {
            "$ref": "#/components/schemas/OfferPresetType",
            "description": "The system sizing strategy."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The preset's name in the Solarise calculator."
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "Whether this is the preset the calculator selects first."
          },
          "system": {
            "$ref": "#/components/schemas/RoofAnalysisSystemDTO",
            "description": "The system: size, panels, inverters, battery and cabling."
          },
          "pricing": {
            "$ref": "#/components/schemas/RoofAnalysisPricingDTO",
            "description": "The system's price before and after discounts."
          },
          "financials": {
            "$ref": "#/components/schemas/RoofAnalysisFinancialsDTO",
            "description": "Payback, savings, home value and self-consumption of the system."
          },
          "battery_metrics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RoofAnalysisBatteryMetricsDTO"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the system has a battery."
          },
          "environment": {
            "$ref": "#/components/schemas/RoofAnalysisEnvironmentDTO",
            "description": "The emissions the system avoids."
          },
          "generation": {
            "$ref": "#/components/schemas/RoofAnalysisGenerationDTO",
            "description": "The system's electricity generation."
          },
          "financing": {
            "items": {
              "$ref": "#/components/schemas/RoofAnalysisFinancingDTO"
            },
            "type": "array",
            "title": "Financing",
            "description": "Financing with the SunnyForm's default package of each enabled financing type."
          }
        },
        "type": "object",
        "required": [
          "preset",
          "name",
          "is_default",
          "system",
          "pricing",
          "financials",
          "battery_metrics",
          "environment",
          "generation",
          "financing"
        ],
        "title": "RoofAnalysisPresetDTO"
      },
      "RoofAnalysisPricingDTO": {
        "properties": {
          "price_without_discounts": {
            "type": "number",
            "title": "Price Without Discounts",
            "description": "Estimated system price before discounts."
          },
          "discounts": {
            "items": {
              "$ref": "#/components/schemas/RoofAnalysisDiscountDTO"
            },
            "type": "array",
            "title": "Discounts",
            "description": "The SunnyForm's discounts that apply."
          },
          "price_with_discounts": {
            "type": "number",
            "title": "Price With Discounts",
            "description": "Estimated system price after discounts."
          }
        },
        "type": "object",
        "required": [
          "price_without_discounts",
          "discounts",
          "price_with_discounts"
        ],
        "title": "RoofAnalysisPricingDTO"
      },
      "RoofAnalysisResultDTO": {
        "properties": {
          "analysis_id": {
            "type": "string",
            "format": "uuid",
            "title": "Analysis Id",
            "description": "The analysis; also listed in the dashboard's request history."
          },
          "status": {
            "type": "string",
            "const": "OK",
            "title": "Status",
            "description": "Always OK for an analysis; errors answer with status ERROR and an error object.",
            "default": "OK"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the analysis was requested, in UTC."
          },
          "sunnyform_id": {
            "type": "string",
            "format": "uuid",
            "title": "Sunnyform Id",
            "description": "The SunnyForm whose configuration the analysis used."
          },
          "building_type": {
            "$ref": "#/components/schemas/RoofAnalysisBuildingType",
            "description": "The building type the analysis used."
          },
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "Currency of every price and amount in the response."
          },
          "unit_system": {
            "type": "string",
            "const": "METRIC",
            "title": "Unit System",
            "description": "Units of every measurement: m², kWh, kWp, °C, kg and m."
          },
          "location": {
            "$ref": "#/components/schemas/RoofAnalysisLocationDTO",
            "description": "The address Solarise resolved and the point it analysed."
          },
          "roof": {
            "$ref": "#/components/schemas/RoofAnalysisRoofDTO",
            "description": "The roof Solarise identified on the building."
          },
          "climate": {
            "$ref": "#/components/schemas/RoofAnalysisClimateDTO",
            "description": "Sunshine and last year's temperatures at the location."
          },
          "electricity_prices": {
            "$ref": "#/components/schemas/RoofAnalysisElectricityPricesDTO",
            "description": "The import and export prices the financial figures use, and where they come from."
          },
          "usage_pattern": {
            "$ref": "#/components/schemas/ElectricityUsagePatternType",
            "description": "When the building uses its electricity, which sets how much solar power it uses itself."
          },
          "tariff": {
            "$ref": "#/components/schemas/RoofAnalysisTariff",
            "description": "The electricity tariff the financial figures assume."
          },
          "battery_included": {
            "type": "boolean",
            "title": "Battery Included",
            "description": "Whether any preset's system includes a battery; each preset's system.battery says which. Equals include_battery when the request sets it."
          },
          "default_preset": {
            "$ref": "#/components/schemas/OfferPresetType",
            "description": "The preset to show first; a lead saved to the CRM shows its system."
          },
          "presets": {
            "items": {
              "$ref": "#/components/schemas/RoofAnalysisPresetDTO"
            },
            "type": "array",
            "title": "Presets",
            "description": "One system per preset the SunnyForm supports."
          },
          "crm": {
            "$ref": "#/components/schemas/RoofAnalysisCrmDTO",
            "description": "Whether the analysis was saved as a lead in the CRM."
          },
          "webhook": {
            "$ref": "#/components/schemas/RoofAnalysisWebhookDTO",
            "description": "Whether the analysis was sent to the SunnyForm's webhooks."
          },
          "measurements": {
            "$ref": "#/components/schemas/RoofAnalysisMeasurementsDTO",
            "description": "The measurement the analysis used and the plan's balance."
          }
        },
        "type": "object",
        "required": [
          "analysis_id",
          "created_at",
          "sunnyform_id",
          "building_type",
          "currency",
          "unit_system",
          "location",
          "roof",
          "climate",
          "electricity_prices",
          "usage_pattern",
          "tariff",
          "battery_included",
          "default_preset",
          "presets",
          "crm",
          "webhook",
          "measurements"
        ],
        "title": "RoofAnalysisResultDTO"
      },
      "RoofAnalysisRoofDTO": {
        "properties": {
          "total_area_m2": {
            "type": "number",
            "title": "Total Area M2",
            "description": "Total area of the roof surfaces, in m²."
          },
          "usable_area_m2": {
            "type": "number",
            "title": "Usable Area M2",
            "description": "Area of the roof that can hold panels after obstacles, setbacks and unsuitable faces, in m²."
          },
          "average_slope_degrees": {
            "type": "number",
            "title": "Average Slope Degrees",
            "description": "Area-weighted average pitch of the roof faces, in degrees."
          }
        },
        "type": "object",
        "required": [
          "total_area_m2",
          "usable_area_m2",
          "average_slope_degrees"
        ],
        "title": "RoofAnalysisRoofDTO"
      },
      "RoofAnalysisSystemDTO": {
        "properties": {
          "size_kwp": {
            "type": "number",
            "title": "Size Kwp",
            "description": "Installed panel capacity, in kWp."
          },
          "panel": {
            "$ref": "#/components/schemas/RoofAnalysisPanelDTO",
            "description": "The panel model; quantity is the number of panels."
          },
          "inverters": {
            "items": {
              "$ref": "#/components/schemas/RoofAnalysisInverterDTO"
            },
            "type": "array",
            "title": "Inverters",
            "description": "The separate inverters. Empty when the battery's integrated inverter is used."
          },
          "battery": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RoofAnalysisBatteryDTO"
              },
              {
                "type": "null"
              }
            ],
            "description": "The battery, when the system includes one."
          },
          "estimated_cabling_m": {
            "type": "number",
            "title": "Estimated Cabling M",
            "description": "Estimated total length of DC, AC and earthing cable, in m."
          }
        },
        "type": "object",
        "required": [
          "size_kwp",
          "panel",
          "inverters",
          "battery",
          "estimated_cabling_m"
        ],
        "title": "RoofAnalysisSystemDTO"
      },
      "RoofAnalysisTariff": {
        "type": "string",
        "enum": [
          "STANDARD",
          "OCTOPUS_FLUX",
          "ECONOMY_7"
        ],
        "title": "RoofAnalysisTariff",
        "description": "The electricity tariff the financial figures assume. STANDARD keeps the location's single-rate import and\nexport prices. OCTOPUS_FLUX and ECONOMY_7 are UK time-of-use tariffs for systems with a battery, available when\nthe SunnyForm's tariff step offers them."
      },
      "RoofAnalysisWebhookDTO": {
        "properties": {
          "requested": {
            "type": "boolean",
            "title": "Requested",
            "description": "Whether the request set send_webhook."
          },
          "receivers": {
            "type": "integer",
            "title": "Receivers",
            "description": "Enabled webhooks of the SunnyForm that will receive offer.created."
          }
        },
        "type": "object",
        "required": [
          "requested",
          "receivers"
        ],
        "title": "RoofAnalysisWebhookDTO"
      }
    },
    "securitySchemes": {
      "SolariseApiKey": {
        "type": "http",
        "description": "A Solarise API key, created in the Solarise dashboard under API, sent as `Authorization: Bearer <key>`.",
        "scheme": "bearer",
        "bearerFormat": "solarise_sk_<id>_<secret>"
      }
    }
  },
  "x-error-codes": [
    {
      "code": "missing_api_key",
      "status": 401,
      "message": "Send your API key in the Authorization header as 'Bearer <key>'."
    },
    {
      "code": "invalid_api_key",
      "status": 401,
      "message": "The API key is not valid."
    },
    {
      "code": "api_key_revoked",
      "status": 401,
      "message": "This API key has been revoked. Create a new key in the Solarise dashboard."
    },
    {
      "code": "account_inactive",
      "status": 403,
      "message": "The Solarise account or company of this API key is not active."
    },
    {
      "code": "insufficient_measurements",
      "status": 402,
      "message": "Your plan has no measurements left, or your subscription is paused. Add measurements in the Solarise dashboard and try again."
    },
    {
      "code": "invalid_json",
      "status": 400,
      "message": "The request body is not valid JSON."
    },
    {
      "code": "invalid_request",
      "status": 422,
      "message": "The request does not match the API contract. See error.details."
    },
    {
      "code": "payload_too_large",
      "status": 413,
      "message": "The request body is too large."
    },
    {
      "code": "sunnyform_not_found",
      "status": 404,
      "message": "No SunnyForm with this ID belongs to the company of this API key."
    },
    {
      "code": "building_type_not_supported",
      "status": 422,
      "message": "The SunnyForm does not support this building type."
    },
    {
      "code": "roof_material_required",
      "status": 422,
      "message": "The SunnyForm prices systems by roof material, so roof_material is required."
    },
    {
      "code": "roof_material_not_supported",
      "status": 422,
      "message": "The SunnyForm does not offer this roof material."
    },
    {
      "code": "battery_not_available",
      "status": 422,
      "message": "The SunnyForm has no battery for this building type, so include_battery cannot be true."
    },
    {
      "code": "battery_required",
      "status": 422,
      "message": "Every inverter of the SunnyForm for this building type is built into a battery, so include_battery cannot be false."
    },
    {
      "code": "tariff_not_available",
      "status": 422,
      "message": "This tariff is not available for this analysis."
    },
    {
      "code": "location_not_found",
      "status": 422,
      "message": "The location could not be found."
    },
    {
      "code": "location_not_specific",
      "status": 422,
      "message": "The location is not specific enough to identify one building. Send a full street address with its house number, an Eircode, a Plus Code, or coordinates."
    },
    {
      "code": "location_not_supported",
      "status": 422,
      "message": "Solarise cannot analyse properties in this location's country yet."
    },
    {
      "code": "customer_contact_conflict",
      "status": 409,
      "message": "The contact details cannot be linked to one customer of this account, for example because the email and phone number belong to different contacts. Send the pair that belongs together, other details, or none."
    },
    {
      "code": "idempotency_key_reused",
      "status": 409,
      "message": "This Idempotency-Key was already used with a different request."
    },
    {
      "code": "request_in_progress",
      "status": 409,
      "message": "An analysis with this Idempotency-Key is still running. Retry the same request later to get its result."
    },
    {
      "code": "rate_limited",
      "status": 429,
      "message": "Too many requests. Retry after the time in the Retry-After header."
    },
    {
      "code": "too_many_concurrent_requests",
      "status": 429,
      "message": "Too many analyses are running for this account. Retry after the time in the Retry-After header."
    },
    {
      "code": "no_imagery_available",
      "status": 422,
      "message": "No suitable aerial imagery is available at this location."
    },
    {
      "code": "roof_not_found",
      "status": 422,
      "message": "No roof could be identified at this location."
    },
    {
      "code": "no_suitable_system",
      "status": 422,
      "message": "No solar system configuration with the SunnyForm's products fits this roof."
    },
    {
      "code": "analysis_failed",
      "status": 500,
      "message": "The analysis could not be completed. You were not charged."
    },
    {
      "code": "analysis_timeout",
      "status": 504,
      "message": "The analysis took too long and was stopped. You were not charged."
    },
    {
      "code": "service_unavailable",
      "status": 503,
      "message": "A service the analysis depends on is temporarily unavailable. You were not charged. Retry later."
    },
    {
      "code": "internal_error",
      "status": 500,
      "message": "An unexpected error occurred. You were not charged."
    }
  ]
}
