Skip to main content

Documents

An offer has two kinds of documents:

  • Stored documents: what the planner's documents tab (Dokumente) lists — the datasheets of its parts, the grid operator's forms, the plans generated from it (parts list, string plan, circuit diagram, Kommissionsliste) and the files your team uploaded. You list them with their names and download them.
  • Rendered documents: the offer as a PDF, the grid operator's registration forms and the string plan. They are rendered on demand from the offer as it stands and not stored, so a fresh call always reflects the current configuration.

Every document endpoint of an offer needs the read:documents scope, and read:offers because it reads the offer.

Stored documents​

curl https://smqpvswnxcfltrnmkqjn.supabase.co/functions/v1/api/v1/offers/812/documents -H "Authorization: Bearer mds_live_your_key"
{
"data": [
{
"id": "5121",
"name": "Datenblatt Wechselrichter",
"description": null,
"type": "MATERIAL_INVERTER",
"generator": null,
"fileName": "Datenblatt Wechselrichter.pdf",
"contentType": "application/pdf",
"sizeBytes": 482113,
"contentSha256": "9f2c4e7a1b3d5f60718293a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4",
"shownToCustomer": true,
"createdAt": "2026-11-20T09:14:03.512+00:00",
"downloadUrl": "https://…/storage/v1/object/sign/documents/…?token=…&download=Datenblatt%20Wechselrichter.pdf",
"downloadUrlExpiresAt": "2026-11-23T11:00:00.000Z"
}
]
}

The documents come in the order of the planner's tab: the generated plans, the grid operator's forms, the parts' datasheets by part, then the rest.

  • Download a file with a plain GET on its downloadUrl — no API key needed, and the file comes with fileName as its name. The link works for one hour. Don't store it, since anyone with the link gets the file; list the documents again for fresh links. It is null when the file is missing.
  • type says what a document is: MATERIAL_* a datasheet or certificate of a part of that kind, NETWORK_CARRIER a form of the grid operator, ADDITIONAL everything else. A plan generated from the offer has its generator set: PARTS_LIST, STRING_PLAN, CIRCUIT_DIAGRAM or COMMISSION_LIST.
  • contentSha256 identifies the file's content. To keep a copy in step, download only the values you don't have yet; two documents with the same value are the same file.
  • shownToCustomer says whether the customer sees the document with their offer. A draft shows them nothing; an accepted offer leaves out the datasheets of parts the customer did not order.

The offer as a PDF​

curl https://smqpvswnxcfltrnmkqjn.supabase.co/functions/v1/api/v1/offers/812/pdf -H "Authorization: Bearer mds_live_your_key" --output angebot.pdf

The PDF has the sections your company chose in the planner under Einstellungen → Dokumentgenerierung → Kundenangebot (overview, costs, economics, datasheets, your own pages), in that order. It shows the offer as the customer gets it:

  • an accepted offer with what the customer ordered;
  • any other published offer as it was offered: on each roof the module variant marked recommended, the active battery and wallbox, the recommended emergency power, and no optional extras.

Rendering takes a few seconds, for a long offer up to a minute.

StatusErrorWhat to do
409offer_not_publishedA draft has no PDF. Publish the offer first.
409offer_selection_requiredA roof has several module variants and none is marked recommended. Mark one, or wait for the customer's order.
409offer_pdf_not_set_upYour company has not chosen the PDF's sections yet. Choose them in the planner.
404not_foundThe offer does not exist in your company.
500generation_failedRendering failed — the message carries the detail.

Grid operator forms​

The forms for an offer, with everything defaulted:

curl -X POST https://smqpvswnxcfltrnmkqjn.supabase.co/functions/v1/api/v1/offers/812/network-carrier-documents -H "Authorization: Bearer mds_live_your_key" -H "Content-Type: application/json" -d '{}' --output documents.zip

With an empty body you get the grid operator set on the offer's project and all of that operator's forms, in the order the operator configured. That is the same set the planner produces by default, so most integrations never need to name an id at all.

