> ## 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.

# Get a module by ID

> Gets the specific module from the provided Id.



## OpenAPI

````yaml /api-docs/api-reference/plantpredict-api.yaml get /Module/{moduleId}
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:
  /Module/{moduleId}:
    get:
      tags:
        - Modules
      summary: Get a module by ID
      description: Gets the specific module from the provided Id.
      operationId: getModule
      parameters:
        - name: moduleId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Module entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Module'
            text/plain:
              examples:
                postman-module:
                  value: |-
                    {
                        "status": 5,
                        "model": "FS-7540A-TR1 September2022",
                        "manufacturer": "First Solar",
                        "length": 2300,
                        "width": 1215,
                        "weight": 39.7,
                        "defaultOrientation": 1,
                        "numberOfCellsInSeries": 268,
                        "numberOfCellsInParallel": 1,
                        "stcShortCircuitCurrent": 3.064,
                        "stcOpenCircuitVoltage": 227.717,
                        "stcmppCurrent": 2.861,
                        "stcmppVoltage": 188.69,
                        "stcMaxPower": 540,
                        "stcPowerTempCoef": -0.32,
                        "stcShortCircuitCurrentTempCoef": 0.04,
                        "stcOpenCircuitVoltageTempCoef": -0.28,
                        "stcEfficiency": 19.32367149758454,
                        "minTolerance": 0,
                        "maxTolerance": 5,
                        "cellTechnologyType": 6,
                        "constructionType": 1,
                        "faciality": 0,
                        "bifacialityFactor": null,
                        "transmissionFactor": null,
                        "backSideMismatch": null,
                        "dataSource": 1,
                        "lightInducedDegradation": 0,
                        "moduleQuality": 0,
                        "moduleMismatchCoefficient": 0.5,
                        "heatBalanceConvectiveCoef": 0,
                        "heatBalanceConductiveCoef": 29,
                        "sandiaConductiveCoef": -3.47,
                        "sandiaConvectiveCoef": -0.0594,
                        "cellToModuleTempDiff": 3,
                        "saturationCurrentAtSTC": 2.269097e-11,
                        "seriesResistanceAtSTC": 4.602,
                        "shuntResistanceAtSTC": 7000,
                        "diodeIdealityFactorAtSTC": 1.292,
                        "exponentialDependencyOnShuntResistance": 5.5,
                        "darkShuntResistance": 7000,
                        "linearTempDependenceOnGamma": 0.03637770897832817,
                        "shortCircuitCurrentAtSTC": 3.064,
                        "recombinationParameter": 0.2000000000000001,
                        "builtInVoltage": 0.9,
                        "bandgapVoltage": 1.5,
                        "linearTempDependenceOnIsc": 0.04,
                        "heatAbsorptionCoefAlphaT": 0.9,
                        "referenceIrradiance": 1000,
                        "referenceTemperature": 25,
                        "aGamma": null,
                        "bGamma": null,
                        "cGamma": null,
                        "dGamma": null,
                        "spectralResponse": 2,
                        "pvModel": 0,
                        "useDefaultSandiaIAM": false,
                        "useDefaultTabularIAM": false,
                        "sandiaSpectralA0": null,
                        "sandiaSpectralA1": null,
                        "sandiaSpectralA2": null,
                        "sandiaSpectralA3": null,
                        "sandiaSpectralA4": null,
                        "sandiaIAMB0": 6.038242275137197,
                        "sandiaIAMB1": -0.5248112239136882,
                        "sandiaIAMB2": 0.02130703918426116,
                        "sandiaIAMB3": -0.00042240723312322523,
                        "sandiaIAMB4": 0.000004091960268471148,
                        "sandiaIAMB5": -1.5564126828688897e-8,
                        "ashraeiamB0": 0.05,
                        "spectral2B0": 0.86273,
                        "spectral2B1": -0.038948,
                        "spectral2B2": -0.012506,
                        "spectral2B3": 0.098871,
                        "spectral2B4": 0.084658,
                        "spectral2B5": -0.0042948,
                        "iamFactors": [
                            {
                                "id": 410266,
                                "incidenceAngle": 0,
                                "factor": 1
                            },
                            {
                                "id": 410267,
                                "incidenceAngle": 30,
                                "factor": 1
                            },
                            {
                                "id": 410268,
                                "incidenceAngle": 55,
                                "factor": 0.99
                            },
                            {
                                "id": 410269,
                                "incidenceAngle": 60,
                                "factor": 0.98
                            },
                            {
                                "id": 410270,
                                "incidenceAngle": 65,
                                "factor": 0.96
                            },
                            {
                                "id": 410271,
                                "incidenceAngle": 70,
                                "factor": 0.92
                            },
                            {
                                "id": 410272,
                                "incidenceAngle": 75,
                                "factor": 0.85
                            },
                            {
                                "id": 410273,
                                "incidenceAngle": 80,
                                "factor": 0.72
                            },
                            {
                                "id": 410274,
                                "incidenceAngle": 90,
                                "factor": 0
                            }
                        ],
                        "degradationModel": 1,
                        "linearDegradationRate": 0.3,
                        "nonLinearDegradationRates": [],
                        "cellDesignType": null,
                        "useAntiReflectiveCoating": false,
                        "refractiveIndex": 1.526,
                        "refractiveIndexOfARC": 1.29,
                        "glazingExtinctionCoef": 4,
                        "glazingThickness": 0.002,
                        "powerAtSTC": 0,
                        "powerAtSTCExcludingWiringLosses": 0,
                        "effectiveIrradianceResponse": [
                            {
                                "irradiance": 100,
                                "temperature": 25,
                                "relativeEfficiency": 0.8814819319715739
                            },
                            {
                                "irradiance": 200,
                                "temperature": 25,
                                "relativeEfficiency": 0.9467641893572506
                            },
                            {
                                "irradiance": 300,
                                "temperature": 25,
                                "relativeEfficiency": 0.9727857600367622
                            },
                            {
                                "irradiance": 400,
                                "temperature": 25,
                                "relativeEfficiency": 0.9864198360018204
                            },
                            {
                                "irradiance": 500,
                                "temperature": 25,
                                "relativeEfficiency": 0.994194382349794
                            },
                            {
                                "irradiance": 600,
                                "temperature": 25,
                                "relativeEfficiency": 0.9986027250356551
                            },
                            {
                                "irradiance": 700,
                                "temperature": 25,
                                "relativeEfficiency": 1.0008398407389827
                            },
                            {
                                "irradiance": 800,
                                "temperature": 25,
                                "relativeEfficiency": 1.0015713396635646
                            },
                            {
                                "irradiance": 900,
                                "temperature": 25,
                                "relativeEfficiency": 1.001203606468212
                            },
                            {
                                "irradiance": 1000,
                                "temperature": 25,
                                "relativeEfficiency": 1
                            },
                            {
                                "irradiance": 1100,
                                "temperature": 25,
                                "relativeEfficiency": 0.9981406314820271
                            },
                            {
                                "irradiance": 1200,
                                "temperature": 25,
                                "relativeEfficiency": 0.9957540528792794
                            },
                            {
                                "irradiance": 100,
                                "temperature": 50,
                                "relativeEfficiency": 0.8742670870403499
                            },
                            {
                                "irradiance": 200,
                                "temperature": 50,
                                "relativeEfficiency": 0.9404278435155332
                            },
                            {
                                "irradiance": 300,
                                "temperature": 50,
                                "relativeEfficiency": 0.9680071162319765
                            },
                            {
                                "irradiance": 400,
                                "temperature": 50,
                                "relativeEfficiency": 0.9829378885559052
                            },
                            {
                                "irradiance": 500,
                                "temperature": 50,
                                "relativeEfficiency": 0.9917136616820472
                            },
                            {
                                "irradiance": 600,
                                "temperature": 50,
                                "relativeEfficiency": 0.9969019479321173
                            },
                            {
                                "irradiance": 700,
                                "temperature": 50,
                                "relativeEfficiency": 0.9997423852901055
                            },
                            {
                                "irradiance": 800,
                                "temperature": 50,
                                "relativeEfficiency": 1.0009460787440676
                            },
                            {
                                "irradiance": 900,
                                "temperature": 50,
                                "relativeEfficiency": 1.000936227746243
                            },
                            {
                                "irradiance": 1000,
                                "temperature": 50,
                                "relativeEfficiency": 1
                            },
                            {
                                "irradiance": 1100,
                                "temperature": 50,
                                "relativeEfficiency": 0.9983320742461258
                            },
                            {
                                "irradiance": 1200,
                                "temperature": 50,
                                "relativeEfficiency": 0.9960749126620079
                            }
                        ],
                        "electricalShadingFractionalEffect": 0,
                        "moduleShadingResponse": 1,
                        "isMetastable": false,
                        "metastabilityProperties": null,
                        "id": 42176,
                        "name": "FS-7540A-TR1 CdTe September2022",
                        "description": "S7_505_540",
                        "companyId": 1,
                        "company": null,
                        "ownerId": 742
                        "createdDate": "2022-09-16T18:40:26.71",
                        "lastModified": "2022-09-19T11:52:55.073",
                        "lastModifiedById": 742
                    }
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    Module:
      type: object
      required:
        - name
        - manufacturer
        - model
        - stcMaxPower
      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
        model:
          type: string
        manufacturer:
          type: string
        length:
          type: number
          description: mm
        width:
          type: number
          description: mm
        weight:
          type: number
          description: kg
        defaultOrientation:
          type: integer
          enum:
            - 0
            - 1
          x-enum-varnames:
            - Landscape
            - Portrait
          description: ModuleOrientation
        numberOfCellsInSeries:
          type: integer
        numberOfCellsInParallel:
          type: integer
        stcShortCircuitCurrent:
          type: number
        stcOpenCircuitVoltage:
          type: number
        stcmppCurrent:
          type: number
        stcmppVoltage:
          type: number
        stcMaxPower:
          type: number
          description: Wp
        stcPowerTempCoef:
          type: number
        stcShortCircuitCurrentTempCoef:
          type: number
        stcOpenCircuitVoltageTempCoef:
          type: number
        stcEfficiency:
          type: number
        minTolerance:
          type: number
        maxTolerance:
          type: number
        cellTechnologyType:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
          x-enum-varnames:
            - NTypeMonoCSi
            - PTypeMonoCSiPERC
            - PTypeMonoCSiBSF
            - PolyCSiPERC
            - PolyCSiBSF
            - CdTe
            - CIGS
            - Mixed
          description: CellTechnologyTypeEnum
        cellDesignType:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          x-enum-varnames:
            - FullCellTechnology
            - HalfCellTechnology
            - NA
            - NoneSpecified
          description: CellDesignType
        constructionType:
          type: integer
          enum:
            - 1
            - 2
          x-enum-varnames:
            - GlassGlass
            - GlassBacksheet
          description: ConstructionTypeEnum
        faciality:
          type: integer
          enum:
            - 0
            - 1
          x-enum-varnames:
            - Monofacial
            - Bifacial
          description: FacialityEnum
        bifacialityFactor:
          type:
            - number
            - 'null'
        transmissionFactor:
          type:
            - number
            - 'null'
        backSideMismatch:
          type:
            - number
            - 'null'
        dataSource:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
          x-enum-varnames:
            - Manufacturer
            - PVsyst
            - UniversityOfGeneva
            - Photon
            - SandiaDatabase
            - Custom
            - PlantPredict
          description: DataSourceType
        lightInducedDegradation:
          type: number
        moduleQuality:
          type: number
        moduleMismatchCoefficient:
          type: number
        heatBalanceConvectiveCoef:
          type: number
        heatBalanceConductiveCoef:
          type: number
        sandiaConductiveCoef:
          type: number
        sandiaConvectiveCoef:
          type: number
        cellToModuleTempDiff:
          type: number
        pvModel:
          type: integer
          enum:
            - 0
            - 1
            - 3
          x-enum-varnames:
            - V1DiodeRecombination
            - V1Diode
            - V1DiodeRecombinationNonLinearTemp
          description: PvModelType
        referenceIrradiance:
          type: number
        referenceTemperature:
          type: number
        degradationModel:
          type: integer
          enum:
            - 0
            - 1
            - 2
          x-enum-varnames:
            - Unspecified
            - Linear
            - NonLinear
          description: ModuleDegradationModel
        linearDegradationRate:
          type: number
        effectiveIrradianceResponse:
          type:
            - array
            - 'null'
          items:
            type: object
        iamFactors:
          type:
            - array
            - 'null'
          items:
            type: object
        nonLinearDegradationRates:
          type: array
          items:
            type: object
  responses:
    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.
    NotFound:
      description: >-
        The referenced resource does not exist or is not accessible to the
        caller.
      content:
        text/plain:
          schema:
            type: string
          example: Project not found.
    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.

````