Ga naar inhoud

Prudai Developer API: afletteren

Afletter-voorstellen (Exact Online, MAIA) of the own organisation; offering a specification and deciding (approve, reject, send again). 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/exact/settlement-parkedParking list per payer (debit notes waiting for your credit note)Binnenkort
POST/v1/exact/settlement-parked/releaseSettle parked debit notes with the chosen credit notes (new proposal)Binnenkort
GET/v1/exact/settlement-proposalsList settlement proposals (afletter-voorstellen) and whether you may decide themBinnenkort
POST/v1/exact/settlement-proposalsOffer a payment specification (PDF); MAIA makes the settlement proposalBinnenkort
GET/v1/exact/settlement-proposals/{proposal_id}One settlement proposalBinnenkort
PATCH/v1/exact/settlement-proposals/{proposal_id}/bookingChange the booking period of a settlement proposal before approvalBinnenkort
POST/v1/exact/settlement-proposals/decisionsApprove, reject or send again one or more settlement proposalsBinnenkort
GET/v1/exact/settlement-readinessReady to book? Writing switched on, memorial right in Exact, approversBinnenkort
GET/v1/exact/settlement-settingsSettlement settings (debit-note account, closed through, bank-difference tolerance)Binnenkort
PUT/v1/exact/settlement-settingsChange the settlement settings (owner or admin)Binnenkort

Parking list per payer (debit notes waiting for your credit note)

GET /v1/exact/settlement-parked

Personal tokens only; read only. Debit notes the payer deducted on a collective payment, without a counter item of your own yet (“parked”), per payer, with candidate credit notes: open credit notes of the payer with exactly the same amount (one that mentions the debit note number first). MAIA never chooses; next suggests a release only for items with exactly one candidate.

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

Parameters

  • division query · integer

Antwoorden

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

Settle parked debit notes with the chosen credit notes (new proposal)

POST /v1/exact/settlement-parked/release

Personal tokens only. Up to 50 parked debit notes of one administration, each with one of its candidate credit notes (journal + entry). Creates ONE new settlement proposal (memorial: debit the debtor, credit the account the debit note is held on; then a match set credit note ↔ memorial line per relation). Nothing is written to Exact; an approver who is not you approves it (four-eyes). Items that cannot be released are returned in skipped with the reason.

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

Body

JSON, verplicht.

  • items array<object> verplicht
  • items[].key string verplicht
  • items[].credit_note object verplicht
  • items[].credit_note.journal string verplicht
  • items[].credit_note.entry string verplicht

Antwoorden

StatusBetekenis
200Nothing to release (all skipped).
201The release proposal.
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.
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/settlement-parked/release" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"key": "string",
"credit_note": {
"journal": "string",
"entry": "string"
}
}
]
}'
CLI (binnenkort)
prudai leo exact release

List settlement proposals (afletter-voorstellen) and whether you may decide them

GET /v1/exact/settlement-proposals

Personal tokens only; MAIA with an Exact Online connection (404 exact_not_available otherwise). Default status=proposed,approved (waiting for approval, or approved but not yet booked). Per proposal: counts (specification lines, items to settle), can_decide and decide_blocked_reason (exact_proposal_self_approval: you asked for it yourself, another approver decides). No invoice lines or amounts, except bank_difference (bank minus specification total in cents, the account and the limit; null = exact receipt). writeback per proposal: state (waiting: approved, booked in Exact as soon as write-back is on; booked; needs_review: not booked because it no longer matches Exact, review again; failed; retry_later) and a plain-language message.

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

Parameters

  • status query · string
    Comma-separated statuses (proposed, approved, rejected, executed, failed).
  • limit query · integer
    standaard: 50 · min. 1 · max. 200
  • offset query · integer
    standaard: 0 · min. 0

Antwoorden

StatusBetekenis
200The proposals.
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.
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 "https://api.prudai.com/v1/exact/settlement-proposals" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo exact-settlement-proposals list

Offer a payment specification (PDF); MAIA makes the settlement proposal

POST /v1/exact/settlement-proposals

Personal tokens only. multipart/form-data with one PDF in file (at most 25 MB) and optionally division (default: the primary administration). The proposal is made in your name, so you can never approve it yourself (four-eyes); the approvers of the organisation get a notification. The same PDF or specification number again returns the existing proposal (outcome: existing). When no proposal can be made (no text layer, the sum does not match, the payment is not yet in Exact) outcome: blocked with the reasons in blockers, and nothing is stored. Nothing is written to Exact.

?dryRun=true only checks the PDF against the administration and stores nothing (outcome: would_propose or blocked).

Waits for a human (confirm): the first call answers 202 with an approval request (the PDF bytes are part of what is approved); repeat the exact call with x-prudai-approval: apr_… once approved.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:exact_settlements: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 · string
    Validate and show the effect without changing anything. Een van: true, false

Body

Formaat: multipart/form-data.

Antwoorden

StatusBetekenis
200Existing proposal, blocked, or a dry run.
201A new proposal was made.
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 demo organisation has no live Exact administration (exact_demo_mode).
413File too large (request_too_large).
415The file is not a PDF (exact_settlement_not_pdf).
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/settlement-proposals" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo exact-settlement-proposals create

One settlement proposal

GET /v1/exact/settlement-proposals/{proposal_id}

