Skip to content

Prudai Developer API: exact connection

The operations of this part (Exact connection).

Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.

MethodPathWhat it doesState
GET/v1/exact/connectionExact Online connection of the organisation (app, state, administrations)Coming soon
DELETE/v1/exact/connectionDisconnect Exact Online (Ontkoppelen)Coming soon
POST/v1/exact/connection/authorizeStart connecting Exact Online (authorise URL for a person)Coming soon
GET/v1/exact/divisionsAdministrations the Exact login can reach, and which ones countComing soon
PUT/v1/exact/divisionsChoose which administrations countComing soon
POST/v1/exact/invitesInvite the person with the Exact login to connect (Uitnodiging sturen)Coming soon

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).

  • State: coming soon, not in production yet.
  • Scope: prudai:exact_connection:read
  • Approval: none, no extra step.

Responses

StatusMeaning
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 (coming soon)
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.

  • State: coming soon, not in production yet.
  • Scope: prudai:exact_connection:delete
  • Approval: review, a second person or role approves.
  • Deleting is soft; see Conventions.

Responses

StatusMeaning
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 (coming soon)
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.

  • State: coming soon, not in production yet.
  • Scope: prudai:exact_connection:write
  • Approval: confirm, the user confirms exactly this call.

Body

JSON, optional.

Responses

StatusMeaning
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 (coming soon)
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.

  • State: coming soon, not in production yet.
  • Scope: prudai:exact_connection:read
  • Approval: none, no extra step.

Responses

StatusMeaning
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 (coming soon)
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.

  • State: coming soon, not in production yet.
  • Scope: prudai:exact_connection:write
  • Approval: confirm, the user confirms exactly this call.
  • Dry run: ?dryRun=true shows what would happen and stores nothing.

Parameters

  • dryRun query · boolean

Body

JSON, required.

  • divisions array<integer> required
  • primary_division integer
    min 1

Responses

StatusMeaning
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 (coming soon)
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.

  • State: coming soon, not in production yet.
  • Scope: prudai:exact_connection:write
  • Approval: confirm, the user confirms exactly this call.

Body

JSON, optional.

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

Responses

StatusMeaning
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 (coming soon)
prudai leo exact invites