Authentication
Every request to /v1 needs an API key of your company, sent as a Bearer token:
Authorization: Bearer mds_live_...
You create and revoke keys in the planner under Einstellungen → API-Schlüssel.
A key is shown only once, when it is created. A key can expire on a date you set;
otherwise it is valid until you revoke it. Without a key, or with a wrong,
expired or revoked one, the API answers 401.
Scopes
Each key has scopes that decide what it may do. read:… lets it read, write:…
lets it create, change and delete, and includes reading: every write answers with
the record it changed, so write:customers alone is enough to create customers
and read them back. A request without the scope it needs answers
403 insufficient_scope, and required in the answer names the scope.
| Data | Read | Write |
|---|---|---|
| Projects | read:projects | write:projects |
| Offers and offer requests | read:offers | write:offers |
| Customers | read:customers | write:customers |
| Materials | read:materials | write:materials |
| Manufacturers | read:manufacturers | write:manufacturers |
| Services | read:services | write:services |
| Company profile, team members and sites | read:company | write:company |
| Bookings and appointment types | read:bookings | write:bookings |
| Analytics | read:analytics | — |
| Documents, files and grid operators | read:documents | — |
The documents of an offer (/v1/offers/{id}/…) belong to the offer, so they
need read:offers as well as read:documents. Adding, changing and removing the
stored ones needs write:offers as well as read:documents. In the same way the
files of a project need read:projects or write:projects as well as
read:documents, and the files of an offer request read:offers.
You can only give a key scopes for things your own role in the planner allows
you to do. The material scopes cover every material group and carry the purchase
prices (purchasePrice, the price import): to issue read:materials your role
needs "View" of all rows of the section "Materials" and "Purchase prices &
margins · View", for write:materials "Edit" of all of them. read:analytics
covers what the analytics endpoints serve, so issuing it needs the four
analytics tabs behind them: "Analytics · Overview · View", "Analytics · Offers ·
View", "Analytics · Product Sales · View" and "Analytics · Customers · View".
A few fields come from another area and need its scope as well. Without it they
are null, and everything else works:
- Offers:
customerIdandprojectNameneedread:projects;customerFullNameneedsread:projectsandread:customers. Filtering offers bycustomerIdneedsread:projectstoo. - Offer requests:
projectIdandprojectNameneedread:projects, and so do the offer counts, which are0without it;companyMemberNameneedsread:companyandread:projects. - Projects:
customerFullNameneedsread:customers;companyMemberNameandcompanySiteNameneedread:company. - Bookings: the customer's phone, address, billing details and notes need
read:customers;plannerNameneedsread:company. - Document options: product names need
read:materials.
Whatever its scopes, a key only ever sees and changes the data of its own company.
Rate limits
A key can store 1000 files an hour, of every kind together
(documents, project files,
catalog files and pictures); after that the API answers
429 rate_limited with the seconds to wait in Retry-After. Nothing else is
limited today. Every request is logged per key (you see them under
Einstellungen → API-Schlüssel), and more limits may come later. So build your client to wait and retry on a 429
answer, keep the number of requests reasonable, and use webhooks
instead of asking for changes again and again.
Errors
| Status | error | Meaning |
|---|---|---|
| 400 | validation_error, invalid_sort | The body, a parameter or the sort field is not valid; message says what. |
| 401 | missing_api_key, invalid_api_key | No key, or a wrong, expired or revoked one. |
| 403 | insufficient_scope | The key lacks the scope named in required. |
| 404 | not_found | No such record in your company. |
| 409 | depends on the endpoint | Not possible in the record's current state; the endpoint lists its codes. |
| 413, 415 | file_too_large, file_type_not_allowed | A file that is too large or of a type that is not taken. |
| 429 | rate_limited | Too many files stored within the hour; wait the seconds in Retry-After. |
| 500, 502 | db_error, booking_failed, … | Something failed on our side; message has the details. |