> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plantpredict.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a weather file

> Creates a new weather file in the company library from a payload of hourly meteorological records (irradiance, temperature, wind, etc.). For provider-sourced data, use `POST /Weather/Download/{providerId}` instead so metadata and downloads are handled automatically.



## OpenAPI

````yaml /api-docs/api-reference/plantpredict-api.yaml post /Weather
openapi: 3.1.0
info:
  title: PlantPredict API
  version: 12.13.0
  description: >
    ## What is PlantPredict?


    PlantPredict is an industry-leading performance modeling platform for
    utility-scale

    solar power plants. It predicts energy yield across the full project
    lifecycle —

    from early-stage site prospecting through detailed engineering and
    operational

    monitoring. The same engine that powers the PlantPredict web UI is fully
    exposed

    via this REST API, enabling automation of complex, high-time-resolution
    energy

    predictions without any UI interaction.


    ## Domain Model — read this first


    Understanding the object hierarchy is essential before calling the API:


    - **Weather** — A weather file (hourly irradiance, temperature, wind, etc.)
    for a
      geographic location. Imported from a provider (e.g. SolarAnywhere, Meteonorm) or
      uploaded manually. Weather files live in a company-wide library and are referenced
      by Predictions.

    - **Module** — A PV module definition parameterized with electrical
    characteristics
      (STC power, temperature coefficients, single-diode model parameters, IAM curves,
      etc.). Modules live in a company-wide library.

    - **Inverter** — An inverter definition with efficiency curves,
    voltage/power ratings,
      and optional kVA derating curves. Inverters live in a company-wide library.

    - **Project** — A named location (lat/lon) that acts as a container for one
    or more
      Predictions. Holds geographic metadata (country, elevation, UTC offset) and a status.

    - **Prediction** — The core simulation configuration nested under a Project.
    Defines
      the simulation period, model selections (transposition, air mass, degradation,
      soiling, shading, spectral shift models), uncertainty error terms, and references
      to a Weather file. A Prediction must be linked to a PowerPlant before it can be run.
      Status values: 0 = Draft, 1 = Active, 2 = Issued, 3 = Archived.

    - **PowerPlant** — The physical plant design attached to a Prediction.
    Describes the
      electrical topology: Blocks → Arrays → Inverters → DC Fields (strings of modules).
      Also includes transformers, transmission lines, energy storage (ESS), availability
      losses, and LGIA export limits.

    - **Shade Scene** — An optional 3D shading model (PVJ format) attached to a
      Prediction's DC Fields. Supports import from PVC or SHD files. Shade and TABT
      (Tracker Angle Back-Tracking) calculations are queued and run asynchronously.

    ## Typical workflow to run a prediction


    1. Ensure a **Weather** file exists (search, download, or import one).

    2. Ensure a **Module** and **Inverter** exist in the library.

    3. **POST /Project** — create a project at the site location.

    4. **POST /Project/{projectId}/Prediction** — create a prediction with model
    settings.

    5. **POST /Project/{projectId}/Prediction/{predictionId}/PowerPlant** —
    attach a plant
       design referencing your module and inverter.
    6. **POST /Project/{projectId}/Prediction/{predictionId}/Run** — queue the
    simulation.

    7. Poll **GET /Project/{projectId}/Prediction/{predictionId}/Overview**
    until
       `status` reaches 2 (complete), then retrieve results via `/ResultSummary`,
       `/ResultDetails`, or `/NodalJson`.

    ## Authentication


    OAuth 2.0 **Client Credentials** flow via AWS Cognito. The spec advertises

    a single `bearerAuth` scheme — fetch a token yourself with the snippet

    below, then either paste it into the in-browser playground or pass it on

    every request as `Authorization: Bearer <token>`.


    > **Why not advertise OAuth2 directly?** Most users have access to the

    > production tenant only, and we don't want to invite anyone to enter

    > long-lived `client_id` / `client_secret` credentials into a third-party

    > documentation site. Keep credentials in your own environment; ship

    > short-lived bearer tokens to wherever they are needed.


    - Token URL:
    `https://terabase-prd.auth.us-west-2.amazoncognito.com/oauth2/token`

    - Scopes: `transactions/get` (read), `transactions/post` (write) — request
      both to access the entire surface.
    - Send credentials as **Basic Auth** in the token request header.


    Example:


    ```bash

    curl -X POST
    'https://terabase-prd.auth.us-west-2.amazoncognito.com/oauth2/token' \
      -u "$PP_CLIENT_ID:$PP_CLIENT_SECRET" \
      -d 'grant_type=client_credentials&scope=transactions/get transactions/post'
    ```


    API credentials (Client ID + Secret) are generated per user by a company
    admin

    inside the PlantPredict UI (gear icon → user profile → Generate API
    Credentials).

    Store them securely — they are shown only once.


    ## Notes


    - All request/response bodies are JSON (`Content-Type: application/json`).

    - The API is stateless — every request must supply complete inputs; there is
    no session.

    - POST operations that create entities return `{"id": <integer>}`.

    - Many integer fields (model types, status codes) map to named enums — use
      `GET /Definitions` to retrieve the full enum catalog at runtime.
    - Long-running operations (Run, Shade calculations, TABT) are asynchronous;
    poll
      the corresponding `ProcessingStatus` endpoint to track progress.
    - Responses may include an `X-Message` header with non-blocking warnings
    (e.g.
      duplicate project name).