Personal tokens only. Status, counts, the plain-language rationale and whether you may decide it.

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

Parameters

  • proposal_id path · string (uuid) verplicht

Antwoorden

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

Change the booking period of a settlement proposal before approval

PATCH /v1/exact/settlement-proposals/{proposal_id}/booking

Personal tokens only. The proposer or an approver of your own organisation, only while the proposal is open (409 after a decision). The booking date becomes the bank date when it falls in the chosen period, otherwise the nearest day of that period. Who, when and from which period is kept on the proposal; booking.warnings flags a closed period, a period other than the bank receipt’s, a period before or after the current one.

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

Parameters

  • proposal_id path · string (uuid) verplicht

Body

JSON, verplicht.

  • fin_year integer verplicht
    min. 2000 · max. 2100
  • fin_period integer verplicht
    min. 1 · max. 13

Antwoorden

StatusBetekenis
200The proposal with its new booking.
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/exact/settlement-proposals/<proposal_id>/booking" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fin_year": 2000,
"fin_period": 1
}'
CLI (binnenkort)
prudai leo exact-settlement-proposals-booking update

Approve, reject or send again one or more settlement proposals

POST /v1/exact/settlement-proposals/decisions

Personal tokens only. action: approve, reject or execute (send an approved proposal to Exact again), for up to 50 proposal_ids, one after the other. Approve and execute: only an approver of your own organisation (the designated approvers, or without designation an owner/admin), never for a proposal you asked for yourself (four-eyes); such a proposal gets outcome: skipped with the reason in error_code. Each approved proposal is booked on its own, fail-closed, and only when writing to Exact is switched on for the organisation; otherwise outcome: writeback_disabled (approved, not booked). Such a proposal is booked automatically, in order of approval and with the same approval, as soon as write-back is switched on for the organisation; right before booking it is checked again against Exact (invoices still open, not processed yet, period not closed, approval not expired). No longer matching: not booked, writeback.state: needs_review. execute still works. When you may decide none of them: 403 with the reason, before any approval request.

?dryRun=true shows per proposal what would happen.

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_settlements: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 · string
    Validate and show the effect without changing anything. Een van: true, false

Body

JSON, verplicht.

  • action string verplicht
    Een van: approve, reject, execute
  • proposal_ids array<string (uuid)> verplicht
  • note string
    max. lengte 500

Antwoorden

StatusBetekenis
200The outcome per proposal.
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.
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/settlement-proposals/decisions" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "approve",
"proposal_ids": [
"00000000-0000-4000-8000-000000000000"
],
"note": "string"
}'
CLI (binnenkort)
prudai leo exact decisions

Ready to book? Writing switched on, memorial right in Exact, approvers

GET /v1/exact/settlement-readiness

Personal tokens only; read only. writeback_enabled (writing to Exact switched on for the organisation), memorial_right (the connection user may create memorial entries, measured live in Exact; null = cannot be measured now), the approvers and ready_to_book. Exact does not report the matching right separately.

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

Parameters

  • division query · integer

Antwoorden

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

Settlement settings (debit-note account, closed through, bank-difference tolerance)

GET /v1/exact/settlement-settings

Personal tokens only; read only. parking_gl: the general ledger account on which MAIA books the payer’s debit notes, one line per debit note (null = they stay on the payment’s clearing account and only appear on the parking list). closed_through: bookings up to and including this year/period count as closed (Exact does not report period closing through its API). current_period from Exact’s period table (or calendar months). bank_difference_max_cents + bank_difference_gl: bank-difference tolerance, off by default (null). When no receipt matches the specification total exactly but exactly one receipt of the payer differs by at most this many cents (inclusive, both directions), that receipt becomes the payment; “Totaal betalingen” stays the specification total and the difference is a separate journal line “Bankverschil” on bank_difference_gl. Above the limit nothing changes. updated_by_user_id / updated_at: who last changed the settings, and when.

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

Parameters

  • division query · integer

Antwoorden

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

Change the settlement settings (owner or admin)

PUT /v1/exact/settlement-settings

Personal tokens only; an owner or admin of your own organisation. parking_gl must exist and not be blocked in the administration; null switches separate debit-note booking off. bank_difference_max_cents (1 to 100000, in cents; null = off) and bank_difference_gl (must exist and not be blocked) set the bank-difference tolerance; set both or neither (otherwise 422), and not the receivables or clearing account itself. Omitted fields stay as they are.

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

Body

JSON, verplicht.

  • division integer
  • parking_gl string
    max. lengte 20 · kan null zijn
  • closed_through object
    kan null zijn
  • closed_through.fin_year integer verplicht
    min. 2000 · max. 2100
  • closed_through.fin_period integer verplicht
    min. 1 · max. 13
  • bank_difference_max_cents integer
    min. 1 · max. 100000 · kan null zijn
  • bank_difference_gl string
    max. lengte 20 · kan null zijn

Antwoorden

StatusBetekenis
200The settings 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.
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/settlement-settings" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"division": 1,
"parking_gl": "string",
"closed_through": {
"fin_year": 2000,
"fin_period": 1
},
"bank_difference_max_cents": 1,
"bank_difference_gl": "string"
}'
CLI (binnenkort)
prudai leo exact-settlement-settings update