HomeGuidesAPI ReferenceChangelog
Log In
API Reference

Profiles API

Use the Profiles API to store usage, demand, solar production, or modeled baseline data for an account.

Use the Profiles API to store usage, demand, solar production, or modeled baseline data for an account.

Profiles belong to an Account. A profile can contain bill data, interval readings, solar production data, or baseline measures used in account calculations and savings analyses. For the full profile workflow, see Profile APIs Overview.

Data definitions

Profile

Each profile has a unique profileId, which is a UUID generated by Arcadia when the profile is created. You can also use your own providerProfileId as an alternate key.

Each profile can include an optional name and description for organizing profiles. Profile names are not required and are not enforced as unique. Every profile must belong to an account, so accountId or providerAccountId is required when adding a profile.

NameTypeFieldsDescription
profileIdStringMUnique Arcadia ID (UUID) for this usage profile.
profileNameStringM(Optional) Your specified name for this usage profile.
accountIdStringMRequired accountId for this usage profile. This is useful for linking usage profiles to your own customer IDs.
descriptionString (Optional) Description for this usage profile.
serviceTypesString Comma-separated strings of the types of service this profile denotes. Current types include "ELECTRICITY" and "SOLAR_PV".
sourceSource (Optional) Source contains a sourceId and name (both strings). Uniquely identify the source of this profile, e.g. "PVWatts".
isDefaultBoolean Denotes whether this is the default profile for the service type. Default profiles are used for calculations when no profile is specified.
propertiesArray of PropertyData Our standard collection of PropertyData denoting properties specific to this Profile.
dataStatusInteger Read-only value that Arcadia maintains to show how up-to-date the profile number crunching is. 1=processing, 2=done, 3=error (we auto-fix 3).
dataFactorDecimalMultiplier applied to the readings or baseline values in the profile (e.g. 0.95 = 95%). 
readingDataSummariesArray of ReadingDataSummary See below for details of ReadingDataSummary.
intervalsArray of IntervalInfo Data See below for details of IntervalInfo.
readingDataArray of ReadingData See below for details of ReadingData.
baselineMeasuresArray of BaselineMeasure (Optional) For estimated solar production, your profile doesn't necessarily have to correspond to a particular year. You can use this field to input an array of generic datapoints corresponding to the hours of a year rather than specific dates.

Source ID options

When uploading a usage profile, you usually do not need to construct a full Source object. Set the sourceId property instead. Choose one of these sourceId values based on the profile data source:

NameDescription
ReadingEntryWhen uploading any kind of usage data through the profile endpoint, you should use ReadingEntry.
PVWattsIf you want to have the integrated PVWatts engine create a solar profile for you, use a sourceId of PVWatts. This will default to PVWatts v6. If you want to use v5, you'll need to create a full Source object. See below for an example.
SolarPvModelIf you have any other kind of solar simulation data that you want to upload through the profile endpoint, use SolarPvModel. If you have PVSyst or Helioscope CSVs, you can also use the File Uploader.

Reading data summary

The profile has one ReadingDataSummary object for each data series. A series is identified by a unique quantityUnit. These summaries are read-only. Switch creates and updates them as you add and update profile reading data.

Use reading data summaries to inspect the number of readings and the start and end dates for each data series in a profile.

NameTypeDescription
quantityUnitStringDenotes the series for which this summary applies.
numberOfReadingsLongThe number of Reading Data elements within this series.
firstStartTimeDateTimeDate and time of the earliest reading in the series.
lastEndTimeDateTimeDate and time of the last reading in the series.

Reading data

ReadingData objects contain the point-in-time or interval readings for a usage profile. A usage profile can contain hundreds or thousands of reading data elements.

For the best accuracy, use 15-minute reading data, especially for commercial and industrial accounts. For residential accounts, hourly readings (8,760 values for a standard year) are accurate for most tariffs.

Each reading has a quantityUnit field that identifies what the reading measures and which data series it belongs to. The most common quantityUnit values are:

  • consumption (kWh) / demand (kW)
  • apparent power: kVA and kVAh
  • reactive power: kVAR and kVARh

When these quantity units appear in a usage profile, they will be used for calculating electricity cost in a cost calculation or a savings analysis when a tariff has charges denominated in those units. Other quantity units like temperature or occupancy can be used as reading data, but they will not be referenced in calculations.