Looking up the ids​

Every id the request can carry is readable through the API.

The operators and their forms — GET /v1/grid-operators:

curl https://smqpvswnxcfltrnmkqjn.supabase.co/functions/v1/api/v1/grid-operators -H "Authorization: Bearer mds_live_your_key"
{
"data": [
{
"id": "7",
"name": "Stadtwerke München",
"documents": [
{ "id": "1", "name": "Anmeldung Erzeugungsanlage", "pass": "OFFER", "orderPriority": 1 },
{ "id": "4", "name": "Datenblatt Wechselrichter", "pass": "INVERTER", "orderPriority": 2 }
]
}
],
"total": 1,
"limit": 50,
"offset": 0
}

A document's pass says how often it is rendered: OFFER once per offer, INVERTER once per inverter on the offer, BATTERY once per battery.

The electrical contractors you can name on the forms — GET /v1/electrical-firms. Their ids go in electronicsFirmId.

Which operator a site belongs to — a project's networkCarrierId (GET /v1/projects/{id}). This is the operator a document request defaults to.

Everything for one offer at once — GET /v1/offers/{id}/network-carrier-documents/options:

{
"gridOperator": { "id": "7", "name": "Stadtwerke München", "documents": [] },
"documents": [{ "id": "1", "name": "Anmeldung Erzeugungsanlage", "pass": "OFFER", "orderPriority": 1 }],
"electricalFirms": [{ "id": "3", "name": "Elektro Huber GmbH", "firmNumber": "EL-2019-4471" }],
"moduleConfigurations": [
{ "id": "19", "roofName": "Süddach", "moduleName": "Vitovolt 300-DG M440HC", "selected": true, "roofActive": true }
],
"batteries": [{ "id": "88", "name": "Vitocharge VX3 8 kWh", "selected": true }]
}

selected marks what the planner UI preselects, so mirroring the planner's default output is a matter of passing the selected entries back. The module configuration ids are the only ones with no other route — they live inside the offer's roofs — so this is where moduleConfigurationIds comes from.

Choosing what goes on the forms​

curl -X POST https://smqpvswnxcfltrnmkqjn.supabase.co/functions/v1/api/v1/offers/812/network-carrier-documents -H "Authorization: Bearer mds_live_your_key" -H "Content-Type: application/json" -d '{
"networkCarrierId": "7",
"documentIds": ["1", "4"],
"plannedGoingLiveDate": "2026-09-01",
"electronicsFirmId": "3",
"moduleConfigurationIds": ["19"],
"batteryId": "88",
"includeCertificates": true,
"includeDatasheets": true,
"includeMergedDocument": true
}' --output documents.zip
  • documentIds may be any subset of the operator's forms. They always come out in the operator's configured order, whatever order you send.
  • moduleConfigurationIds picks the module a roof counts with in the technical data, one per roof (a roof can offer several). A roof you leave out — and every roof when you omit it — counts with its selected configuration.
  • batteryId picks which battery the BATTERY-pass forms describe. Omit it and the offer's selected battery is used when there is exactly one candidate; send null for none.
  • includeCertificates / includeDatasheets append the product PDFs, and includeMergedDocument adds one combined PDF alongside the individual files.

The response is the ZIP archive itself, not JSON.

Errors​

StatusErrorWhat to do
400network_carrier_not_setThe project has no grid operator. Pass networkCarrierId, or set one on the project.
400no_documents_configuredThe operator has no forms configured (or is not yours). Check GET /v1/grid-operators.
400unknown_document_idsOne or more documentIds are not configured for that operator; the message lists the valid ones.
404not_foundThe offer does not exist in your company.
500generation_failedRendering failed — the message carries the generator's detail.

String plan​

curl https://smqpvswnxcfltrnmkqjn.supabase.co/functions/v1/api/v1/offers/812/string-plan -H "Authorization: Bearer mds_live_your_key" --output string-plan.pdf

No body and no options: it renders how the offer's modules are wired into the inverters' MPP trackers, as a PDF.