HomeGuidesAPI ReferenceChangelog
Log In
Guides

Optional: Set Up a Validation Example from Scratch

Create a controlled account, usage profile, solar profile, and Savings Analysis for validating savings calculations.

Set up a validation example from scratch when you do not already have a Savings Analysis to inspect.

Use this optional setup to create a controlled account, usage profile, solar production profile, and Savings Analysis. After you create the example, return to Step 1 of the validation workflow and use the generated inputs to validate the analysis.

Setup workflow

  1. Create an account for the validation exercise.
  2. Set the account utility and electricity tariff.
  3. Create a baseline consumption profile.
  4. Create a solar production profile.
  5. Run a Savings Analysis that uses both profiles.
  6. Use the response inputs in the validation workflow.

The examples on this page use example-1 as the account providerAccountId.

Create the account

Create a minimal account for the validation exercise:

POST /rest/v1/accounts
{
  "providerAccountId": "example-1"
}

Or include additional details, such as a name and ZIP code:

{
  "providerAccountId": "example-1",
  "accountName": "You can name the account with another string",
  "address": {
    "addressString": "94112"
  }
}

Set the utility and tariff

If the default utility is not correct, update it before setting the tariff. Then set the account's electricity tariff:

{
  "masterTariffId": 522,
  "serviceType": "ELECTRICITY"
}

You can update the tariff later with the same body sent as a PUT request.

Create a baseline consumption profile

Create a baseline consumption profile from scratch. This example uses a simple flat yearly load:

POST /rest/v1/profiles
{
  "providerAccountId": "example-1",
  "providerProfileId": "p1-annual-2023-2024",
  "profileName": "p1-annual-2023-2024",
  "description": "single flat annual bill 50k kWh",
  "isDefault": true,
  "serviceTypes": "ELECTRICITY",
  "sourceId": "ReadingEntry",
  "readingData": [
    {
      "fromDateTime": "2023-02-01",
      "toDateTime": "2024-02-01",
      "quantityUnit": "kWh",
      "quantityValue": "50000"
    }
  ]
}

Create a solar production profile

Use the same profiles endpoint to create the solar production profile, but set serviceTypes to SOLAR_PV and use solar production properties:

POST /rest/v1/profiles
{
  "providerAccountId": "example-1",
  "providerProfileId": "p2-annual-solar-2023-2024",
  "groupBy": "YEAR",
  "serviceTypes": "SOLAR_PV",
  "source": {
    "sourceId": "PVWatts",
    "sourceVersion": "5"
  },
  "properties": {
    "systemSize": {
      "keyName": "systemSize",
      "dataValue": "8"
    },
    "azimuth": {
      "keyName": "azimuth",
      "dataValue": "180"
    },
    "losses": {
      "keyName": "losses",
      "dataValue": "15"
    },
    "inverterEfficiency": {
      "keyName": "inverterEfficiency",
      "dataValue": "96"
    },
    "tilt": {
      "keyName": "tilt",
      "dataValue": "20"
    }
  }
}

Run the Savings Analysis

Run a Savings Analysis that uses the consumption and solar profiles. In this example, the pre-solar scenario uses p1-annual-2023-2024, and the post-solar scenario uses both p1-annual-2023-2024 and p2-annual-solar-2023-2024.

POST /rest/v1/accounts/analysis
{
  "providerAccountId": "example-1",
  "fromDateTime": "2023-07-01",
  "propertyInputs": [
    {
      "scenarios": "before,after",
      "keyName": "providerProfileId",
      "dataValue": "p1-annual-2023-2024",
      "dataFactor": 1
    },
    {
      "scenarios": "after,solar",
      "keyName": "providerProfileId",
      "dataValue": "p2-annual-solar-2023-2024",
      "dataFactor": 1
    },
    {
      "scenarios": "after",
      "keyName": "masterTariffId",
      "dataValue": "3424821"
    },
    {
      "scenarios": "before,after",
      "keyName": "rateInflation",
      "dataValue": "3.5"
    },
    {
      "scenarios": "solar",
      "keyName": "rateInflation",
      "dataValue": "1.9"
    },
    {
      "scenarios": "after,solar",
      "keyName": "solarDegradation",
      "dataValue": "1.5"
    }
  ],
  "rateInputs": [
    {
      "scenarios": "solar",
      "chargeType": "FIXED_PRICE",
      "rateBands": [
        {
          "rateAmount": 99.99
        }
      ]
    }
  ]
}

Save the response inputs

After the Savings Analysis succeeds, save the account, profile, tariff, and scenario inputs from the response. You will use these values in the validation workflow.

InputWhere to use it
Account identifierStep 1 and all Account Cost Calculation requests.
Consumption profile IDPre-solar and post-solar validation calculations.
Solar profile IDPost-solar validation calculations.
Pre-solar masterTariffIdBaseline cost validation.
Post-solar masterTariffIdPost-solar cost validation.
Scenario inputsReconciliation against the Savings Analysis response.

Next step

After you create the example, gather the Savings Analysis inputs and continue through the validation workflow.