NameTypeDescription
keyNameStringThe type of data this reading represents. Typically consumption.
fromDateTimeDateTimeDate and time this reading starts.
toDateTimeDateTimeDate and time this reading ends.
durationDecimalLength of this interval.
timeAccuracyIntegerValue representing the accuracy, in ms, of the time reading.
quantityUnitStringUnit of this reading. Typically kWh.
quantityValueDecimalValue of this reading, e.g. the number of kWh.
quantityAccuracyDecimalIndicator of the accuracy of the reading in the same units as the quantityValue.
touTypeStringEither OFF_PEAKPARTIAL_PEAKON_PEAK, or CRITICAL_PEAK. Used for uploading TOU-based energy consumption data. Make sure to read the how-to for more details on uploading TOU usage data.

Interval info

The intervals property holds an array of IntervalInfo objects. Each object represents costs, rates, and quantities for a fixed period of time.

Arcadia generates interval data as normalized cost and usage data for a uniform time span, such as every hour, day, month, or year. Do not pass interval data in profile requests.

This example shows returned interval data:


## Next steps

1. Return to [Profile APIs Overview](/reference/profile-api) to choose another profile workflow.
2. Use [Storage Profiles API](/reference/storage-profile-api) to model battery storage behavior and generate post-storage profiles.
3. Use [Account Cost Calculation](/reference/account-cost-calculation) or [Analysis APIs](/reference/analysis-apis-1) with profile data to calculate costs or savings.json
{
    "fromDateTime": "2012-04-01T00:00:00+00:00",
    "toDateTime": "2012-04-01T01:00:00+00:00",
    "duration": 3600000,
    "kWh": {
        "quantityAmount": 100,
        "rateAmount": 0.14,
        "costAmount": 1.4
    },
    "kW": {
        "quantityAmount": 10,
        "rateAmount": 0.25,
        "costAmount": 2.5
    },
    "total": {
        "quantityAmount": 100,
        "rateAmount": 0.39,
        "costAmount": 3.9
    }
}

Get Profiles

Query all usage profiles or profiles that match specific criteria. Common searches filter by accountId or serviceType.

Resource URI

GET /rest/v1/profiles

Request parameters


NameTypeDescription
accountIdStringFilter all the Profiles for a specific account. (Optional)
profileNameStringFilter all the Profiles that match a given name. (Optional)
serviceTypesStringComma-separated string of service types to filter by. Possible values include: ELECTRICITY, SOLAR_PV (or solarPv). This is case insensitive. (Optional)
isDefaultBooleanOnly return the profiles that are defaults (true) or not defaults (false). (Optional)
asTariffTimezoneBooleanDefaults to false. When true and account tariff is set, returns profile readings and intervals in the tariff's timezone. If true and account tariff is not set, the profile will return in UTC. If false, the profile will be returned in an internal DST-aware UTC variant timezone.

Example

GET /rest/v1/profiles?accountId=abc123

Below is a sample response containing the usage profiles for a given account.

{
    "status": "success",
    "count": 2,
    "type": "UsageProfile",
    "results": [
    {
        "profileId": "d89edf61-318c-44a3-b894-b6d1af44fbf9",
        "profileName": "Residential-Columbus Southern ",
        "accountId": "3473559f-4e4d-4e82-be51-e6c1dc6663aa",
        "serviceTypes": "ELECTRICITY",
        "dataStatus": 2,
        "readingDataSummaries": [
        {
            "quantityUnit": "kWh",
            "fromDateTime": "2011-01-01T00:00:00+00:00",
            "toDateTime": "2011-12-31T23:00:00+00:00",
            "numberOfReadings": 8760
        }]
    },
    {
        "profileId": "db34897e-1feb-4249-8512-219842398132",
        "profileName": "Atl SM OF",
        "accountId": "3473559f-4e4d-4e82-be51-e6c1dc6663aa",
        "serviceTypes": "ELECTRICITY",
        "dataStatus": 2,
        "readingDataSummaries": [
        {
            "quantityUnit": "kWh",
            "fromDateTime": "2011-01-01T00:00:00+00:00",
            "toDateTime": "2011-12-31T23:00:00+00:00",
            "numberOfReadings": 8760
        }]
    }
  ]
}

Get One Profile With or Without Intervals or Readings

Retrieve a specific usage profile with or without intervals, readings, or baseline measures.

