Prudai Developer API: administraties van koppelingen
Administrations of the bookkeeping koppelingen (Moneybird, Exact Online) of the own organisation in MAIA; read for every member, link/unlink/add/remove for an owner or admin with approval. Personal tokens only; never issuable to a service key.
Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.
| Methode | Pad | Wat het doet | Stand |
|---|---|---|---|
GET | /v1/integrations/{provider}/administrations | List the administrations of a bookkeeping koppeling | Binnenkort |
POST | /v1/integrations/{provider}/administrations | Add an administration with its own API token (owner or admin) | Binnenkort |
PATCH | /v1/integrations/{provider}/administrations/{administration_id} | Link or unlink an administration (owner or admin) | Binnenkort |
DELETE | /v1/integrations/{provider}/administrations/{administration_id} | Remove an administration the organisation added itself (soft delete) | Binnenkort |
POST | /v1/integrations/{provider}/administrations/{administration_id}/restore | Restore a removed administration (owner or admin) | Binnenkort |
List the administrations of a bookkeeping koppeling
GET /v1/integrations/{provider}/administrations
Personal tokens only; every member with MAIA and the koppeling. Per administration (Moneybird) or division
(Exact Online): linked, state (active, unlinked, needs_attention, not_connected), source
(managed = set up by Prudai, can be switched off but not removed; org = added by the organisation),
last_check_at/last_check_status and, for Exact, last_sync_at. can_manage says whether the token user may
change anything. API tokens are never returned. Exact divisions are managed on the Exact Online connection page
(manage_path).
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:integration_administrations:read - Goedkeuring:
none, geen extra stap.
Parameters
providerverplicht
Een van:moneybird,exact
Antwoorden
| Status | Betekenis |
|---|---|
200 | OK. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/integrations/moneybird/administrations" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo integrations-administrations listAdd an administration with its own API token (owner or admin)
POST /v1/integrations/{provider}/administrations
Moneybird only. Personal tokens only; an owner or admin of your own organisation. Create a personal API token in
Moneybird (Instellingen → Koppelingen → Externe applicaties; rights “Alleen lezen” is enough and advised) in the
administration you want to link, and send it as token. The token decides which administration it is; when it
sees more than one, the answer is 422 administration_choice_required with the choices and you repeat with
administration_id. The token is stored encrypted and never returned.
Waits for a human (confirm): the first call answers 202 with an approval request; repeat the exact call
with x-prudai-approval: apr_… once approved.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:integration_administrations:write - Goedkeuring:
confirm, de gebruiker bevestigt precies deze aanroep.
Parameters
providerverplicht
Een van:moneybird,exact
Body
JSON, verplicht.
tokenverplicht
max. lengte 400administration_id
patroon^\d{1,24}$
Antwoorden
| Status | Betekenis |
|---|---|
201 | The administration is linked. |
202 | Waiting for human approval (ApprovalRequest). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
409 | A request with the same Idempotency-Key is still running. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
502 | An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits). |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/integrations/moneybird/administrations" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "token": "string", "administration_id": "string" }'prudai leo integrations-administrations createLink or unlink an administration (owner or admin)
PATCH /v1/integrations/{provider}/administrations/{administration_id}
Moneybird only. Personal tokens only; an owner or admin of your own organisation. linked: false switches the
administration off for MAIA in the whole organisation (chat, reports, source links); true switches it on again.
Waits for a human (confirm): the first call answers 202 with an approval request; repeat the exact call
with x-prudai-approval: apr_… once approved.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:integration_administrations:write - Goedkeuring:
confirm, de gebruiker bevestigt precies deze aanroep.
Parameters
providerverplicht
Een van:moneybird,exactadministration_idverplicht
patroon^\d{1,24}$
Body
JSON, verplicht.
linkedverplicht
Antwoorden
| Status | Betekenis |
|---|---|
200 | OK. |
202 | Waiting for human approval (ApprovalRequest). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
409 | A request with the same Idempotency-Key is still running. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X PATCH "https://api.prudai.com/v1/integrations/moneybird/administrations/<administration_id>" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "linked": false }'prudai leo integrations-administrations updateRemove an administration the organisation added itself (soft delete)
DELETE /v1/integrations/{provider}/administrations/{administration_id}
Moneybird only. Personal tokens only; an owner or admin of your own organisation. Only administrations with
source: org; one set up by Prudai can be switched off instead (409 managed_cannot_delete). Restorable with
restoreIntegrationAdministration.
Waits for a reviewer (review): another owner or admin approves with a reason.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:integration_administrations:delete - Goedkeuring:
review, een tweede persoon of rol keurt goed. - Verwijderen is zacht; zie Conventies.
Parameters
providerverplicht
Een van:moneybird,exactadministration_idverplicht
patroon^\d{1,24}$
Antwoorden
| Status | Betekenis |
|---|---|
200 | OK. |
202 | Waiting for human approval (ApprovalRequest). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
409 | A request with the same Idempotency-Key is still running. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X DELETE "https://api.prudai.com/v1/integrations/moneybird/administrations/<administration_id>" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo integrations-administrations deleteRestore a removed administration (owner or admin)
POST /v1/integrations/{provider}/administrations/{administration_id}/restore
Moneybird only. Personal tokens only; an owner or admin of your own organisation. Puts back the last removed administration with this id (with its stored token), linked as it was.
Waits for a human (confirm): the first call answers 202 with an approval request; repeat the exact call
with x-prudai-approval: apr_… once approved.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:integration_administrations:write - Goedkeuring:
confirm, de gebruiker bevestigt precies deze aanroep.
Parameters
providerverplicht
Een van:moneybird,exactadministration_idverplicht
patroon^\d{1,24}$
Body
JSON, optioneel.
Antwoorden
| Status | Betekenis |
|---|---|
200 | OK. |
202 | Waiting for human approval (ApprovalRequest). |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
409 | A request with the same Idempotency-Key is still running. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s -X POST "https://api.prudai.com/v1/integrations/moneybird/administrations/<administration_id>/restore" \ -H "Authorization: Bearer $PRUDAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'prudai leo integrations-administrations restore