Skip to main content
Version: 1.0.0

machs-dir-selbst Public 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

Every path in this reference starts there, e.g. /v1/customers.

Authentication​

Send your API key in the Authorization header: Authorization: Bearer mds_live_.... Create keys in the planner under Einstellungen → API-Schlüssel. Each key has scopes that decide what it may read and change (read:offers, write:offers, …); a write scope includes reading. A key only ever sees its own company's data.

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, free cost lines), and 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.

Conventions​

  • Ids are strings such as "812"; bookings and team members have uuids.
  • Lists take limit (1–200, default 50) and offset and answer with { data, total, limit, offset }; total counts all matches. sort takes 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) and sellingPrices (what it sells for at each site, net and gross). offerPrice includes VAT.
  • Times are ISO 8601; dates are days on the German calendar.
  • Errors look like { "error": "not_found", "message": "…" } with a matching HTTP status: 400 invalid request, 401 missing or wrong API key, 403 scope missing, 404 not found in your company, 409 not possible in the record's current state, 500/502 server error. Branch on error, not on message.

Authentication​

Send your API key as a Bearer token: Authorization: Bearer mds_live_.... Create keys in the planner under Einstellungen → API-Schlüssel.

Security Scheme Type:

http

HTTP Authorization Scheme:

bearer

Bearer format:

API Key

Contact

machs-dir-selbst:

URL: https://machsdirselbst.solar