Skip to main content

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.

DataReadWrite
Projectsread:projectswrite:projects
Offers and offer requestsread:offerswrite:offers
Customersread:customerswrite:customers
Materialsread:materialswrite:materials
Manufacturersread:manufacturerswrite:manufacturers
Servicesread:serviceswrite:services
Company profile, team members and sitesread:companywrite:company
Bookings and appointment typesread:bookingswrite:bookings
Analyticsread:analytics—
Documents, files and grid operatorsread: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: customerId and projectName need read:projects; customerFullName needs read:projects and read:customers. Filtering offers by customerId needs read:projects too.
  • Offer requests: projectId and projectName need read:projects, and so do the offer counts, which are 0 without it; companyMemberName needs read:company and read:projects.
  • Projects: customerFullName needs read:customers; companyMemberName and companySiteName need read:company.
  • Bookings: the customer's phone, address, billing details and notes need read:customers; plannerName needs read: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​

StatuserrorMeaning
400validation_error, invalid_sortThe body, a parameter or the sort field is not valid; message says what.
401missing_api_key, invalid_api_keyNo key, or a wrong, expired or revoked one.
403insufficient_scopeThe key lacks the scope named in required.
404not_foundNo such record in your company.
409depends on the endpointNot possible in the record's current state; the endpoint lists its codes.
413, 415file_too_large, file_type_not_allowedA file that is too large or of a type that is not taken.
429rate_limitedToo many files stored within the hour; wait the seconds in Retry-After.
500, 502db_error, booking_failed, …Something failed on our side; message has the details.