Ga naar inhoud

Prudai Developer API: exact-koppeling

The Exact Online connection (MAIA) of the own organisation; connect, invite the person with the Exact login, choose the administrations, disconnect. Read-only towards Exact. Personal tokens only; never issuable to a service key; writing and disconnecting need an owner or admin.

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/exact/connectionExact Online connection of the organisation (app, state, administrations)Binnenkort
DELETE/v1/exact/connectionDisconnect Exact Online (Ontkoppelen)Binnenkort
POST/v1/exact/connection/authorizeStart connecting Exact Online (authorise URL for a person)Binnenkort
GET/v1/exact/divisionsAdministrations the Exact login can reach, and which ones countBinnenkort
PUT/v1/exact/divisionsChoose which administrations countBinnenkort
POST/v1/exact/invitesInvite the person with the Exact login to connect (Uitnodiging sturen)Binnenkort

Exact Online connection of the organisation (app, state, administrations)

GET /v1/exact/connection

Personal tokens only; read only. Which Exact app serves the organisation (org = its own app, prudai = the app of Prudai), whether a grant is stored, whether administrations still have to be chosen, and the state of each chosen administration. Never a token. MAIA with the Exact Online capability (404 exact_not_available otherwise).

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:exact_connection:read
  • Goedkeuring: none, geen extra stap.

Antwoorden

StatusBetekenis
200The connection.
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/exact/connection" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo exact connection

Disconnect Exact Online (Ontkoppelen)

DELETE /v1/exact/connection

Personal tokens only; owner or admin. Wipes the stored tokens and marks every administration disconnected; the choice of administrations and the data already fetched stay. Restore = connect again (startExactConnection or createExactInvite).

Waits for a reviewer (review): 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:exact_connection:delete
  • Goedkeuring: review, een tweede persoon of rol keurt goed.
  • Verwijderen is zacht; zie Conventies.

Antwoorden

StatusBetekenis
200Disconnected.
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.
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/exact/connection" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo exact-connection delete

Start connecting Exact Online (authorise URL for a person)

POST /v1/exact/connection/authorize

Personal tokens only; owner or admin. Returns authorize_url: a PERSON opens it within 10 minutes, logs in at Exact Online (password, MFA) and gives consent; an agent cannot finish this step. Afterwards choose the administrations with updateExactDivisions (a connection that already has a choice is restored as it was). 409 exact_not_configured when no Exact app exists for the organisation yet.

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:exact_connection:write
  • Goedkeuring: confirm, de gebruiker bevestigt precies deze aanroep.

Body

JSON, optioneel.

Antwoorden

StatusBetekenis
200The authorise URL.
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.
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/exact/connection/authorize" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
CLI (binnenkort)
prudai leo exact authorize

Administrations the Exact login can reach, and which ones count

GET /v1/exact/divisions

Personal tokens only; read only. Every administration the last Exact login could reach, plus the chosen ones, with selected, reachable, the connection status (available = covered by the grant, not chosen) and primary. selection_source: database (own choice), server (older connection, still the server setting) or none.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:exact_connection:read
  • Goedkeuring: none, geen extra stap.

Antwoorden

StatusBetekenis
200The administrations.
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/exact/divisions" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo exact divisions

Choose which administrations count

PUT /v1/exact/divisions

Personal tokens only; owner or admin. Replaces the choice (1 to 100 codes from listExactDivisions), stored in Prudai; no restart. Newly chosen administrations covered by the grant become active at once and get a first replication (sync_job_id); needs_connect lists chosen ones without a usable grant. ?dryRun=true only checks. Unknown codes: 422.

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:exact_connection:write
  • Goedkeuring: confirm, de gebruiker bevestigt precies deze aanroep.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.

Parameters

  • dryRun query · boolean

Body

JSON, verplicht.

  • divisions array<integer> verplicht
  • primary_division integer
    min. 1

Antwoorden

StatusBetekenis
200The choice after the change.
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 PUT "https://api.prudai.com/v1/exact/divisions" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"divisions": [
1
],
"primary_division": 1
}'
CLI (binnenkort)
prudai leo exact-divisions update

Invite the person with the Exact login to connect (Uitnodiging sturen)

POST /v1/exact/invites

Personal tokens only; owner or admin. Creates a single-use link (default 7 days, at most 30) that lets the recipient, for example the accountant, log in at Exact Online and connect the organisation without a Prudai account. With email the platform mails the link (email_sent). Afterwards an owner or admin chooses the administrations.

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:exact_connection:write
  • Goedkeuring: confirm, de gebruiker bevestigt precies deze aanroep.

Body

JSON, optioneel.

  • email string (email)
    max. lengte 254
  • ttl_days integer
    min. 1 · max. 30

Antwoorden

StatusBetekenis
200The invite.
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/exact/invites" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "naam@voorbeeld.nl",
"ttl_days": 1
}'
CLI (binnenkort)
prudai leo exact invites