Energy Site Management

The service offers a set of site management operations on the EnergySites endpoint. This method allows the client to generate a list of the sites associated with their license, request detailed information about specific solar sites, and set a site’s attributes or specifications. The response to each request depends on the specific operation. The response can be a single EnergySiteId, a list of EnergySiteIds or a full site specification.

EnergySite Operations

Create a solar energy site under your license using the EnergySites service endpoint. This will return an EnergySiteId. The python request payload is in JSON format and should be submitted as a string as opposed to a dictionary. Visit EnergySiteCreateRequest for more energy site payload examples.

import requests

url = "https://service.solaranywhere.com/api/v2/EnergySites"
apiKey = "your_api_key"


payload = """{
  "EnergySite": {
    "Name": "Sample Residential Site - Lisbon",
    "Description": "Sample Residential Site",
    "Location": {
      "Latitude": 38.725,
      "Longitude": -9.155
    },
    "PvSystems": [
      {
        "Albedo_Percent": 17,
        "GeneralDerate_Percent": 85.00,
        "Inverters": [
          {
            "Count": 1,
            "MaxPowerOutputAC_kW": 4.470000,
            "EfficiencyRating_Percent": 97.000000
          }
        ],
        "PvArrays": [
          {
            "PvModules": [
              {
                "Count": 20,
                "NameplateDCRating_kW": 0.22000,
                "PtcRating_kW": 0.19760,
                "PowerTemperatureCoefficient_PercentPerDegreeC": 0.4             
              }
            ],
            "ArrayConfiguration": {
              "Azimuth_Degrees": 180.000,
              "Tilt_Degrees": 34.65,
              "Tracking": "Fixed",
              "TrackingRotationLimit_Degrees": 90,
              "ModuleRowCount": 1,
              "RelativeRowSpacing": 3
            },
            "SolarObstructions": [
              {
                "Azimuth_Degrees": 90.000,
                "Elevation_Degrees": 33.000,
                "Opacity_Percent": 80.0
              },
              {
                "Azimuth_Degrees": 120.000,
                "Elevation_Degrees": 50.000,
                "Opacity_Percent": 100.0
              },
              {
                "Azimuth_Degrees": 150.000,
                "Elevation_Degrees": 22.000,
                "Opacity_Percent": 100.0
              },
              {
                "Azimuth_Degrees": 180.000,
                "Elevation_Degrees": 3.000,
                "Opacity_Percent": 100.0
              },
              {
                "Azimuth_Degrees": 210.000,
                "Elevation_Degrees": 1.000,
                "Opacity_Percent": 100.0
              },
              {
                "Azimuth_Degrees": 240.000,
                "Elevation_Degrees": 2.000,
                "Opacity_Percent": 100.0
              },
              {
                "Azimuth_Degrees": 270.000,
                "Elevation_Degrees": 4.000,
                "Opacity_Percent": 70.0
              }
            ]          
          }
        ]
      }
    ]
  }
}"""

headers = {
 'content-type': "application/json;charset=utf-8",
 'X-Api-Key': apiKey, 
 'Accept': "application/json"
 }

response = requests.post(url,data=payload,headers=headers)

print(response.text)
import requests

url = "https://service.solaranywhere.com/api/v2/EnergySites"
apiKey = "your_api_key"


payload = """{
  "EnergySite": {
    "Name": "Sample Site - Lisbon",
    "Description": "Basic Fixed Tilt Commercial Scale System",
    "Location": {
      "Latitude": 38.725,
      "Longitude": -9.155
    },
    "PvSystems": [
      {
        "GeneralDerate_Percent": 86.00,
        "Inverters": [
          {
            "Count": 3,
            "MaxPowerOutputAC_kW": 166.7,
            "EfficiencyRating_Percent": 97.000000
          }
        ],
        "PvArrays": [
          {
            "PvModules": [
              {
                "Count": 1515,
                "NameplateDCRating_kW": 0.33,
                "PtcRating_kW": 0.3054,
                "PowerTemperatureCoefficient_PercentPerDegreeC": 0.4
              }
            ],
            "ArrayConfiguration": {
              "Azimuth_Degrees": 180.000,
              "Tilt_Degrees": 34.65,
              "Tracking": "Fixed",
              "TrackingRotationLimit_Degrees": 60,
              "ModuleRowCount": 4
            }
          }
        ]
      }
    ]
  }
}"""

headers = {
 'content-type': "application/json;charset=utf-8",
 'X-Api-Key': apiKey, 
 'Accept': "application/json"
 }

response = requests.post(url,
           data=payload,headers=headers)

print(response.text)
import requests

url = "https://service.solaranywhere.com/api/v2/EnergySites"
apiKey = "your_api_key"

payload = """{
  "EnergySite": {
    "Name": "Sample Site - Lisbon",
    "Description": "Basic Single-Axis Tracking with Backtracking Utility Scale PV System",
    "Location": {
      "Latitude": 38.725,
      "Longitude": -9.155
    },
    "PvSystems": [
      {
        "GeneralDerate_Percent": 86.00,
        "Inverters": [
          {
            "Count": 10,
            "MaxPowerOutputAC_kW": 4166.67,
            "EfficiencyRating_Percent": 97.000000
          }
        ],
        "PvArrays": [
          {
            "PvModules": [
              {
                "Count": 83333,
                "NameplateDCRating_kW": 0.50,
                "PtcRating_kW": 0.482,
                "PowerTemperatureCoefficient_PercentPerDegreeC": 0.4               
              }
            ],
            "ArrayConfiguration": {
              "Azimuth_Degrees": 180.000,
              "Tilt_Degrees": 0.00,
              "Tracking": "SingleAxisWithBacktracking",
              "TrackingRotationLimit_Degrees": 60,
              "ModuleRowCount": 25,
              "RelativeRowSpacing": 3
            }           
          }
        ]
      }
    ]
  }
}"""

