machs-dir-selbst API
Connect your own systems to machs-dir-selbst, the planning tool for PV systems: read and change customers, projects, offers, your product catalog, services and bookings, and get a webhook when something changes.
- Base URL:
https://sdgctoqabgledxcjnpsl.supabase.co/functions/v1/api - Authentication: an API key of your company, sent as a Bearer token
- Format: JSON in and out
note
This site describes the Preview PR #415 environment. Every path in the reference starts at the base URL above, and the "Send API Request" panel calls it directly, with the API key you enter there.
How the data fits together
- A customer has projects: one per installation site, each with its roofs.
- A project has offers. An offer is made of lines: modules on the roofs, inverter, battery, wallbox, services, other material and free cost lines. Each line carries the net price it is sold for.
- An offer starts as a draft, is published to the customer, and is then accepted or declined.
- Materials (your product catalog), manufacturers and services are what offers are made of.
- Offer requests (Anfragen) come in through your configurator and lead to offers.
Where to go next
- Quickstart: your first requests, step by step.
- Authentication: API keys and scopes.
- Purchase prices: keep your catalog's prices up to date.
- Webhooks: get notified when data changes.
- Documents: grid operator forms and the string plan.
- API Reference (in the sidebar): every endpoint, with examples and code samples in several languages.
- OpenAPI spec: the machine-readable description
this site is built from. Feed it to
openapi-typescript,openapi-generatoror import it into Postman or Insomnia.
Conventions
- Ids are strings such as
"812"; bookings and team members have uuids. - Lists take
limit(1–200, default 50) andoffset, and answer with{ data, total, limit, offset };totalcounts all matches.sorttakes a field and a direction, e.g.sort=createdAt.desc. - Prices are in euros. Offer lines and purchase prices are net. A material
has a
purchasePrice(what you pay) andsellingPrices(what it sells for at each of your sites,netandgross).offerPriceincludes VAT. - Times are ISO 8601; dates are days on the German calendar.
- Errors look like
{ "error": "not_found", "message": "…" }, with the matching HTTP status. Branch onerror;messageis for people and may change.
| Status | Meaning |
|---|---|
400 | The request is not valid; message names the problem. |
401 | No API key, or a wrong, expired or revoked one. |
403 | The API key lacks the scope the endpoint needs. |
404 | No such record in your company. |
409 | Not possible in the record's current state, e.g. changing a published offer. |
500, 502 | Something failed on our side. Try again later. |