servers:
  - url: https://api.plantpredict.terabase.energy
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Definitions
    description: Enum and model type definitions
  - name: Projects
    description: Solar project management
  - name: Predictions
    description: Energy prediction configuration and execution
  - name: PowerPlant
    description: Power plant design (blocks, arrays, inverters, transformers)
  - name: TimeSeries
    description: Custom time series data inputs
  - name: Results
    description: Prediction results — summary, details, nodal, average energy
  - name: FinancialModel
    description: Financial model parameters and cashflow results
  - name: Reports
    description: Report generation and export
  - name: ShadeScene
    description: 3D shade scene management and calculations
  - name: Weather
    description: Weather file import, download, and management
  - name: Inverters
    description: Inverter library management
  - name: Modules
    description: PV module library and single-diode parameter generation
  - name: ASHRAE
    description: ASHRAE climate station lookup
  - name: System
    description: System version and maintenance status
  - name: Company
    description: Company settings and user management
  - name: Country
    description: Reference country data
paths:
  /Weather:
    post:
      tags:
        - Weather
      summary: Create a weather file
      description: >-
        Creates a new weather file in the company library from a payload of
        hourly meteorological records (irradiance, temperature, wind, etc.). For
        provider-sourced data, use `POST /Weather/Download/{providerId}` instead
        so metadata and downloads are handled automatically.
      operationId: createWeather
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WeatherFile'
            examples:
              postman-weather-create:
                value:
                  status: 1
                  distance: 0
                  locality: Oxford
                  stateProvince: Nebraska
                  stateProvinceCode: NE
                  country: United States
                  countryCode: US
                  region: North America
                  source: LocalWeatherFile.xlsx
                  stationName: ''
                  format: 3
                  stationCode: null
                  latitude: 40.1932678
                  longitude: -99.7152252
                  elevation: 665
                  timeZone: -6
                  timestampDefinition: 0
                  timestampDefinitionOriginal: 0
                  timeInterval: 60
                  startDate: '2005-01-01T00:00:00'
                  endDate: '2005-01-01T23:00:00'
                  globalHorizontalIrradianceSum: 0.6
                  diffuseHorizontalIrradianceSum: 0.6
                  directNormalIrradianceSum: 0
                  planeOfArrayIrradianceSum: null
                  averageAirTemperature: 6.55
                  maxAirTemperature: 8.25
                  averageRelativeHumidity: 79.56
                  averageWindSpeed: 3.25
                  averagePrecipitableWater: null
                  averageDewpoint: null
                  averageSoilingLoss: null
                  rainfallSum: 4.57
                  weatherDataModelVersion: 8.1.2.15989
                  dataProvider: 4
                  pLevel: 0
                  windSensorHeight: 10
                  weatherDetails:
                    - id: 0
                      weatherId: 68915
                      index: 1
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 6.07
                      relativeHumidity: 87.76
                      windspeed: 3
                      windDirection: 173.1
                      timeStamp: '2005-01-01T00:00:00'
                      adjustedTimeStamp: '2005-01-01T00:30:00'
                      precipitableWater: null
                      rainfall: 2.23
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 2
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 6.27
                      relativeHumidity: 79.89
                      windspeed: 2.5
                      windDirection: 206.5
                      timeStamp: '2005-01-01T01:00:00'
                      adjustedTimeStamp: '2005-01-01T01:30:00'
                      precipitableWater: null
                      rainfall: 0.1
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 3
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 6.01
                      relativeHumidity: 82.03
                      windspeed: 2
                      windDirection: 204.1
                      timeStamp: '2005-01-01T02:00:00'
                      adjustedTimeStamp: '2005-01-01T02:30:00'
                      precipitableWater: null
                      rainfall: 0.15
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 4
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 5.93
                      relativeHumidity: 79.61
                      windspeed: 2.5
                      windDirection: 264.5
                      timeStamp: '2005-01-01T03:00:00'
                      adjustedTimeStamp: '2005-01-01T03:30:00'
                      precipitableWater: null
                      rainfall: 0.03
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 5
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 5.81
                      relativeHumidity: 77.89
                      windspeed: 2.3
                      windDirection: 218.4
                      timeStamp: '2005-01-01T04:00:00'
                      adjustedTimeStamp: '2005-01-01T04:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 6
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 5.7
                      relativeHumidity: 76.96
                      windspeed: 2.6
                      windDirection: 207.4
                      timeStamp: '2005-01-01T05:00:00'
                      adjustedTimeStamp: '2005-01-01T05:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 7
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 5.62
                      relativeHumidity: 80.45
                      windspeed: 2.2
                      windDirection: 231
                      timeStamp: '2005-01-01T06:00:00'
                      adjustedTimeStamp: '2005-01-01T06:30:00'
                      precipitableWater: null
                      rainfall: 0.01
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 8
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 930.32
                      temperature: 5.54
                      relativeHumidity: 80.71
                      windspeed: 3
                      windDirection: 191.6
                      timeStamp: '2005-01-01T07:00:00'
                      adjustedTimeStamp: '2005-01-01T07:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 9
                      dewpoint: null
                      diffuseHorizontalIrradiance: 6.1
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 6.1
                      pressure: 930.32
                      temperature: 5.76
                      relativeHumidity: 80.31
                      windspeed: 2.6
                      windDirection: 168.9
                      timeStamp: '2005-01-01T08:00:00'
                      adjustedTimeStamp: '2005-01-01T08:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 30.0402528947981
                    - id: 0
                      weatherId: 68915
                      index: 10
                      dewpoint: null
                      diffuseHorizontalIrradiance: 50.08
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 50.08
                      pressure: 930.32
                      temperature: 6.57
                      relativeHumidity: 83.12
                      windspeed: 4.1
                      windDirection: 252.7
                      timeStamp: '2005-01-01T09:00:00'
                      adjustedTimeStamp: '2005-01-01T09:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 185.49330738635734
                    - id: 0
                      weatherId: 68915
                      index: 11
                      dewpoint: null
                      diffuseHorizontalIrradiance: 88.92
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 88.92
                      pressure: 930.32
                      temperature: 7.31
                      relativeHumidity: 76.96
                      windspeed: 3.7
                      windDirection: 50.4
                      timeStamp: '2005-01-01T10:00:00'
                      adjustedTimeStamp: '2005-01-01T10:30:00'
                      precipitableWater: null
                      rainfall: 0.02
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 320.34875208133815
                    - id: 0
                      weatherId: 68915
                      index: 12
                      dewpoint: null
                      diffuseHorizontalIrradiance: 103.67
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 103.67
                      pressure: 930.32
                      temperature: 7.82
                      relativeHumidity: 74.6
                      windspeed: 3.5
                      windDirection: 181.3
                      timeStamp: '2005-01-01T11:00:00'
                      adjustedTimeStamp: '2005-01-01T11:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 412.4474580667211
                    - id: 0
                      weatherId: 68915
                      index: 13
                      dewpoint: null
                      diffuseHorizontalIrradiance: 99.12
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 99.12
                      pressure: 930.32
                      temperature: 8.08
                      relativeHumidity: 71.52
                      windspeed: 3.9
                      windDirection: 189.9
                      timeStamp: '2005-01-01T12:00:00'
                      adjustedTimeStamp: '2005-01-01T12:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 452.27318005064905
                    - id: 0
                      weatherId: 68915
                      index: 14
                      dewpoint: null
                      diffuseHorizontalIrradiance: 92.96
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 92.96
                      pressure: 930.45
                      temperature: 8.23
                      relativeHumidity: 72.61
                      windspeed: 4.4
                      windDirection: 57.8
                      timeStamp: '2005-01-01T13:00:00'
                      adjustedTimeStamp: '2005-01-01T13:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 436.06204606577194
                    - id: 0
                      weatherId: 68915
                      index: 15
                      dewpoint: null
                      diffuseHorizontalIrradiance: 79.1
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 79.1
                      pressure: 930.58
                      temperature: 8.25
                      relativeHumidity: 67.18
                      windspeed: 3.7
                      windDirection: 55.1
                      timeStamp: '2005-01-01T14:00:00'
                      adjustedTimeStamp: '2005-01-01T14:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 365.3295473095477
                    - id: 0
                      weatherId: 68915
                      index: 16
                      dewpoint: null
                      diffuseHorizontalIrradiance: 52.79
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 52.79
                      pressure: 930.7
                      temperature: 8.09
                      relativeHumidity: 66.09
                      windspeed: 5.1
                      windDirection: 175.9
                      timeStamp: '2005-01-01T15:00:00'
                      adjustedTimeStamp: '2005-01-01T15:30:00'
                      precipitableWater: null
                      rainfall: 0.06
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 247.01201691729582
                    - id: 0
                      weatherId: 68915
                      index: 17
                      dewpoint: null
                      diffuseHorizontalIrradiance: 22.03
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 22.03
                      pressure: 930.83
                      temperature: 7.7
                      relativeHumidity: 81.96
                      windspeed: 3.9
                      windDirection: 36
                      timeStamp: '2005-01-01T16:00:00'
                      adjustedTimeStamp: '2005-01-01T16:30:00'
                      precipitableWater: null
                      rainfall: 0.23
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 95.29513760680047
                    - id: 0
                      weatherId: 68915
                      index: 18
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0.59
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0.59
                      pressure: 930.96
                      temperature: 7.23
                      relativeHumidity: 81.98
                      windspeed: 4.4
                      windDirection: 155.2
                      timeStamp: '2005-01-01T17:00:00'
                      adjustedTimeStamp: '2005-01-01T17:30:00'
                      precipitableWater: null
                      rainfall: 0.52
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 19
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 931.09
                      temperature: 6.75
                      relativeHumidity: 82
                      windspeed: 3.7
                      windDirection: 52.1
                      timeStamp: '2005-01-01T18:00:00'
                      adjustedTimeStamp: '2005-01-01T18:30:00'
                      precipitableWater: null
                      rainfall: 0.88
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 20
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 931.22
                      temperature: 6.45
                      relativeHumidity: 82.01
                      windspeed: 3.7
                      windDirection: 190.7
                      timeStamp: '2005-01-01T19:00:00'
                      adjustedTimeStamp: '2005-01-01T19:30:00'
                      precipitableWater: null
                      rainfall: 0.34
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 21
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 931.34
                      temperature: 6.09
                      relativeHumidity: 85.91
                      windspeed: 3.7
                      windDirection: 203.5
                      timeStamp: '2005-01-01T20:00:00'
                      adjustedTimeStamp: '2005-01-01T20:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 22
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 931.47
                      temperature: 5.69
                      relativeHumidity: 85.92
                      windspeed: 2.9
                      windDirection: 164.6
                      timeStamp: '2005-01-01T21:00:00'
                      adjustedTimeStamp: '2005-01-01T21:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 23
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 931.6
                      temperature: 5.29
                      relativeHumidity: 85.94
                      windspeed: 2.3
                      windDirection: 220.2
                      timeStamp: '2005-01-01T22:00:00'
                      adjustedTimeStamp: '2005-01-01T22:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                    - id: 0
                      weatherId: 68915
                      index: 24
                      dewpoint: null
                      diffuseHorizontalIrradiance: 0
                      directNormalIrradiance: 0
                      planeOfArrayIrradiance: null
                      globalHorizontalIrradiance: 0
                      pressure: 931.73
                      temperature: 4.88
                      relativeHumidity: 85.95
                      windspeed: 2.2
                      windDirection: 170.6
                      timeStamp: '2005-01-01T23:00:00'
                      adjustedTimeStamp: '2005-01-01T23:30:00'
                      precipitableWater: null
                      rainfall: 0
                      albedo: 0
                      soilingLoss: null
                      beamHorizontalIrradiance: 0
                      clearSkyIrradiance: 0
                  dataType: 1
                  customerName: ''
                  apiLocked: false
                  apiDownloaded: false
                  offsetMinutes: 0
                  usingSytemKey: false
                  moduleTilt: null
                  moduleAzimuth: null
                  trackingType: null
                  trackingBacktrackingType: 0
                  minimumTrackingLimitAngleD: 0
                  maximumTrackingLimitAngleD: null
                  trackerPitchAngleD: 0
                  trackerStowAngle: 0
                  groundCoverageRatio: null
                  id: 68915
                  name: Meteonorm - 40.193N - 99.715W
                  description: null
      responses:
        '200':
          description: Created weather ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdResponse'
              examples:
                postman-create:
                  value:
                    id: 68916
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    WeatherFile:
      type: object
      required:
        - name
        - latitude
        - longitude
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        status:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
          x-enum-varnames:
            - Unknown
            - DraftPrivate
            - DraftShared
            - Active
            - Retired
            - Global
            - GlobalRetired
          description: LibraryStatusEnum
        source:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
          x-enum-varnames:
            - Unknown
            - Meteonorm
            - CPRSolarAnywhere
            - NSRDBPSM
            - NSRDBSUNY
            - NSRDBMTS2
            - SolarGIS
            - NASA
            - Solcast
            - PVGIS
          description: WeatherSourceTypeAPIEnum
        stationName:
          type: string
        stationCode:
          type: string
        format:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
          x-enum-varnames:
            - SolarProspectorCSV
            - NRELTMY3
            - MeteonormTMY3
            - V3Tier
            - AWS
            - EPW
            - GeoModelSolar
            - SolarAnywhere
            - PlantPredict
            - TMY3
            - SolarGIS
            - NASA
            - V3TierVaisala
            - Solcast
            - PVGIS
          description: WeatherFormat
        latitude:
          type: number
        longitude:
          type: number
        elevation:
          type: number
        timeZone:
          type: number
        timestampDefinition:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          x-enum-varnames:
            - Undefined
            - IntervalEnd
            - IntervalBegin
            - IntervalMiddle
          description: WeatherTimestampDefinitionEnum
        timeInterval:
          type: integer
        startDate:
          type: string
          description: >-
            ISO-8601 datetime as returned by the PlantPredict API. May or may
            not include a timezone offset; treat as server-local when no offset
            is present.
        endDate:
          type: string
          description: >-
            ISO-8601 datetime as returned by the PlantPredict API. May or may
            not include a timezone offset; treat as server-local when no offset
            is present.
        dataProvider:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
          x-enum-varnames:
            - NREL
            - AWSTruepower
            - WindLogics
            - Meteonorm
            - V3TIER
            - SolarAnywhere
            - GeoModelSolar
            - GeoSUNAfrica
            - SoDa
            - HelioClim
            - SolarResourceAssessment
            - EnergyPlus
            - Other
            - Customer
            - SolarProspector
            - GlobalFED
            - NSRDB
            - WhiteBoxTechnologies
            - SolarGIS
            - NASA
            - V3TIERVaisala
            - Solcast
            - PVGIS
          description: WeatherDataProvider
        dataType:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
          x-enum-varnames:
            - SyntheticMonthly
            - Satellite
            - GroundCorrected
            - Measured
            - TMY3
            - TGY
            - TMY
            - PSM
            - SUNY
            - MTS2
            - CZ2010
          description: WeatherDataType
        country:
          type: string
        countryCode:
          type: string
        stateProvince:
          type: string
        stateProvinceCode:
          type: string
        locality:
          type: string
        region:
          type: string
        globalHorizontalIrradianceSum:
          type: number
        diffuseHorizontalIrradianceSum:
          type: number
        directNormalIrradianceSum:
          type: number
        planeOfArrayIrradianceSum:
          type: number
        averageAirTemperature:
          type: number
        averageWindSpeed:
          type: number
        weatherDetails:
          type: array
          items:
            type: object
        pLevel:
          type: number
        windSensorHeight:
          type: number
        offsetMinutes:
          type: integer
        moduleTilt:
          type: number
        moduleAzimuth:
          type: number
        trackingType:
          type: integer
          enum:
            - 0
            - 1
            - 2
          x-enum-varnames:
            - FixedTilt
            - HorizontalTracker
            - SeasonalTilt
          description: DCFieldTrackingTypeEnum
        groundCoverageRatio:
          type: number
        companyId:
          type: integer
          readOnly: true
        createdDate:
          type: string
          readOnly: true
          description: >-
            ISO-8601 datetime as returned by the PlantPredict API. May or may
            not include a timezone offset; treat as server-local when no offset
            is present.
    IdResponse:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
    ModelStateError:
      type: object
      description: |
        ASP.NET Web API validation error. `modelState` maps the offending
        field name (or `request`) to a list of human-readable messages.
      properties:
        message:
          type: string
        modelState:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
  responses:
    BadRequest:
      description: |
        The request was rejected. PlantPredict returns one of two shapes:

        * `application/json` with `{message, modelState}` for input
          validation errors (ASP.NET Web API model-state). The `modelState`
          map keys field names to lists of human-readable error messages.
        * `text/plain` with a free-form message for runtime / database
          errors that bubble up before validation completes.

        Clients should branch on the `Content-Type` header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ModelStateError'
          example:
            message: The request is invalid.
            modelState:
              latitude:
                - The field Latitude must be between -90 and 90.
        text/plain:
          schema:
            type: string
          example: A successfully completed prediction cannot be cancelled.
    Unauthorized:
      description: >-
        Missing or invalid bearer token. The response body is empty and no
        `Content-Type` header is set; the 401 status code is the only signal.
        Fetch a fresh token (see the **Authentication** section of the API
        description) and retry.
    ServerError:
      description: |
        Unexpected server-side error. The body is usually a plain-text message
        but its structure is not guaranteed — treat it as opaque diagnostic
        text. Common causes: database constraint violation, downstream
        service timeout, internal exception. Retry-safe for idempotent
        requests; for non-idempotent ones, verify state before retrying.
      content:
        text/plain:
          schema:
            type: string
          example: An error has occurred.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Pass `Authorization: Bearer <token>` on every request. See the
        **Authentication** section of the API description for how to fetch a
        token.

````