Resource URI

GET /rest/v1/profiles/{profileId}
GET /rest/v1/profiles/pid/{providerProfileId}

Request Parameters

Along with the required authentication parameters and the profileId or providerProfileId, the following parameters are available as part of the request:

NameTypeDescription
groupByStringThe groupBy value denotes what duration of interval data to return (or group by). When this field is not set, the intervals are not returned. When set, the possible values are: "YEAR""MONTH""DAY""HOUR""QTRHOUR". (Optional)
clipByStringclipBy is optional and should only be set when groupBy (above) is set. clipBy allows you to control the behavior in the case where groupBy and the requested date range do not line up exactly. Possible values are: "OUTER""INNER". For example, you request interval data and specify groupBy=MONTH with a date range of April 15, 2012 through June 15, 2012, OUTER will include all months that overlap at least part of the requested range, and the response will include the months of April, May and June. INNER will only include the full months within the requested range, so only May is returned. When you pass in a groupBy but do not specify clipBy, INNER is used. (Optional)
populateReadingsBooleanWhen true, the results will contain Reading Data. The default is false. Reading Data Summaries are always returned when getting a Usage Profile independent of the value of this flag. (Optional). NOTE: This used to be called populateReadingData, which has been deprecated but still works (for now).
populateBaselineBooleanWhen true, the results will contain an array of Baseline Measures. Only applies for profiles that were uploaded with them. See below for when and how to do this.
populateIntervalsBooleanWhen true, the results will contain Interval values. The default is false. NOTE: This must be used in concert with the groupBy parameter.
fromDateTimeDateTimeStart date (with or without a time) of the date range to return intervals and/or readings for. (Optional)
toDateTimeDateTimeEnd date (with or without a time) of the date range to return intervals and/or readings for. (Optional)
autoBaselineBooleanThis field enables the intelligent baselining feature, which allows you to move usage data to a different time period. (Optional, Default=false). When you set this field to true, also set the fromDateTime and toDateTime to the range you want to move usage data to.
useIntelligentBaseliningBooleanThis field works in conjunction with autoBaseline (above) and determines how to interpolate and extrapolate usage data when that is set to true. Read intelligent baselining for details.
fieldsStringTo just get the dataStatus field, pass in "dataStatus" (good for polling whether the number crunching is complete). Otherwise ignore this field. (Optional)

Example 1: No intervals or readings

To get the profile without intervals or readings, omit query string arguments:

GET /rest/v1/profiles/b7559f37-8020-4969-8bd1-48d8c3d58976
GET /rest/v1/profiles/pid/ELECTRICITY_RESIDENTIAL_CA_2012

Either one of the above URLs will return the following:

{
  "status": "success",
   "count": 1,
   "type": "UsageProfile",
   "results": [
      {
         "profileId": "b7559f37-8020-4969-8bd1-48d8c3d58976",
         "providerProfileId": "ELECTRICITY_RESIDENTIAL_CA_2012",
         "profileName": "2012 CA Electricity Residential Profile",
         "accountId": "4b1dd606-a72a-46b2-8c12-34db20be69fa",
         "description": "Residential Electricity Profile",
         "serviceTypes": "ELECTRICITY",
         "source": {
            "sourceId": "ReadingEntry",
            "name": "Readings"
         },
         "isDefault": true,
         "dataStatus": 2,
         "properties": null,
         "readingDataSummaries": [
            {
               "quantityUnit": "kWh",
               "fromDateTime": "2012-01-01T00:00:00+00:00",
               "toDateTime": "2013-01-01T00:00:00+00:00",
               "numberOfReadings": 12
            }
         ]
      }
   ]
}

Example 2: Data status

To check a profile's data status, add the fields parameter with a value of dataStatus. Use this field when polling for asynchronous processing completion.

GET /rest/v1/profiles/180a0e07-c5bc-4f7e-8e01-34794f0d99a7?fields=dataStatus
{
  "status": "success",
   "count": 1,
   "type": "UsageProfile",
   "results": [
      {
         "profileId": "b7559f37-8020-4969-8bd1-48d8c3d58976",
         "providerProfileId": "ELECTRICITY_RESIDENTIAL_CA_2012",
         "dataStatus": 2
      }
   ]
}

Example 3: Get interval data

