Ga naar inhoud

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.

MethodePadWat het doetStand
GET/v1/integrations/{provider}/administrationsList the administrations of a bookkeeping koppelingBinnenkort
POST/v1/integrations/{provider}/administrationsAdd 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}/restoreRestore 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

  • provider path · string verplicht
    Een van: moneybird, exact

Antwoorden

StatusBetekenis
200OK.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/integrations/moneybird/administrations" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo integrations-administrations list

Add 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

  • provider path · string verplicht
    Een van: moneybird, exact

Body

JSON, verplicht.

  • token string verplicht
    max. lengte 400
  • administration_id string
    patroon ^\d{1,24}$

Antwoorden

StatusBetekenis
201The administration is linked.
202Waiting for human approval (ApprovalRequest).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
502An upstream model provider or source failed. Not charged, except work that completed before the failure (reported in details.charged_credits).
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
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"
}'
CLI (binnenkort)
prudai leo integrations-administrations create

Link 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

  • provider path · string verplicht
    Een van: moneybird, exact
  • administration_id path · string verplicht
    patroon ^\d{1,24}$

Body

JSON, verplicht.

  • linked boolean verplicht

Antwoorden

StatusBetekenis
200OK.
202Waiting for human approval (ApprovalRequest).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
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
}'
CLI (binnenkort)
prudai leo integrations-administrations update

Remove 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

  • provider path · string verplicht
    Een van: moneybird, exact
  • administration_id path · string verplicht
    patroon ^\d{1,24}$

Antwoorden

StatusBetekenis
200OK.
202Waiting for human approval (ApprovalRequest).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s -X DELETE "https://api.prudai.com/v1/integrations/moneybird/administrations/<administration_id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo integrations-administrations delete

Restore 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

  • provider path · string verplicht
    Een van: moneybird, exact
  • administration_id path · string verplicht
    patroon ^\d{1,24}$

Body

JSON, optioneel.

Antwoorden

StatusBetekenis
200OK.
202Waiting for human approval (ApprovalRequest).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
409A request with the same Idempotency-Key is still running.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
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 '{}'
CLI (binnenkort)
prudai leo integrations-administrations restore