Modules
Parse a PAN file and return module data
This endpoint will convern a .PAN file and its contents into a JSON structure which is compatible with PlantPredict. The response can be used as the body in a POST request to create a new module.
POST
/
Module
/
ImportPANFile
Parse a PAN file and return module data
curl --request POST \
--url https://api.plantpredict.terabase.energy/Module/ImportPANFile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.plantpredict.terabase.energy/Module/ImportPANFile"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.plantpredict.terabase.energy/Module/ImportPANFile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.plantpredict.terabase.energy/Module/ImportPANFile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.plantpredict.terabase.energy/Module/ImportPANFile"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.plantpredict.terabase.energy/Module/ImportPANFile")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Module/ImportPANFile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"name": "First Solar FS-6455A-P Jan2022",
"cellTechnologyType": 6,
"cellDesignType": 0,
"pvModel": 0,
"numberOfCellsInSeries": 264,
"referenceTemperature": 25,
"referenceIrradiance": 1000,
"numIVPoints": 100,
"currentNegation": false,
"stcShortCircuitCurrent": 2.64,
"stcmppCurrent": 2.4404701579949415,
"stcOpenCircuitVoltage": 225.2100000003078,
"stcmppVoltage": 186.47387999999947,
"stcMaxPower": 455,
"relativeEfficiency": 0,
"targetEfficiency": 0,
"stcPowerTempCoef": -0.30465598891628975,
"stcShortCircuitCurrentTempCoef": 0.06098484848484849,
"stcOpenCircuitVoltageTempCoef": -0.2760090582123352,
"saturationCurrentAtSTC": 5.5255324312167533e-11,
"diodeIdealityFactorAtSTC": 1.3560137077739796,
"lightGeneratedCurrent": 2.6548008322394048,
"seriesResistanceAtSTC": 4.124,
"recombinationParameter": 1.078,
"shuntResistanceAtSTC": 5000,
"exponentialDependencyOnShuntResistance": 3,
"darkShuntResistance": 15289,
"maximumSeriesResistance": 5.268999999999999,
"maximumRecombinationParameter": 3.4320000000000004,
"linearTempDependenceOnGamma": 0.002208077500000174,
"moduleShadingResponse": 1,
"electricalShadingFractionalEffect": 100,
"bandgapVoltage": 1.5,
"builtInVoltage": 0.9,
"effectiveIrradianceResponse": null,
"status": 0,
"model": "FS-6455A-P Jan2022",
"manufacturer": "First Solar",
"length": 2024,
"width": 1245,
"weight": 34.9,
"defaultOrientation": 1,
"numberOfCellsInParallel": 1,
"stcEfficiency": 18.060271928663266,
"minTolerance": 0,
"maxTolerance": 5,
"constructionType": 2,
"faciality": 0,
"bifacialityFactor": null,
"transmissionFactor": 0,
"backSideMismatch": 3,
"dataSource": 1,
"lightInducedDegradation": 0,
"moduleQuality": 0,
"moduleMismatchCoefficient": 0.5,
"heatBalanceConvectiveCoef": 0,
"heatBalanceConductiveCoef": 29,
"sandiaConductiveCoef": -3.56,
"sandiaConvectiveCoef": -0.075,
"cellToModuleTempDiff": 3,
"shortCircuitCurrentAtSTC": 2.64,
"linearTempDependenceOnIsc": 0.06098484848484849,
"heatAbsorptionCoefAlphaT": 0.9,
"aGamma": null,
"bGamma": null,
"cGamma": null,
"dGamma": null,
"spectralResponse": 1,
"useDefaultSandiaIAM": true,
"useDefaultTabularIAM": false,
"sandiaSpectralA0": 0,
"sandiaSpectralA1": 0,
"sandiaSpectralA2": 0,
"sandiaSpectralA3": 0,
"sandiaSpectralA4": 0,
"sandiaIAMB0": 6.038242275137197,
"sandiaIAMB1": -0.5248112239136882,
"sandiaIAMB2": 0.02130703918426116,
"sandiaIAMB3": -0.00042240723312322523,
"sandiaIAMB4": 0.000004091960268471147,
"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": 0,
"incidenceAngle": 0,
"factor": 1
},
{
"id": 0,
"incidenceAngle": 30,
"factor": 1
},
{
"id": 0,
"incidenceAngle": 50,
"factor": 0.99
},
{
"id": 0,
"incidenceAngle": 60,
"factor": 0.98
},
{
"id": 0,
"incidenceAngle": 65,
"factor": 0.96
},
{
"id": 0,
"incidenceAngle": 70,
"factor": 0.92
},
{
"id": 0,
"incidenceAngle": 75,
"factor": 0.85
},
{
"id": 0,
"incidenceAngle": 80,
"factor": 0.72
},
{
"id": 0,
"incidenceAngle": 90,
"factor": 0
}
],
"degradationModel": 1,
"linearDegradationRate": 0.5,
"nonLinearDegradationRates": null,
"sandiaAFactors": null,
"sandiaBFactors": null
}{
"message": "The request is invalid.",
"modelState": {
"latitude": [
"The field Latitude must be between -90 and 90."
]
}
}"An error has occurred."Authorizations
Pass Authorization: Bearer <token> on every request. See the Authentication section of the API description for how to fetch a token.
Body
multipart/form-data
Response
Parsed module data
Wp
LibraryStatusEnum
Available options:
0, 1, 2, 3, 4, 5, 6 mm
mm
kg
ModuleOrientation
Available options:
0, 1 CellTechnologyTypeEnum
Available options:
1, 2, 3, 4, 5, 6, 7, 8 CellDesignType
Available options:
0, 1, 2, 3 ConstructionTypeEnum
Available options:
1, 2 FacialityEnum
Available options:
0, 1 DataSourceType
Available options:
1, 2, 3, 4, 5, 6, 7 PvModelType
Available options:
0, 1, 3 ModuleDegradationModel
Available options:
0, 1, 2 ⌘I
Parse a PAN file and return module data
curl --request POST \
--url https://api.plantpredict.terabase.energy/Module/ImportPANFile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.plantpredict.terabase.energy/Module/ImportPANFile"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.plantpredict.terabase.energy/Module/ImportPANFile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.plantpredict.terabase.energy/Module/ImportPANFile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.plantpredict.terabase.energy/Module/ImportPANFile"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.plantpredict.terabase.energy/Module/ImportPANFile")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Module/ImportPANFile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"name": "First Solar FS-6455A-P Jan2022",
"cellTechnologyType": 6,
"cellDesignType": 0,
"pvModel": 0,
"numberOfCellsInSeries": 264,
"referenceTemperature": 25,
"referenceIrradiance": 1000,
"numIVPoints": 100,
"currentNegation": false,
"stcShortCircuitCurrent": 2.64,
"stcmppCurrent": 2.4404701579949415,
"stcOpenCircuitVoltage": 225.2100000003078,
"stcmppVoltage": 186.47387999999947,
"stcMaxPower": 455,
"relativeEfficiency": 0,
"targetEfficiency": 0,
"stcPowerTempCoef": -0.30465598891628975,
"stcShortCircuitCurrentTempCoef": 0.06098484848484849,
"stcOpenCircuitVoltageTempCoef": -0.2760090582123352,
"saturationCurrentAtSTC": 5.5255324312167533e-11,
"diodeIdealityFactorAtSTC": 1.3560137077739796,
"lightGeneratedCurrent": 2.6548008322394048,
"seriesResistanceAtSTC": 4.124,
"recombinationParameter": 1.078,
"shuntResistanceAtSTC": 5000,
"exponentialDependencyOnShuntResistance": 3,
"darkShuntResistance": 15289,
"maximumSeriesResistance": 5.268999999999999,
"maximumRecombinationParameter": 3.4320000000000004,
"linearTempDependenceOnGamma": 0.002208077500000174,
"moduleShadingResponse": 1,
"electricalShadingFractionalEffect": 100,
"bandgapVoltage": 1.5,
"builtInVoltage": 0.9,
"effectiveIrradianceResponse": null,
"status": 0,
"model": "FS-6455A-P Jan2022",
"manufacturer": "First Solar",
"length": 2024,
"width": 1245,
"weight": 34.9,
"defaultOrientation": 1,
"numberOfCellsInParallel": 1,
"stcEfficiency": 18.060271928663266,
"minTolerance": 0,
"maxTolerance": 5,
"constructionType": 2,
"faciality": 0,
"bifacialityFactor": null,
"transmissionFactor": 0,
"backSideMismatch": 3,
"dataSource": 1,
"lightInducedDegradation": 0,
"moduleQuality": 0,
"moduleMismatchCoefficient": 0.5,
"heatBalanceConvectiveCoef": 0,
"heatBalanceConductiveCoef": 29,
"sandiaConductiveCoef": -3.56,
"sandiaConvectiveCoef": -0.075,
"cellToModuleTempDiff": 3,
"shortCircuitCurrentAtSTC": 2.64,
"linearTempDependenceOnIsc": 0.06098484848484849,
"heatAbsorptionCoefAlphaT": 0.9,
"aGamma": null,
"bGamma": null,
"cGamma": null,
"dGamma": null,
"spectralResponse": 1,
"useDefaultSandiaIAM": true,
"useDefaultTabularIAM": false,
"sandiaSpectralA0": 0,
"sandiaSpectralA1": 0,
"sandiaSpectralA2": 0,
"sandiaSpectralA3": 0,
"sandiaSpectralA4": 0,
"sandiaIAMB0": 6.038242275137197,
"sandiaIAMB1": -0.5248112239136882,
"sandiaIAMB2": 0.02130703918426116,
"sandiaIAMB3": -0.00042240723312322523,
"sandiaIAMB4": 0.000004091960268471147,
"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": 0,
"incidenceAngle": 0,
"factor": 1
},
{
"id": 0,
"incidenceAngle": 30,
"factor": 1
},
{
"id": 0,
"incidenceAngle": 50,
"factor": 0.99
},
{
"id": 0,
"incidenceAngle": 60,
"factor": 0.98
},
{
"id": 0,
"incidenceAngle": 65,
"factor": 0.96
},
{
"id": 0,
"incidenceAngle": 70,
"factor": 0.92
},
{
"id": 0,
"incidenceAngle": 75,
"factor": 0.85
},
{
"id": 0,
"incidenceAngle": 80,
"factor": 0.72
},
{
"id": 0,
"incidenceAngle": 90,
"factor": 0
}
],
"degradationModel": 1,
"linearDegradationRate": 0.5,
"nonLinearDegradationRates": null,
"sandiaAFactors": null,
"sandiaBFactors": null
}{
"message": "The request is invalid.",
"modelState": {
"latitude": [
"The field Latitude must be between -90 and 90."
]
}
}"An error has occurred."