To get a profile with interval data, use the groupBy argument and set populateIntervals=true. You can also specify a date range, pagination, and other supported parameters.

This abbreviated example returns intervals grouped by MONTH:

GET /rest/v1/profiles/b7559f37-8020-4969-8bd1-48d8c3d58976?populateIntervals=true&groupBy=MONTH
GET /rest/v1/profiles/pid/ELECTRICITY_RESIDENTIAL_CA_2012?populateIntervals=true&groupBy=MONTH
{
  "status": "success",
   "count": 1,
   "type": "UsageProfile",
   "results": [
      {
         "profileId": "b7559f37-8020-4969-8bd1-48d8c3d58976",
         "providerProfileId": "ELECTRICITY_RESIDENTIAL_CA_2012",
         "profileName": "2012 CA Electricity Residential Profile",
         "accountId": "4b1dd606-a72a-46b2-8c12-34db20be69fa",
         "description": "Residential Electricity Profile",
         "serviceTypes": "ELECTRICITY",
         "source": {
            "sourceId": "ReadingEntry",
            "name": "Readings"
         },
         "isDefault": true,
         "dataStatus": 2,
         "properties": null,
         "readingDataSummaries": [
            {
               "quantityUnit": "kWh",
               "fromDateTime": "2012-01-01T00:00:00+00:00",
               "toDateTime": "2013-01-01T00:00:00+00:00",
               "numberOfReadings": 12
            }
         ],
         "readings": {
            "totalCount": 12,
            "pageCount": 0,
            "pageStart": 0
         },
         "intervals": {
            "totalCount": 12,
            "pageCount": 25,
            "pageStart": 0,
            "list": [
               {
                  "fromDateTime": "2012-01-01T00:00:00+00:00",
                  "toDateTime": "2012-02-01T00:00:00+00:00",
                  "duration": 2678400000,
                  "kWh": {
                     "quantityAmount": 699.9998,
                     "rateAmount": 0
                  },
                  "kW": {
                     "quantityAmount": 0.94086,
                     "rateAmount": 0
                  }
               },

			   /* edited for length */

               {
                  "fromDateTime": "2012-12-01T00:00:00+00:00",
                  "toDateTime": "2013-01-01T00:00:00+00:00",
                  "duration": 2678400000,
                  "kWh": {
                     "quantityAmount": 699.9998,
                     "rateAmount": 0
                  },
                  "kW": {
                     "quantityAmount": 0.94086,
                     "rateAmount": 0
                  }
               }
            ]
         }
      }
   ]
}

Add a Profile

Usage profiles are tied to an account, so include an accountId or providerAccountId when adding a profile. Most other fields are optional.

You can create a shell profile and add readings later, or create the profile with readings and other profile data in the same request.

lightbulb

The Add or Update Profile endpoint can perform upserts. If you use a unique providerProfileId, you can use PUT to create the profile if it does not exist or update it if it already exists.

Resource URI

POST /rest/v1/profiles

Examples

This example adds a profile without readings. The profileName, description, and providerProfileId fields are optional, but providerProfileId must be unique if supplied. The profile's serviceTypes value defaults to ELECTRICITY if not passed. You can also set serviceTypes to SOLAR_PV.

If this is the account's first ELECTRICITY profile, isDefault is set to true. You do not need to pass bills or reading data when creating the profile.

{
     "providerProfileId": "ELECTRICITY_RESIDENTIAL_CA_2012",
     "profileName": "2012 CA Electricity Residential Profile",
     "accountId": "4b1dd606-a72a-46b2-8c12-34db20be69fa"
}

The response will contain the newly created profile's ID, which you can then use to retrieve or update the profile later.

{
  "status": "success",
   "count": 1,
   "type": "UsageProfile",
   "results": [
      {
         "profileId": "b7559f37-8020-4969-8bd1-48d8c3d58976",
         "providerProfileId": "ELECTRICITY_RESIDENTIAL_CA_2012",
         "profileName": "2012 CA Electricity Residential Profile",
         "accountId": "4b1dd606-a72a-46b2-8c12-34db20be69fa",
         "serviceTypes": "ELECTRICITY",
         "properties": null
      }
   ]
}

Example 1 - Update a Profile

You can update most of the fields on an existing profile using this method. It will only update the fields you have passed in. For instance, if the profile already has a description saved in the database and you do not pass it in, it will remain unchanged.

