Skip to main content
PlantPredict can import a PVFARM project directly from the file PVFARM’s Export Shading model (.pvfshade) button produces. You send the file, check back until the import finishes, and the power plant and its 3D shade scene are on your prediction. There is nothing to confirm along the way. PlantPredict creates the module and inverter library records from the file’s datasheet values, builds the plant exactly as the file describes it, and builds the shade scene. Anything it cannot import faithfully is reported back to you with a reason instead of being guessed at.
This is the API equivalent of the PVFARM import in the web application. The web import keeps its review flow, where you can upload PAN and OND files for each equipment type and adjust array and transformer values before anything is created. The API has no review step.

Before you start

You need two things: API credentials, and a prediction to import onto. Credentials. Your company administrator generates them once per user: Manage Account (the gear icon, bottom left), select the user, then Generate API Credentials. Record the Client ID and Client Secret, which are shown only once. Exchange them for an access token using the client credentials grant with your Client ID and Secret sent as a Basic auth header:
Every request below sends the resulting token as Authorization: Bearer. Tokens last about an hour, and an import can outlive one, so refresh it if a long poll starts returning 401.
New to the PlantPredict API? The API Quick Start Guide walks through credentials and tokens in more detail.
A target prediction. The import lands on an existing prediction, which must:
  • be a standard (Block Builder) prediction in one of your projects, and
  • already have a weather file selected.
A prediction that already has a built power plant is refused unless you send overwriteExistingPowerPlant=true on the import call — your explicit consent to replace the existing plant and its 3D scene. Without it, nothing is ever replaced; importing each design revision onto a fresh prediction keeps your revision history instead. Create the project and prediction through the API or the website first, and select a weather file on the prediction.

Step 1: send the file

Post the .pvfshade file exactly as PVFARM exported it. An uncompressed .json of the same data is also accepted, though PVFARM does not export one. To replace a plant an earlier import built on this prediction, add ?overwriteExistingPowerPlant=true to the URL (see When an import fails).
You get back 202 Accepted straight away, with the ID you use to follow the import:

Step 2: check back until it finishes

The import runs in the background and a large file can take a few minutes. Checking once every 10 seconds is plenty.
status is one of three values: Every response also carries a summary: one sentence describing the outcome in plain language, which you can show to a person as-is.

A finished import

equipment lists the library records the import created from the file’s datasheet values: one Module per module type and one Inverter per inverter type. Re-importing the same file reuses the same records instead of creating duplicates, and says so in notices.
The generated equipment is built from the datasheet values the file carries, which is lower fidelity than a manufacturer’s PAN or OND file. For the highest-fidelity equipment models, import through the website, where you can upload PAN and OND files for each type. PlantPredict never guesses: a file whose module technology it does not recognize fails with a clear error instead of assuming one.

When an import fails

Failed means nothing was built on your prediction. errorCode tells you whether it is something you can fix: The first two are worth retrying after fixing what the message names. The third is not.
Nothing is replaced without your explicit consent. Either create a new prediction in the same project (a few seconds through the API) and import onto that — each design revision gets its own prediction, keeping your revision history intact — or repeat the call with overwriteExistingPowerPlant=true to replace the existing plant and its 3D scene, the same consent the website’s import wizard collects through its confirmation dialog.
PlantPredict maps the file’s module technology onto its c-Si or CdTe modeling pathway. A technology string it does not recognize fails the import rather than silently assuming crystalline silicon, because the two pathways model differently. The website’s import wizard lets you choose the family interactively.
Tracker designs are supported. Fixed-tilt designs are not yet supported and fail with invalid-file.

Notes

  • An import is private to the account that created it. A token belonging to a different account cannot see it.
  • The jobId is worth logging. It is the fastest way for support to find a specific import.
  • plant and equipment are empty until the import finishes, so read status first.
  • After a completed import, run the prediction as normal; the shade scene the import built contributes near-shading to the results.