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

# Update company default settings

> Updates default settings for your company. Requires Admin role. Default Settings are prediction input values customized per company.



## OpenAPI

````yaml /api-docs/api-reference/plantpredict-api.yaml put /Company/DefaultSettings
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:
  /Company/DefaultSettings:
    put:
      tags:
        - Company
      summary: Update company default settings
      description: >-
        Updates default settings for your company. Requires Admin role. Default
        Settings are prediction input values customized per company.
      operationId: updateCompanyDefaultSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environmentalConditions:
                  type: object
                powerPlantBuilder:
                  type: object
                simulationSettings:
                  type: object
                weatherAPISettings:
                  type: object
                essSettings:
                  type: object
                financialModelParameters:
                  type: object
                miscellaneousSettings:
                  type: object
                devPlatformSimulationSettings:
                  type: object
                devPlatformSitePlanSettings:
                  type: object
            examples:
              postman-company-default-settings:
                value:
                  environmentalConditions:
                    id: 190
                    monthlySoilingLoss: 2
                    monthlyAlbedo: 0.2
                  powerPlantBuilder:
                    acCollectionLoss: 1
                    dasLoad: 800
                    coolingLoad: 0
                    transformerHighSideVoltage: 34.5
                    transformerNoLoadLoss: 0.2
                    transformerFullLoadLoss: 0.7
                    powerFactor: 1
                    inverter_Id: 8279
                    dcacRatio: 1.2
                    dcWiringLossAtSTC: 1.5
                    dcHealth: 1
                    trackerLoadLoss: 2.028
                    minimumTrackingLimitAngleD: -60
                    maximumTrackingLimitAngleD: 60
                    structureShading: 5
                    module_Id: 224
                    dcFieldTrackingTypeEnum: 1
                    dcFieldBacktrackingType: 1
                    tiltAngle: null
                    gcr: 40
                    moduleOrientation: 1
                    azimuth: 180
                    modTempModel: 0
                    setback: 6.5
                    northSouthRoadWidth: 6.096011996927617
                    eastWestRoadWidth: 6.096011996927617
                  simulationSettings:
                    errorModelAcc: 2.9
                    errorSensAcc: 5
                    errorIntAnnVar: 3
                    errorMonAcc: 2
                    errorSpaVar: 2
                    transpositionModel: 1
                    diffuseDirectDecompModel: 3
                    useMeteoDni: false
                    airMassModel: 0
                    soilingModel: 0
                    modTempModel: 0
                    spectralShiftModel: 2
                    incAngleModel: 5
                    directBeamShadingModel: 5
                    degradationModel: 0
                    diffuseShadingModel: 1
                    defaultDegradation: 0
                    linearDegradationRate: 0.5
                    firstYearDegradation: false
                  weatherAPISettings:
                    meteonormSettings:
                      key: null
                    cprSettings:
                      apiKey: >-
                        wsr27ry83#T5B$HLZN3upBTO2iG$Dp1lcVEov13euxbnrS9HhGsRelQ0AIyjUKth
                      userName: null
                      password: null
                      licenseNumber: null
                    solarGISSettings:
                      key: gkvf7nN9IhjcjP9Jp7Lf
                      tmyKey: >-
                        MDAxLnNnMnwzMTM1NS5sM2l2aHpnZnVHLkhuL2xhSVNLd1kxY3QyTlR4M1RpeHl1N3dnSDhOT3d3Y1B1Q1ZWcDdhMlE9
                      version: 2
                  essSettings:
                    factor: 0.9
                    usableEnergyCapacityCalendarDeg: 0.2
                    usableEnergyCapacityCycleDeg: 0.005
                    roundtripDCEfficiencyYear1: 95
                    roundtripDCEfficiencyCalendarDeg: 0.05
                    roundtripDCEfficiencyCycleDeg: 0.0002
                    hvacNoLoadLoss: 1.5
                    hvacFullLoadLoss: 10
                    mvNoLoadLoss: 0.2
                    mvFullLoadLoss: 0.7
                    mvCapacity: null
                    inverterEfficiency: 97
                    chargeAlgorithm: 0
                  financialModelParameters:
                    bosInput: 0.5
                    developmentCostPerWatt: 0.1
                    moduleCostPerWatt: 0.3
                    itcPercentage: 26
                    yearOneEnergyAdjustmentPercentage: 0
                    ppaPrice: 25
                    ppaEscalatorPercentage: 0
                    omYearOne: 3.5
                    omYearlyEscalatorPercentage: 2.5
                    ppaDuration: 20
                    postPPAPrice: 50
                    postPPAPriceEscalationPercentage: 2
                    projectLife: 35
                    discountNPVPercentage: 6
                    itcEligibilityPercentage: 100
                    solarSalvageValuePercentage: 5
                    insuranceCapitalCostPercentage: 0.15
                    insuranceEscalatorPerYearPercentage: 0
                    bonusDepreciationRate: 0
                    stateTaxRate: 6
                    federalTaxRate: 21
                    solarLandLeaseCost: 0
                    solarLandLeaseEscalationPercentage: 0
                    solarPropertyTaxCost: 0
                    solarPropertyTaxEscalationPercentage: 0
                  miscellaneousSettings:
                    predictionStatus: 1
                  devPlatformSimulationSettings:
                    moduleType: 1
                    rackingSystem: 1
                    inverterType: 1
                    largeFormatModuleId: 223
                    shingledMonoPercId: 221
                    thinFilmId: 130
                    halfCellMonoPercId: 4956
                    bifacialId: 11
                    orientationTracker: 0
                    widthTracker: 0.02
                    heightTracker: 0.02
                    numOfPVModulesPerRowsTracker: 3
                    heightAboveGroundTracker: 3
                    pilesPerTableTracker: 5
                    pvModuleTiltMin: 0
                    pvModuleTiltMax: 2
                    tableAxisRotationMinTracker: -54
                    tableAxisRotationMaxTracker: 56
                    enableBacktrackingTracker: false
                    orientationMultistringTracker: 0
                    widthMultistringTracker: 0.02
                    maxWindSpeed: 100
                    motorTableGap: 1.87
                    gapBetweenTables: 0.247
                    heightAboveGroundStringTracker: 0.247
                    gapBetweenTrackers: 0.3
                    tableAxisRotationMinMultistringTracker: -54
                    tableAxisRotationMaxMultistringTracker: 56
                    enableBacktrackingMultistringTracker: false
                    orientationFixedTilt: 0
                    widthFixedTilt: 0.02
                    heightFixedTilt: 0.02
                    numOfPVModulesPerRowsFixedTilt: 3
                    heightAboveGroundFixedTilt: 3
                    pilesPerTableFixedTilt: 7
                    calculateModuleTiltAngle: false
                    moduleTiltAngle: 31
                    inverterCentralId: 739
                    powerFactorCentral: 2
                    ocdpRatingCentral: 320
                    maxNumOfTablesPerColumnCentral: 2
                    inverterStringId: 648
                    powerFactorString: 1
                    ocdpRatingString: 320
                    maxNumOfTablesPerColumnString: 5
                    scenarioAnalysisDefault: 1
                    dcacMinimum: 1
                    dcacMaximum: 2
                    dcacInterval: 1
                    gcrMinimum: 1
                    gcrMaximum: 2
                    gcrInterval: 1
                  devPlatformSitePlanSettings:
                    widthPerimeterRoad: 666
                    setbackFromSolarArrays: 7.1
                    setbackFromSiteBoundary: 1.1
                    widthInternalRoad: 4
                    setbackA: 7.1
                    setbackB: 2
                    setback: 2
                    widthLinearExclusion: 51
                    showLabels: false
      responses:
        '200':
          description: Updated
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  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.
    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.
  schemas:
    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
  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.

````