If you pass in a usage reading for a time frame that already exists on the profile, the usage will be overwritten. Conversely, if you pass in readings for additional time periods, they will be added to the profile along with any existing usage readings. Making a PUT request to the profile with readings for time periods that do not already exist in the profile will not overwrite the existing usage readings on the profile.

If you use your own unique providerProfileId, you can also use this method to create a new profile with that ID. This will let you avoid having to track the Arcadia-created profileId for your profile.

Resource URI

PUT /rest/v1/profiles

Example 2 - Upsert of Monthly Electricity Readings Profile

This example will add a new profile (if one with this providerProfileId doesn't exist) and at the same time add the readings included in the request.

{
  "providerAccountId" : "api-eg-008",
  "providerProfileId" : "RESIDENTIAL_CA_ELECTRICITY_2012",
  "profileName" : "2012 CA Electricity Residential Profile",
  "description" : "Residential Electricity Profile",
  "isDefault" : true,
  "serviceTypes" : "ELECTRICITY",
  "sourceId" : "ReadingEntry",
  "readingData" : [
      { "fromDateTime" : "2012-01-01",
        "quantityUnit" : "kWh",
        "quantityValue" : "700",
        "toDateTime" : "2012-02-01"
      },

	  /* edited for length */

      { "fromDateTime" : "2012-12-01",
        "quantityUnit" : "kWh",
        "quantityValue" : "700",
        "toDateTime" : "2013-01-01"
      }
    ]
}

The above call returns the following response.

{
  "status": "success",
   "count": 1,
   "type": "UsageProfile",
   "results": [
      {
         "profileId": "a860df08-31cb-4dd8-961d-523429bf5420",
         "providerProfileId": "RESIDENTIAL_CA_ELECTRICITY_2012",
         "profileName": "2012 CA Electricity Residential Profile",
         "accountId": "4b1dd606-a72a-46b2-8c12-34db20be69fa",
         "description": "Residential Electricity Profile",
         "serviceTypes": "ELECTRICITY",
         "source": {
            "sourceId": "ReadingEntry",
            "name": "Readings"
         },
         "isDefault": true,
         "properties": null
      }
   ]
}

Example 3 - "Upsert" Solar Production Profile with Readings

This methodology is recommended for actual solar production only. If you're uploading data estimated with PVSyst, Helioscope, or any other tool, we recommend that you use BaselineMeasures instead.

This example will add a new profile (if one with this providerProfileId doesn't exist) that is for a service type of SOLAR_PV rather than ELECTRICITY. It also includes monthly production numbers. If you have hourly, daily, or some other variant, you just change your reading date ranges.

In addition, in this example, we pass the systemSize property (in kW). Including this information on your solar profile allows any charges based on the solar system size to be automatically calculated when the solar profile is referenced in a Savings Analysis.

{
  "providerAccountId" : "api-eg-008",
  "providerProfileId" : "SOLAR_RESIDENTIAL_CA_2012",
  "profileName" : "2012 CA Solar Residential Profile",
  "description" : "Residential Solar Profile",
  "serviceTypes" : "SOLAR_PV",
  "sourceId" : "ReadingEntry",
  "properties" : {
   "systemSize" : {
     "keyName" : "systemSize",
     "dataValue" : "5"
   }},
  "readingData" : [
      { "fromDateTime" : "2012-01-01",
        "quantityUnit" : "kWh",
        "quantityValue" : "225",
        "toDateTime" : "2012-02-01"
      },

	  /* edited for length */

      { "fromDateTime" : "2012-12-01",
        "quantityUnit" : "kWh",
        "quantityValue" : "236",
        "toDateTime" : "2013-01-01"
      }
    ]
}

The above call returns the following response.

{
  "status": "success",
   "count": 1,
   "type": "UsageProfile",
   "results": [
      {
         "profileId": "3f631a21-9fdd-4daf-a130-02dde375d598",
         "providerProfileId": "SOLAR_RESIDENTIAL_CA_2012",
         "profileName": "2012 CA Solar Residential Profile",
         "accountId": "4b1dd606-a72a-46b2-8c12-34db20be69fa",
         "description": "Residential Solar Profile",
         "serviceTypes": "SOLAR_PV",
         "source": {
            "sourceId": "ReadingEntry",
            "name": "Readings"
         },
         "properties": null
      }
   ]
}

Example 4 - Generate a solar production profile using integrated PVWatts

You can use the integrated PVWatts model to upload a solar profile directly. To use it, set source.sourceId to PVWatts. Switch supports PVWatts versions 5 and 6. To choose between them, set source.sourceVersion to 5 or 6.

The following parameters are available for PVWatts requests:

NameTypeDescription

systemSize

Decimal

The desired system size in kW. Must be between 0.05 and 500,000 kW.

moduleType

Integer

The type of module to use. 0 = Standard, 1 = Premium, 2 = Thin Film.

azimuth

Integer

The azimuth of the array. 0 = Due north, 180 = Due south. Must be between 0 and 359.

tilt

Integer

The tilt of the array. 0 = Flat, 90 = Vertical. Must be between 0 and 90.

losses

Decimal

Losses in the system other than from the inverter. Must be between -5 and 99. 0 = no power lost, 99 = 1% of power remaining.

inverterEfficiency

Decimal

The efficiency of your inverter. Must be between 90 and 99.5. 90 = 10% of power lost, 99.5 = 0.5% of power lost. Default: 96.

trackMode

Integer

The array type and tracking mode.
0 = Fixed - Roof Mounted
1 = Single Axis Backtracking
2 = Double Axis
3 = Fixed - Open Rack
4 = Single Axis

DCACRatio

Decimal

The ratio of the array’s DC rated size to the inverter’s AC rated size. Must be positive. PVWatts v6 and v8 default: 1.2.

gcr

Decimal

Ground coverage ratio applies only to arrays with single-axis tracking, and is the ratio of module surface area to the ground or roof occupied by the array. Must be between 0 and 3. Default: 0.4.

climateDataset

String

The climate data set that you want to use. Valid options are “nsrdb”, “tmy2”, “tmy3”, and “intl”. PVWatts v6 and v8 default: nsrdb

climateDataCorrectionZone

String

For Hawaii Sun Zones, the zone applicable to this analysis. Available values are 200-250, 251-300, and so on up to 601-650. Note that the correction factor will only be used if it applies to the location of the account and the climate dataset that you specify. For example, a value of 601-650 would be applicable and used for Honolulu but would not be used for a system in Los Angeles.

climateDataFileId

String

Reference to a specific climate data file to use. Must be a valid ID returned by the PVWatts Solar Dataset Query API.

climateDataSearchRadius

Integer

The search radius to use when searching for the closest climate data station (miles). Pass in radius = 0 to use the closest station regardless of the distance. Default: 100.

bifaciality

Decimal

The ratio of rear-side efficiency to front-side efficiency. Typically a value between 0.65 and 0.9 provided on the bifacial module datasheet. This is to account for the fact that photovoltaic cells on the rear of the module are usually less efficient than the cells on the front of the module. The bifaciality does not affect the solar irradiance on the rear of the module. Must be between 0 and 1.

albedo

Comma-separated String

“Ground reflectance. A value of 0 would mean that the ground is completely non-reflective, and a value of 1 would mean that it is completely reflective.” Specify a comma-separated string (one or twelve values). Must be between >0 and <1.

useWeatherFileAlbedo

Integer

“Use hourly or sub-hourly albedo data from the weather file instead of the monthly albedo values, if available. 0 means do not use weather file albedo values, 1 means use weather file albedo values.”

soiling

Comma-separated String

“Reduction in incident solar irradiance caused by dust or other seasonal soiling of the module surface that reduces the radiation incident on the subarray. Soiling losses cause a uniform reduction in the total irradiance incident on each subarray.” Specify a comma-separated string of 12 monthly values. Must be between 0 and 100.


This example creates a new profile if one with this providerProfileId does not exist and loads it with data from the integrated NREL PVWatts solar production model. The request passes model parameters such as azimuth, tilt, losses, and inverter efficiency.

The account must have a valid address because Switch uses latitude and longitude to look up the location's solar irradiance.

{
  "providerAccountId" : "api-eg-08",
  "providerProfileId" : "PVWATTS_RESIDENTIAL_FL_2018",
  "serviceTypes" : "SOLAR_PV",
  "sourceId" : "PVWatts",
  "properties" : {
    "systemSize" : {
      "keyName" : "systemSize",
      "dataValue" : "8.25"
    },
    "azimuth" : {
      "keyName" : "azimuth",
      "dataValue" : "170"
    },
    "tilt" : {
      "keyName" : "tilt",
      "dataValue" : "17"
    },
    "losses" : {
      "keyName" : "losses",
      "dataValue" : "14"
    },
    "inverterEfficiency" : {
      "keyName" : "inverterEfficiency",
      "dataValue" : "96"
    }
  }
}

The request runs PVWatts and saves the results in a baseline profile.

Example 5 - Upload a solar profile with BaselineMeasure data

Use baseline measures for modeled solar production. If you are uploading actual production data, use readings instead.

Estimated solar production data does not usually correspond to the days of a specific year. Instead, the estimate for "January 1, 2012" represents expected production for the first day of any year. To model this, upload a profile with a series of BaselineMeasure objects instead of ReadingData. Each BaselineMeasure object corresponds to one hour of a generic year, so a full year of solar data has 8,760 data points.

In addition, in this example, we pass the systemSize property (in kW). Including this information on your solar profile allows any charges based on the solar system size to be automatically calculated when the solar profile is referenced in a Savings Analysis.

To upload a solar profile with baseline measures, you can use the same URL that you do when uploading a normal profile:

PUT /rest/v1/profiles

The request body, however, will be a little bit different:

{
  "providerAccountId" : "api-eg-01",
  "providerProfileId" : "eg-BaselineMeasures",
  "serviceTypes" : "SOLAR_PV",
  "sourceId": "SolarPvModel",
   "properties" : {
   "systemSize" : {
     "keyName" : "systemSize",
     "dataValue" : "5"
   }},
  "baselineMeasures": [
      {
          "i":1,
          "v":10
      },
      {
          "i":2,
          "v":20
      },

      /* edited for length */

      {
          "i":8759,
          "v":20
      },
      {
          "i":8760,
          "v":10
      }]
}

This profile differs from a readings-based profile in two ways. First, sourceId is set to SolarPvModel, which tells the API that the profile uses baselineMeasures instead of readingData. Second, the baselineMeasures property contains the measurements. Each measure has i, which denotes where the measurement appears in the sequence, and v, which denotes the measurement value.

After the profile is uploaded, you can use it like a normal solar profile when calculating customer savings.

To retrieve baseline measurements, add the populateBaseline parameter to your Get Usage Profile request and set it to true:

GET /rest/v1/profiles/pid/eg-BaselineMeasures?populateBaseline=true

Example 6 - Delete a Profile

You can delete a usage profile at any time. Use HTTP DELETE with the profile ID in the URL. Profile deletion is a hard delete, and the profile data is permanently removed.

Resource URI

DELETE /rest/v1/profiles/{profileId}
DELETE /rest/v1/profiles/pid/{providerProfileId}

Example 7 - Add or Update Readings

When adding a new set of readings, send a POST request. To update existing readings, send a PUT request. Both methods accept the same request body structure and return the same response body.

Resource URI

POST /rest/v1/profiles/{profileId}/readings
PUT /rest/v1/profiles/{profileId}/readings

POST /rest/v1/profiles/pid/{providerProfileId}/readings
PUT /rest/v1/profiles/pid/{providerProfileId}/readings

Request payload

The request requires authentication. The request body contains the usageProfileId to add readings to and an array of one or more readings. Readings use the ReadingData object. The following fields are required or common for each reading:

NameTypeDescription
fromDateTimeDateTimeStart date and time of this reading. (Optional but typical)
toDateTimeDateTimeEnd date and time of this reading. (Required)
quantityUnitStringThe unit of the reading, e.g. kWh. (Required)
quantityValueDecimalThe actual quantity of the reading. (Required)

Make sure the Content-Type of the body is application/json.

Example POST Request

POST /rest/v1/profiles/e494b54e-430e-4b1b-833b-8783e21eae56/readings

Below is a sample POST body that adds individual reading data items to a usage profile with ID e494b54e-430e-4b1b-833b-8783e21eae56.

{
  "usageProfileId": "e494b54e-430e-4b1b-833b-8783e21eae56",
  "readings" : [ {
    "fromDateTime" : "2011-08-01T22:30:00.000-0700",
    "toDateTime" : "2011-08-01T22:45:00.000-0700",
    "quantityUnit" : "kWh",
    "quantityValue" : 220
  } ]
}