Writing endpoints
Up to V1, the product APIs were read-only. Now they write as well — following a pattern that is the same for every section.
Four actions, four scopes
A scope consists of a resource and an action. The action says what is allowed:
| Action | Method | What it does |
|---|---|---|
:read | GET | Reads lists and single entries. |
:write | POST | Creates a new entry. |
:update | PATCH / PUT | Changes an existing entry. |
:delete | DELETE | Removes an entry. |
On top of that there are a few operation scopes that are not a data set: :release approves minutes, :export creates a DATEV export.
The separation is deliberate. A service that collects registrations needs mc.events.registrations:write — but not the right to delete events. A point-of-sale system needs mc.finance.bookings:write, not :delete. For each API, the catalogue lists exactly the scopes for which an endpoint exists: what is not listed does not exist.
PATCH only changes what is in the body
PATCH is a partial update. Missing fields stay unchanged — you do not have to read a record first to change one field.
curl -X PATCH "https://members.api.methacore.de/v1/members/66bcfadc…" \
-H "Authorization: Bearer mcapi_…" \
-H "Content-Type: application/json" \
-d '{ "telephoneNumber": "+49 2832 998877" }'
PUT exists where a whole list forms the data: emergency contacts, group schedules. What you send is the data afterwards — even an empty list.
Unknown fields are discarded
Every endpoint names its fields. Anything else in the body is ignored, not stored: a client cannot put its own fields into other people's records and cannot overwrite a binding. The organisation is always set by the token, never by the body.
Validation is the same as in the product
Writing endpoints run through the same validation code as the back office. A meeting with an unknown type, a vote with a question that has no second option, a registration after the registration deadline — all are rejected, with the same sentence a person would read in the interface.
| Status | When |
|---|---|
400 | The body does not fit: required field missing, wrong type, reference points nowhere. |
403 | The token does not carry the required scope. |
404 | The entry does not belong to the organisation your token is bound to. |
409 | The state forbids it: approved minutes, running vote, assigned booking, full calendar. |
409 is the interesting response: it does not say "wrong" but "not now" — and gives the reason.
What is deliberately not writable
Four things stay with the product, all for the same reason: more than one record depends on them.
- Admitting and removing members — contracts, fee groups, number ranges, notice periods.
- Fee runs — they create invoices and receivables. Via the API you can only clear away a trial run.
- Direct debits — money movement with deadlines and mandate checks.
- Mailboxes and mail sending — an account on a mail server, not an entry in a collection.
This is not a gap that will be filled at random later: if one of these operations becomes an endpoint, it will come with its own action (:execute), its own documentation and its own scope in the catalogue.
Practise safely in the Sandbox
Every writing endpoint also answers with a Sandbox key (ai_sbx_…) — against your Sandbox's fictional data set, at the same address. Created entries then show up in the lists of the same Sandbox, deleted ones disappear, and a reset puts everything back to the start. No call reaches the product.