headers = {
 'content-type': "application/json;charset=utf-8",
 'X-Api-Key': apiKey, 
 'Accept': "application/json"
 }

response = requests.post(url,data=payload,headers=headers)

print(response.text)
import requests

url = "https://service.solaranywhere.com/api/v2/EnergySites"
apiKey = "your_api_key"

payload = """{
  "EnergySite": {
    "Name": "Sample Site - Lisbon",
    "Description": "Single-Axis Backtracking Utility Scale PV System with Bifacial Modules",
    "Location": {
      "Latitude": 38.725,
      "Longitude": -9.155
    },
    "PvSystems": [
      {
        "GeneralDerate_Percent": 86.00,
        "Bifacial": true,
        "Inverters": [
        {
          "Count": 10,
          "MaxPowerOutputAC_kW": 4166.67,
          "EfficiencyRating_Percent": 97.000000
        }
      ],
        "PvArrays": [
          {
            "PvModules": [
              {
                "Count": 83333,
                "NameplateDCRating_kW": 0.50,
                "PtcRating_kW": 0.482,
                "PowerTemperatureCoefficient_PercentPerDegreeC": 0.4
              }
            ],
            "ArrayConfiguration": {
              "Azimuth_Degrees": 180.000,
              "Tilt_Degrees": 0.00,
              "Tracking": "SingleAxisWithBacktracking",
              "TrackingRotationLimit_Degrees": 60,
              "ModuleRowCount": 25,
              "RelativeRowSpacing": 3
              "RowHeight_Meters": 1,
              "Pitch_Meters": 10,
              "BifacialityFactor_Unitless": 0.65,
              "TransmissionFactor_Unitless": -0.013,
              "ShadeFactor_Unitless": -0.02
            }
          }
        ]
      }
    ]
  }
}"""

headers = {
  'content-type': "application/json;charset=utf-8",
  'X-Api-Key': apiKey,
  'Accept': "application/json"
}

response = requests.post(url,data=payload,headers=headers)

print(response.text)

Here is an example of the EnergySiteCreateResponse XML returned by an EnergySiteCreateRequest. The response will contain a unique EnergySiteId that the client can then use to reference the specific site when updating the energy site, requesting the details for the energy site, or requesting simulated PV output.

{
    "RequestId": "7123273Q3",
    "EnergySiteId": "3DTW29DEV4"
}

Update a solar energy site using the EnergySiteId, providing updated site specifications.

import requests

url = "https://service.solaranywhere.com/api/v2/EnergySites/"
apiKey = "your_api_key"
EnergySiteId = "your_site_id"

payload = """{
  "EnergySite": {
    "Name": "Sample Site - El Paso",
    "Description": "Basic single-axis tracking with backtracking utility-scale PV system",
    "Location": {
      "Latitude": 31.775,
      "Longitude": -106.485
    },
    "PvSystems": [
      {
        "Albedo_Percent": 17,
        "GeneralDerate_Percent": 86.00,
        "Inverters": [
          {
            "Count": 20,
            "MaxPowerOutputAC_kW": 4166.7,
            "EfficiencyRating_Percent": 97.000000
          }
        ],
        "PvArrays": [
          {
            "PvModules": [
              {
                "Count": 253530,
                "NameplateDCRating_kW": 0.33,
                "PtcRating_kW": 0.3054,
                "PowerTemperatureCoefficient_PercentPerDegreeC": 0.4
              }
            ],
            "ArrayConfiguration": {
              "Azimuth_Degrees": 180.000,
              "Tilt_Degrees": 0.00,
              "Tracking": "SingleAxisWithBacktracking",
              "TrackingRotationLimit_Degrees": 60,
              "ModuleRowCount": 25,
              "RelativeRowSpacing": 3
            }
          }
        ]
      }
    ]
  }
}"""

headers = {
 'content-type': "application/json;charset=utf-8",
 'X-Api-Key': apiKey, 
 'Accept': "application/json"
 }

response = requests.post(url + EnergySiteId,
data=payload,headers=headers)

print(response.text)

Request the list of solar energy sites assigned to your license.

If there are over 1000 energy sites in your license, you will need to break up the response into multiple pages. To break up the response, specify the number of EnergySiteIds you would like to see per page (PageSize) and the page number (PageIndex) in the URL: https://service.solaranywhere.com/api/v2/EnergySites?PageSize={pageSize}&PageIndex={pageIndex}.

import requests

url = "https://service.solaranywhere.com/api/v2/EnergySites"
apiKey = "your_api_key"

headers = {
 'content-type': "application/json;charset=utf-8",
 'X-Api-Key': apiKey, 
 'Accept': "application/json"
 }

response = requests.get(url, headers=headers)

print(response.text)

Request the specifications for an existing solar site using the EnergySiteId.

import requests

url = "https://service.solaranywhere.com/api/v2/EnergySites/"
apiKey = "your_api_key"
EnergySiteId = "your_site_id"

headers = {
 'content-type': "application/json;charset=utf-8",
 'X-Api-Key': apiKey, 
 'Accept': "application/json"
 }

response = requests.get(url + EnergySiteId,headers=headers)

print(response.text)

What’s Next?