{"openapi":"3.1.0","info":{"title":"AskLedger API","version":"1.0.0","description":"Read the synced accounting data of your company group (bedrijvengroep) in the AskLedger Common Model: one data model for every accounting package (currently Exact Online, and XML auditfiles for packages without a live connection).\n\nThe same operations are available as MCP tools.\n\nAuthenticate with a company group API key or an OAuth access token as `Authorization: Bearer …`. Rate limit: 120 requests per minute per key or token.\n\nOther LedgerSuite products (such as Kasstroom) read per LedgerSuite administration under `/administrations/{administrationId}`, with a client_credentials token from LedgerSuite for audience `urn:ledgersuite:askledger`; no AskLedger plan needed, 120 requests per minute per product and company group."},"servers":[{"url":"https://www.askledger.nl/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Ledgers"},{"name":"Invoices"},{"name":"Contacts"},{"name":"Ledger accounts"},{"name":"Items"},{"name":"Reference data"},{"name":"Records"},{"name":"Administrations"},{"name":"Auditfiles"}],"paths":{"/ledgers":{"get":{"operationId":"list-ledgers","summary":"List ledgers","description":"List the administrations (ledgers) this company group (bedrijvengroep) has active, with the sync status of each data feed and the plan's data window. Call this first to get ledgerId values.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-ledgers`.","tags":["Ledgers"],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","enterprise"],"description":"Subscription plan of the company group"},"dataAvailableFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Invoices and transactions dated before this date (YYYY-MM-DD) are not available on this plan; null = all history"},"ledgers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger ledger id (led_…)"},"provider":{"type":"string","enum":["exact","auditfile"],"description":"Accounting package"},"remoteId":{"type":"string","description":"Administration key in the package (Exact: division code)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"kvk":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Dutch Chamber of Commerce number"},"vatNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 currency of the books"},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"current":{"type":"boolean","description":"The package's default administration for this connection"},"sync":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Data feed, e.g. contacts, sales-invoices, purchase-invoices"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"running, completed, failed or null (not started)"},"rowsIngested":{"type":"number"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","status","rowsIngested","lastSyncedAt","lastError"],"additionalProperties":false}}},"required":["id","provider","remoteId","name","kvk","vatNumber","baseCurrency","country","current","sync"],"additionalProperties":false}}},"required":["plan","dataAvailableFrom","ledgers"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/contacts":{"get":{"operationId":"search-contacts","summary":"List or search contacts","description":"Find customers and suppliers by code, name or email, or by exact KvK number or IBAN, or page through them by name when query is omitted.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-contacts`.","tags":["Contacts"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"role","in":"query","required":false,"description":"Only customers or only suppliers","schema":{"type":"string","enum":["customer","supplier"]}},{"name":"kvk","in":"query","required":false,"description":"Exact KvK (Chamber of Commerce) number","schema":{"type":"string"}},{"name":"iban","in":"query","required":false,"description":"IBAN of the contact (spaces and case ignored), e.g. from a supplier's invoice","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/invoices":{"get":{"operationId":"search-invoices","summary":"List or search invoices","description":"Find sales and/or purchase invoices by description, contact, number or reference, and/or filter by type, date range, amount, contact, status and journal. Without query, results are sorted by invoice date (newest first) with a total count. Each invoice includes its lines (item, quantity, unit price, amount excl. VAT, VAT, ledger account).\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-invoices`.","tags":["Invoices"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"type","in":"query","required":false,"description":"sales or purchase; omit for both","schema":{"type":"string","enum":["sales","purchase"]}},{"name":"status","in":"query","required":false,"description":"Processing status in the package","schema":{"type":"string","enum":["draft","pending","posted","rejected","unknown"]}},{"name":"contact","in":"query","required":false,"description":"Contact id (con_…) or part of the contact name","schema":{"type":"string"}},{"name":"journalCode","in":"query","required":false,"description":"Journal code","schema":{"type":"string"}},{"name":"issuedFrom","in":"query","required":false,"description":"Invoice date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"issuedTo","in":"query","required":false,"description":"Invoice date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"minAmount","in":"query","required":false,"description":"Minimum total in the ledger's base currency","schema":{"type":"number"}},{"name":"maxAmount","in":"query","required":false,"description":"Maximum total in the ledger's base currency","schema":{"type":"number"}},{"name":"includeLines","in":"query","required":false,"description":"Include invoice lines (default true)","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/ledger-accounts":{"get":{"operationId":"search-ledger-accounts","summary":"List or search ledger accounts","description":"Find general ledger accounts by number or name, or page through the chart of accounts by number when query is omitted.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-ledger-accounts`.","tags":["Ledger accounts"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"classification","in":"query","required":false,"schema":{"type":"string","enum":["asset","liability","equity","revenue","expense","unknown"]}},{"name":"kind","in":"query","required":false,"description":"balance or pnl (profit and loss)","schema":{"type":"string","enum":["balance","pnl","unknown"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccount"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/booked-lines":{"get":{"operationId":"search-booked-lines","summary":"Search how similar lines were booked","description":"Choose a ledger account (and VAT category) from how similar invoice lines were booked before in this ledger, across all contacts: also for a new supplier without history, and to decide between neighbouring accounts. Searches fuzzy (trigram) on the line description and the contact name, e.g. 'parkeren', 'lunch' or 'Figma'. Only lines with a ledger account, on invoices that are not deleted or rejected, dated within the last `months` and the plan's data window. Returns one item per ledger account, best first by relevance × frequency: count = matching lines on that account in the period, lastUsed = date of the latest one, taxCategory = the VAT category used most on those lines (null when unknown), examples = up to 3 most recent matching lines (netAmount excl. VAT, invoice currency). A high count with recent use is strong evidence; a single loose match is weak. No items means no comparable lines: fall back to search-ledger-accounts.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-booked-lines`.","tags":["Invoices"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"query","in":"query","required":true,"description":"What the line is about: its description (e.g. 'parkeren', 'lunch') and/or the contact name","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"type","in":"query","required":false,"description":"purchase (default) or sales lines","schema":{"type":"string","enum":["sales","purchase"]}},{"name":"months","in":"query","required":false,"description":"Look back this many months from today (default 24), within the plan's data window","schema":{"type":"integer","minimum":1,"maximum":120}},{"name":"limit","in":"query","required":false,"description":"Max ledger accounts (default 5, max 20)","schema":{"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BookedLineAccount"}}},"required":["items"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/items":{"get":{"operationId":"search-items","summary":"List or search items","description":"Find items (articles/products/services) by code or name. Use this to get item ids for invoice lines; expired items are excluded by default.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-items`.","tags":["Items"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"salesOnly","in":"query","required":false,"description":"Only items that can be sold (default false)","schema":{"type":"boolean"}},{"name":"includeExpired","in":"query","required":false,"description":"Include items past their end date","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/tax-rates":{"get":{"operationId":"list-reference-data-tax-rates","summary":"List tax rates","description":"List a ledger's tax rates, payment terms or journals. Use kind 'journals' with journalType 'sales' to pick the journal for a new sales invoice.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-reference-data`.","tags":["Reference data"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"}]}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/payment-terms":{"get":{"operationId":"list-reference-data-payment-terms","summary":"List payment terms","description":"List a ledger's tax rates, payment terms or journals. Use kind 'journals' with journalType 'sales' to pick the journal for a new sales invoice.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-reference-data`.","tags":["Reference data"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"}]}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/journals":{"get":{"operationId":"list-reference-data-journals","summary":"List journals","description":"List a ledger's tax rates, payment terms or journals. Use kind 'journals' with journalType 'sales' to pick the journal for a new sales invoice.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-reference-data`.","tags":["Reference data"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"journalType","in":"query","required":false,"description":"journals only: filter by type","schema":{"type":"string","enum":["sales","purchase","bank","cash","general","other"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"}]}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/receivables":{"get":{"operationId":"list-receivables","summary":"List open receivables","description":"List what customers still have to pay (open receivables / openstaande debiteuren): one item per open invoice, credit note or unmatched receipt, with the open amount, due date and days overdue. Use minDaysOverdue for overdue invoices (e.g. 60 for more than 60 days late), contact for one customer and kind 'unmatched' for receipts still to be matched. Reads the outstanding items list of the accounting package (Exact: Openstaande posten), refreshed with every sync; items paid since then may still show. Sorted by due date, oldest first. totals covers every matching item, not just this page. All open items are included, also those dated before list-ledgers' dataAvailableFrom. An item without number from a bank or cash journal is a payment or receipt not yet matched to an invoice (af te letteren, usually a negative amount); use kind 'unmatched' to list only those, and compare them with open invoices of the same contact and amount to suggest a match.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-receivables`.","tags":["Open items"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"contact","in":"query","required":false,"description":"Customer contact id (con_…) or part of the name","schema":{"type":"string","minLength":1}},{"name":"minDaysOverdue","in":"query","required":false,"description":"Only items at least this many days past their due date (1 = all overdue items)","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"dueFrom","in":"query","required":false,"description":"Due date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dueTo","in":"query","required":false,"description":"Due date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"kind","in":"query","required":false,"description":"invoice = only open invoices and credit notes; unmatched = only receipts from a bank or cash journal not yet matched to an invoice (af te letteren). Default: both","schema":{"type":"string","enum":["invoice","unmatched"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpenItem"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"},"totals":{"type":"array","items":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Open items in this currency"},"openAmount":{"type":"number","description":"Sum of openAmount"},"overdueAmount":{"type":"number","description":"Part of openAmount that is past its due date"}},"required":["currency","count","openAmount","overdueAmount"],"additionalProperties":false},"description":"Per currency: count and sum of all matching items still open (not only this page), and the overdue part"}},"required":["items","total","nextCursor","totals"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/payables":{"get":{"operationId":"list-payables","summary":"List open payables","description":"List what is still to be paid to suppliers (open payables / openstaande crediteuren): one item per open purchase invoice, credit note or unmatched payment, with the open amount, due date and days overdue. Use dueTo for what falls due before a date (e.g. to plan payments), contact for one supplier and kind 'unmatched' for payments still to be matched. Reads the outstanding items list of the accounting package (Exact: Openstaande posten), refreshed with every sync; items paid since then may still show. Sorted by due date, oldest first. totals covers every matching item, not just this page. All open items are included, also those dated before list-ledgers' dataAvailableFrom. An item without number from a bank or cash journal is a payment or receipt not yet matched to an invoice (af te letteren, usually a negative amount); use kind 'unmatched' to list only those, and compare them with open invoices of the same contact and amount to suggest a match.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-payables`.","tags":["Open items"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"contact","in":"query","required":false,"description":"Supplier contact id (con_…) or part of the name","schema":{"type":"string","minLength":1}},{"name":"minDaysOverdue","in":"query","required":false,"description":"Only items at least this many days past their due date (1 = all overdue items)","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"dueFrom","in":"query","required":false,"description":"Due date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dueTo","in":"query","required":false,"description":"Due date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"kind","in":"query","required":false,"description":"invoice = only open invoices and credit notes; unmatched = only payments from a bank or cash journal not yet matched to an invoice (af te letteren). Default: both","schema":{"type":"string","enum":["invoice","unmatched"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpenItem"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"},"totals":{"type":"array","items":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Open items in this currency"},"openAmount":{"type":"number","description":"Sum of openAmount"},"overdueAmount":{"type":"number","description":"Part of openAmount that is past its due date"}},"required":["currency","count","openAmount","overdueAmount"],"additionalProperties":false},"description":"Per currency: count and sum of all matching items still open (not only this page), and the overdue part"}},"required":["items","total","nextCursor","totals"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/transactions":{"get":{"operationId":"search-transactions","summary":"List transactions","description":"List general ledger transactions (boekingen / grootboekmutaties) with their lines, newest first, filtered by date range, journal type or code, ledger account, contact and status. Each line has the ledger account and a signed amount (debit positive, credit negative); the lines of a transaction balance to zero. Use ledgerAccount to see what was booked on one account, journalType 'bank' for bank transactions. For totals per month use list-account-balances or get-cash-flow instead of adding up pages. Transactions dated before list-ledgers' dataAvailableFrom are not available.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-transactions`.","tags":["Transactions"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"dateFrom","in":"query","required":false,"description":"Transaction date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dateTo","in":"query","required":false,"description":"Transaction date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"journalType","in":"query","required":false,"description":"Only transactions in journals of this type, e.g. bank","schema":{"type":"string","enum":["sales","purchase","bank","cash","general","other"]}},{"name":"journalCode","in":"query","required":false,"description":"Journal code","schema":{"type":"string","minLength":1}},{"name":"ledgerAccount","in":"query","required":false,"description":"Only transactions with a line on this ledger account (id lac_… or code)","schema":{"type":"string","minLength":1}},{"name":"contact","in":"query","required":false,"description":"Contact id (con_…)","schema":{"type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","posted","unknown"]}},{"name":"includeLines","in":"query","required":false,"description":"Include transaction lines (default true)","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/balances":{"get":{"operationId":"list-account-balances","summary":"List balances per ledger account per month","description":"Balances of general ledger accounts per month: opening balance, debit, credit, movement and closing balance, for every month in the range (default the last 12 months). Filter by ledgerAccount, classification or kind; accounts without any lines are left out. Answers questions like 'how did our revenue develop per month' or 'what was the balance of account 1300 at the end of June'. For profit and loss accounts use movement per month: their balance keeps adding up over the years. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-account-balances`.","tags":["Transactions"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"ledgerAccount","in":"query","required":false,"description":"Ledger account id (lac_…) or account code, e.g. 1100","schema":{"type":"string","minLength":1}},{"name":"classification","in":"query","required":false,"schema":{"type":"string","enum":["asset","liability","equity","revenue","expense","unknown"]}},{"name":"kind","in":"query","required":false,"description":"balance or pnl (profit and loss)","schema":{"type":"string","enum":["balance","pnl","unknown"]}},{"name":"limit","in":"query","required":false,"description":"Max accounts (default 20, max 100)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalance"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"}},"required":["items","total","nextCursor","currency","months","firstTransactionDate"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/cash-flow":{"get":{"operationId":"get-cash-flow","summary":"Get money in and out and the bank balance per month","description":"Money in and out per month and the bank and cash balance over time (default the last 12 months), from the ledger accounts of the bank and cash journals. Use it for questions like 'how much money came in last quarter', 'what was our bank balance at the end of each month' or 'are we burning cash'. Lines of one transaction are netted, so a transfer between two of the ledger's own bank accounts within one entry counts as neither. accounts lists the bank and cash accounts with their balances. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-cash-flow`.","tags":["Transactions"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line on a bank or cash account (YYYY-MM-DD)"},"openingBalance":{"type":"number","description":"Bank and cash balance before the first month"},"closingBalance":{"type":"number","description":"Bank and cash balance at the end of the last month"},"accounts":{"type":"array","items":{"type":"object","properties":{"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"journalCodes":{"type":"array","items":{"type":"string"},"description":"Bank or cash journals booking on this account"},"journalType":{"type":"string","enum":["sales","purchase","bank","cash","general","other"]},"openingBalance":{"type":"number"},"closingBalance":{"type":"number"}},"required":["ledgerAccountId","code","name","journalCodes","journalType","openingBalance","closingBalance"],"additionalProperties":false},"description":"Bank and cash accounts; empty when the ledger's journals name no account"},"months":{"type":"array","items":{"$ref":"#/components/schemas/CashFlowMonth"}}},"required":["currency","firstTransactionDate","openingBalance","closingBalance","accounts","months"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/profit-and-loss":{"get":{"operationId":"get-profit-and-loss","summary":"Get the profit and loss statement per month","description":"The profit and loss statement (winst- en verliesrekening) per month (default the last 12 months): every profit and loss account's movement, grouped by RGS rubriek (e.g. WOmz netto-omzet, WKpr kostprijs, WPer personeelskosten) in the order of the Dutch P&L model, with totals per group and the result per month. Revenue is positive and costs negative, so result is the sum of the groups. Accounts without an RGS code are in unmapped-revenue / unmapped-expense. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-profit-and-loss`.","tags":["Transactions"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ProfitAndLossGroup"},"description":"Rubrieken with at least one account"},"result":{"type":"array","items":{"type":"number"},"description":"Result per month (sum of the groups)"},"total":{"type":"number","description":"Result over the whole range"}},"required":["currency","months","firstTransactionDate","groups","result","total"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/balance-sheet":{"get":{"operationId":"get-balance-sheet","summary":"Get the balance sheet per month end","description":"The balance sheet (balans) at the end of every month (default the last 12 months): every balance sheet account's closing balance, grouped by RGS rubriek (e.g. BMva materiële vaste activa, BVor vorderingen, BLim liquide middelen, BEiv eigen vermogen, BSch kortlopende schulden) in the order of the Dutch balance sheet. Assets are debit positive, liabilities and equity credit positive. Equity includes the cumulative result of the P&L accounts as 'Resultaat, nog niet verdeeld' (ledgerAccountId null), so difference (assets − liabilities) is 0 when the books balance. Accounts without an RGS code are in unmapped-assets / unmapped-liabilities. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-balance-sheet`.","tags":["Transactions"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetGroup"},"description":"Asset rubrieken with at least one account"},"liabilities":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetGroup"},"description":"Equity and liability rubrieken with at least one account"},"totals":{"type":"object","properties":{"assets":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false},"liabilities":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false}},"required":["assets","liabilities"],"additionalProperties":false},"result":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false,"description":"Cumulative result of the P&L accounts, included in equity"},"difference":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false,"description":"Assets − liabilities: 0 when the books balance"}},"required":["currency","months","firstTransactionDate","assets","liabilities","totals","result","difference"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/cash-flow-statement":{"get":{"operationId":"get-cash-flow-statement","summary":"Get the cash flow statement per month","description":"The cash flow statement (kasstroomoverzicht) per month by the indirect method (default the last 12 months): result and depreciation plus the change of every balance sheet RGS rubriek, in operating, investing and financing activities, and the resulting change in liquid assets (BLim). Money in is positive, out negative. Balance sheet accounts without an RGS code are one operating line, so the sections add up to the change in liquid assets; difference shows any gap. For money in and out of the bank accounts themselves use get-cash-flow. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-cash-flow-statement`.","tags":["Transactions"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/CashFlowStatementSection"}},"liquidAssets":{"type":"object","properties":{"opening":{"type":"number","description":"Liquid assets before the first month"},"change":{"type":"array","items":{"type":"number"},"description":"Change per month"},"closing":{"type":"array","items":{"type":"number"},"description":"Liquid assets at the end of every month"},"total":{"type":"number","description":"Change over the whole range"}},"required":["opening","change","closing","total"],"additionalProperties":false,"description":"Liquid assets (RGS BLim)"},"difference":{"type":"array","items":{"type":"number"},"description":"Sum of the sections − change in liquid assets: 0 when the books balance"}},"required":["currency","months","firstTransactionDate","sections","liquidAssets","difference"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/{collection}/{id}":{"get":{"operationId":"get-record","summary":"Get one record","description":"Fetch one record by collection and id, typically after a search returned it. Invoices and transactions include their lines.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-record`.","tags":["Records"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Collection the record belongs to","schema":{"type":"string","enum":["contacts","invoices","ledger-accounts","items","tax-rates","payment-terms","journals","transactions"]}},{"name":"id","in":"path","required":true,"description":"AskLedger record id","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/LedgerAccount"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"},{"$ref":"#/components/schemas/Transaction"}]}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/kvk-companies":{"get":{"operationId":"search-kvk","summary":"Search the KvK trade register","description":"Look up Dutch companies in the KvK (Chamber of Commerce) trade register by name, KvK number, address or postcode, for example to find or verify the KvK number and address of a (new) customer before create-customer. Live lookup on kvk.nl, independent of Exact Online and the administrations. A company can appear several times: once as legal entity (Rechtspersoon) and once per establishment (Hoofdvestiging/Nevenvestiging) with the same kvkNumber.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-kvk`.","tags":["Contacts"],"parameters":[{"name":"query","in":"query","required":true,"description":"Company name, KvK number, establishment number, address or postcode; add a city to narrow down","schema":{"type":"string","minLength":2,"maxLength":200}},{"name":"status","in":"query","required":false,"description":"Registration status (default registered: only current registrations)","schema":{"type":"string","enum":["registered","deregistered","all"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 10, max 50)","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"skip","in":"query","required":false,"description":"Results to skip for paging","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number","description":"Total number of matches in the register"},"skip":{"type":"number"},"take":{"type":"number"},"companies":{"type":"array","items":{"type":"object","properties":{"kvkNumber":{"type":"string","description":"8-digit KvK number"},"establishmentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"12-digit establishment number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"statutoryName":{"anyOf":[{"type":"string"},{"type":"null"}]},"tradeNames":{"type":"array","items":{"type":"string"}},"registrationType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hoofdvestiging (main), Nevenvestiging (branch) or Rechtspersoon (legal entity)"},"legalForm":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean","description":"False when deregistered"},"registrationDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitingAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"postalAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"activity":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kvkNumber","establishmentNumber","name","statutoryName","tradeNames","registrationType","legalForm","active","registrationDate","visitingAddress","postalAddress","activity"],"additionalProperties":false}}},"required":["total","skip","take","companies"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/suppliers":{"post":{"operationId":"create-supplier","summary":"Create a supplier","description":"Create a supplier (purchase contact) in the accounting package, optionally with its IBAN and VAT number. This is a permanent change. First check with search-contacts (query, kvk or iban) that the supplier does not already exist; to complete or rename an existing supplier use update-supplier instead. The IBAN must have valid check digits (error invalid_iban), the VAT number a valid format and checksum (invalid_vat_number), and a KvK number must be in the KvK register under a name that fits (kvk_name_mismatch). The user must confirm before the supplier is created; possible duplicates are shown to them. If the result has created=false and a confirmation object, nothing was created yet: show confirmation.summary to the user verbatim and ask whether to create the supplier. Only after the user explicitly says yes in the chat, call create-supplier again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments. Pass the returned remoteId as supplierId to create-purchase-entry right away; its contact id (con_…) follows after the next sync, usually within a few minutes.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `create-supplier`.","tags":["Contacts"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Company or person name"},"email":{"description":"Email address","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"kvk":{"description":"Dutch Chamber of Commerce (KvK) number, 8 digits","type":"string","pattern":"^\\d{8}$"},"addressLine1":{"description":"Street and house number, e.g. from search-kvk visitingAddress (the part before the comma)","type":"string","minLength":1,"maxLength":100},"postcode":{"description":"Postcode, e.g. 1234 AB","type":"string","minLength":1,"maxLength":20},"city":{"description":"City","type":"string","minLength":1,"maxLength":50},"country":{"description":"ISO 3166-1 alpha-2 country code; defaults to NL when an address is given","type":"string","pattern":"^[A-Z]{2}$"},"iban":{"description":"IBAN of the supplier, e.g. from its invoice","type":"string","minLength":1,"maxLength":34},"vatNumber":{"type":"string","minLength":4,"maxLength":20,"description":"VAT number with country prefix, e.g. NL123456789B01"}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"ledgerId":{"type":"string"},"remoteId":{"type":"string","description":"Contact key in the package; the AskLedger id follows after the next sync"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"kvk":{"anyOf":[{"type":"string"},{"type":"null"}]},"ibanSaved":{"type":"boolean","description":"False when the IBAN was not given or could not be saved"}},"required":["ledgerId","remoteId","code","name","email","kvk","ibanSaved"],"additionalProperties":false},{"type":"null"}]}},"required":["created","message","confirmation","contact"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/contacts/{supplierId}":{"patch":{"operationId":"update-supplier","summary":"Update a supplier","description":"Update an existing supplier in the accounting package from an invoice: correct its name (e.g. a typo or a new legal name), or fill in an IBAN, KvK number or VAT number that is still empty. This is a permanent change. IBAN, KvK and VAT number can never be replaced: when the supplier already has another value the call fails with field_already_set and nothing changes. Never retry with other values; tell the user that a different bank account or registration on an invoice can be a sign of invoice fraud, and that they change such fields in the accounting package itself. Find the supplier with search-contacts first (by kvk or iban, then by name). Values equal to the current ones change nothing. The IBAN must have valid check digits (invalid_iban), the VAT number a valid format and checksum (invalid_vat_number), and a KvK number must be in the KvK register under a name that fits the (new) name (kvk_name_mismatch). The user must confirm a summary with old → new per field before anything changes. If the result has created=false and a confirmation object, nothing was changed yet: show confirmation.summary to the user verbatim and ask whether to make these changes. Only after the user explicitly says yes in the chat, call update-supplier again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `update-supplier`.","tags":["Contacts"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"supplierId","in":"path","required":true,"description":"Contact id (con_…) from search-contacts, or its remoteId","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New name, e.g. the legal name on the invoice","type":"string","minLength":1,"maxLength":50},"iban":{"description":"IBAN to add; only when the supplier has no bank account yet","type":"string","minLength":1,"maxLength":34},"kvk":{"description":"KvK number to add, 8 digits; only when empty","type":"string","pattern":"^\\d{8}$"},"vatNumber":{"description":"VAT number to add, with country prefix; only when empty","type":"string","minLength":4,"maxLength":20},"source":{"description":"Where the new values come from, kept in the audit trail","type":"object","properties":{"type":{"type":"string","const":"invoice"},"reference":{"type":"string","minLength":1,"maxLength":255,"description":"Invoice number or document id"}},"required":["type","reference"],"additionalProperties":false}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean","description":"True when the changes were written to the package"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"contact":{"$ref":"#/components/schemas/Contact"},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","iban","kvk","vatNumber"]},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Value before; null when empty"},"to":{"type":"string"}},"required":["field","from","to"],"additionalProperties":false},"description":"Changed fields (or, before confirmation, the fields that will change)"}},"required":["created","message","confirmation","contact","changes"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/purchase-entries":{"post":{"operationId":"create-purchase-entry","summary":"Book a purchase invoice","description":"Book a purchase invoice in the accounting package (Exact: inkoopboeking), optionally with the invoice PDF attached. This is a permanent change to the books. Look up supplierId with search-contacts (role 'supplier'), ledger accounts with search-ledger-accounts, and journalCode with list-reference-data (kind 'journals', journalType 'purchase'). VAT needs no lookup: give each line a taxCategory and AskLedger picks the ledger's VAT code: \n- nl_high: Dutch supplier, 21% VAT on the invoice\n- nl_low: Dutch supplier, 9% VAT on the invoice (e.g. food, books, some repairs)\n- nl_reverse_charge: Dutch supplier, no VAT charged with \"BTW verlegd\" / \"reverse charge\" on the invoice (e.g. subcontracting, staffing)\n- eu_acquisition_high: supplier in another EU country, no VAT charged (reverse charge / intra-community), goods or services normally at 21% in NL\n- eu_acquisition_low: supplier in another EU country, no VAT charged, goods or services normally at 9% in NL\n- non_eu_import: supplier outside the EU (e.g. US software, UK after Brexit), no Dutch VAT charged\n- none: no VAT applies or the VAT is not deductible (exempt services such as insurance, bank fees, healthcare; foreign VAT you cannot reclaim): the whole amount is cost\n- zero_rated: Dutch VAT at 0% (e.g. international transport), only the base amount is reported\nMixed rates on one invoice: one line per category.\n The package refuses a second booking with the same supplier and invoiceNumber (error code duplicate). The user must confirm before it is booked. If the result has created=false and a confirmation object, nothing was created yet: show confirmation.summary to the user verbatim and ask whether to create the booking. Only after the user explicitly says yes in the chat, call create-purchase-entry again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `create-purchase-entry`.","tags":["Invoices"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplierId":{"type":"string","minLength":1,"description":"Supplier contact id (con_…) from search-contacts, or the remoteId create-supplier just returned"},"journalCode":{"type":"string","minLength":1,"description":"Purchase journal code"},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Invoice date (YYYY-MM-DD)"},"dueDate":{"description":"Due date (YYYY-MM-DD); defaults from the payment term","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"invoiceNumber":{"description":"The supplier's invoice number (Exact: Uw ref.)","type":"string","minLength":1,"maxLength":255},"description":{"description":"Booking description","type":"string","maxLength":255},"paymentTermCode":{"description":"Payment term code; defaults from the supplier","type":"string","minLength":1},"currency":{"description":"ISO 4217 currency; the ledger's base currency when omitted","type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"ledgerAccount":{"type":"string","minLength":1,"description":"Ledger account id (lac_…) or account code, e.g. 4000"},"amount":{"type":"number","description":"Amount excl. VAT, also for VAT that is included on the invoice: AskLedger converts it for the package; negative for a credit note"},"taxCategory":{"type":"string","enum":["nl_high","nl_low","nl_reverse_charge","eu_acquisition_high","eu_acquisition_low","non_eu_import","none","zero_rated"],"description":"VAT category of the line (see the tool description); AskLedger picks the ledger's VAT code for it"},"vatAmount":{"description":"VAT amount as on the invoice; calculated from the category's rate when omitted","type":"number"},"description":{"description":"Line description","type":"string","maxLength":255},"costCenterCode":{"description":"Cost center code","type":"string","minLength":1}},"required":["ledgerAccount","amount","taxCategory"],"additionalProperties":false},"description":"Booking lines"},"document":{"description":"The invoice (PDF), attached to the booking in the package","type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"File name, e.g. invoice.pdf"},"contentBase64":{"type":"string","minLength":1,"maxLength":4194304,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"The file, base64 encoded (at most 3 MB)"}},"required":["fileName","contentBase64"],"additionalProperties":false}},"required":["supplierId","journalCode","invoiceDate","lines"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"entry":{"anyOf":[{"type":"object","properties":{"ledgerId":{"type":"string"},"remoteId":{"type":"string","description":"Entry key in the package; the AskLedger invoice id follows after the next sync"},"entryNumber":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Booking number in the package"},"supplierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountInclVat":{"anyOf":[{"type":"number"},{"type":"null"}]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Key of the attached document in the package"}},"required":["ledgerId","remoteId","entryNumber","supplierName","invoiceNumber","currency","amountInclVat","documentId"],"additionalProperties":false},{"type":"null"}]}},"required":["created","message","confirmation","entry"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/ledgers/{ledgerId}/bank-entries":{"post":{"operationId":"create-bank-entry","summary":"Book a bank entry","description":"Book a bank or credit card entry (Exact: bankboeking) in the accounting package. This is a permanent change to the books. Look up journalCode with list-reference-data (kind 'journals', journalType 'bank'), ledger accounts with search-ledger-accounts and contacts with search-contacts. The user must confirm before it is booked. If the result has created=false and a confirmation object, nothing was created yet: show confirmation.summary to the user verbatim and ask whether to create the booking. Only after the user explicitly says yes in the chat, call create-bank-entry again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `create-bank-entry`.","tags":["Transactions"],"parameters":[{"name":"ledgerId","in":"path","required":true,"description":"Ledger (administration) id, from list-ledgers","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"journalCode":{"type":"string","minLength":1,"description":"Bank or credit card journal code"},"financialYear":{"description":"Financial year; from the line dates when omitted","type":"integer","minimum":1900,"maximum":9999},"financialPeriod":{"description":"Financial period; from the line dates when omitted","type":"integer","minimum":1,"maximum":99},"currency":{"description":"ISO 4217 currency; the journal's currency when omitted","type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"ledgerAccount":{"type":"string","minLength":1,"description":"Ledger account id (lac_…) or account code, e.g. 4000"},"amount":{"type":"number","description":"Amount; positive = received, negative = paid"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Date (YYYY-MM-DD)"},"contactId":{"description":"Contact id (con_…), or the remoteId create-supplier just returned","type":"string","minLength":1},"description":{"description":"Line description","type":"string","maxLength":255},"taxRateCode":{"description":"VAT code","type":"string","minLength":1}},"required":["ledgerAccount","amount","date"],"additionalProperties":false},"description":"Entry lines"}},"required":["journalCode","lines"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"entry":{"anyOf":[{"type":"object","properties":{"ledgerId":{"type":"string"},"remoteId":{"type":"string","description":"Entry key in the package"},"entryNumber":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Booking number in the package"}},"required":["ledgerId","remoteId","entryNumber"],"additionalProperties":false},{"type":"null"}]}},"required":["created","message","confirmation","entry"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}":{"get":{"operationId":"list-ledgers-by-administration","summary":"List ledgers (by administration)","description":"List the administrations (ledgers) this company group (bedrijvengroep) has active, with the sync status of each data feed and the plan's data window. Call this first to get ledgerId values.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-ledgers`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","enterprise"],"description":"Subscription plan of the company group"},"dataAvailableFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Invoices and transactions dated before this date (YYYY-MM-DD) are not available on this plan; null = all history"},"ledgers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger ledger id (led_…)"},"provider":{"type":"string","enum":["exact","auditfile"],"description":"Accounting package"},"remoteId":{"type":"string","description":"Administration key in the package (Exact: division code)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"kvk":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Dutch Chamber of Commerce number"},"vatNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 currency of the books"},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"current":{"type":"boolean","description":"The package's default administration for this connection"},"sync":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Data feed, e.g. contacts, sales-invoices, purchase-invoices"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"running, completed, failed or null (not started)"},"rowsIngested":{"type":"number"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","status","rowsIngested","lastSyncedAt","lastError"],"additionalProperties":false}}},"required":["id","provider","remoteId","name","kvk","vatNumber","baseCurrency","country","current","sync"],"additionalProperties":false}}},"required":["plan","dataAvailableFrom","ledgers"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/contacts":{"get":{"operationId":"search-contacts-by-administration","summary":"List or search contacts (by administration)","description":"Find customers and suppliers by code, name or email, or by exact KvK number or IBAN, or page through them by name when query is omitted.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-contacts`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"role","in":"query","required":false,"description":"Only customers or only suppliers","schema":{"type":"string","enum":["customer","supplier"]}},{"name":"kvk","in":"query","required":false,"description":"Exact KvK (Chamber of Commerce) number","schema":{"type":"string"}},{"name":"iban","in":"query","required":false,"description":"IBAN of the contact (spaces and case ignored), e.g. from a supplier's invoice","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/invoices":{"get":{"operationId":"search-invoices-by-administration","summary":"List or search invoices (by administration)","description":"Find sales and/or purchase invoices by description, contact, number or reference, and/or filter by type, date range, amount, contact, status and journal. Without query, results are sorted by invoice date (newest first) with a total count. Each invoice includes its lines (item, quantity, unit price, amount excl. VAT, VAT, ledger account).\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-invoices`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"type","in":"query","required":false,"description":"sales or purchase; omit for both","schema":{"type":"string","enum":["sales","purchase"]}},{"name":"status","in":"query","required":false,"description":"Processing status in the package","schema":{"type":"string","enum":["draft","pending","posted","rejected","unknown"]}},{"name":"contact","in":"query","required":false,"description":"Contact id (con_…) or part of the contact name","schema":{"type":"string"}},{"name":"journalCode","in":"query","required":false,"description":"Journal code","schema":{"type":"string"}},{"name":"issuedFrom","in":"query","required":false,"description":"Invoice date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"issuedTo","in":"query","required":false,"description":"Invoice date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"minAmount","in":"query","required":false,"description":"Minimum total in the ledger's base currency","schema":{"type":"number"}},{"name":"maxAmount","in":"query","required":false,"description":"Maximum total in the ledger's base currency","schema":{"type":"number"}},{"name":"includeLines","in":"query","required":false,"description":"Include invoice lines (default true)","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/ledger-accounts":{"get":{"operationId":"search-ledger-accounts-by-administration","summary":"List or search ledger accounts (by administration)","description":"Find general ledger accounts by number or name, or page through the chart of accounts by number when query is omitted.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-ledger-accounts`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"classification","in":"query","required":false,"schema":{"type":"string","enum":["asset","liability","equity","revenue","expense","unknown"]}},{"name":"kind","in":"query","required":false,"description":"balance or pnl (profit and loss)","schema":{"type":"string","enum":["balance","pnl","unknown"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccount"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/booked-lines":{"get":{"operationId":"search-booked-lines-by-administration","summary":"Search how similar lines were booked (by administration)","description":"Choose a ledger account (and VAT category) from how similar invoice lines were booked before in this ledger, across all contacts: also for a new supplier without history, and to decide between neighbouring accounts. Searches fuzzy (trigram) on the line description and the contact name, e.g. 'parkeren', 'lunch' or 'Figma'. Only lines with a ledger account, on invoices that are not deleted or rejected, dated within the last `months` and the plan's data window. Returns one item per ledger account, best first by relevance × frequency: count = matching lines on that account in the period, lastUsed = date of the latest one, taxCategory = the VAT category used most on those lines (null when unknown), examples = up to 3 most recent matching lines (netAmount excl. VAT, invoice currency). A high count with recent use is strong evidence; a single loose match is weak. No items means no comparable lines: fall back to search-ledger-accounts.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-booked-lines`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"query","in":"query","required":true,"description":"What the line is about: its description (e.g. 'parkeren', 'lunch') and/or the contact name","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"type","in":"query","required":false,"description":"purchase (default) or sales lines","schema":{"type":"string","enum":["sales","purchase"]}},{"name":"months","in":"query","required":false,"description":"Look back this many months from today (default 24), within the plan's data window","schema":{"type":"integer","minimum":1,"maximum":120}},{"name":"limit","in":"query","required":false,"description":"Max ledger accounts (default 5, max 20)","schema":{"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BookedLineAccount"}}},"required":["items"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/items":{"get":{"operationId":"search-items-by-administration","summary":"List or search items (by administration)","description":"Find items (articles/products/services) by code or name. Use this to get item ids for invoice lines; expired items are excluded by default.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-items`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Free-text search (fuzzy + full-text), ranked best first without total or cursor. Omit to page through all records","schema":{"type":"string","minLength":1}},{"name":"salesOnly","in":"query","required":false,"description":"Only items that can be sold (default false)","schema":{"type":"boolean"}},{"name":"includeExpired","in":"query","required":false,"description":"Include items past their end date","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/tax-rates":{"get":{"operationId":"list-reference-data-tax-rates-by-administration","summary":"List tax rates (by administration)","description":"List a ledger's tax rates, payment terms or journals. Use kind 'journals' with journalType 'sales' to pick the journal for a new sales invoice.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-reference-data`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"}]}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/payment-terms":{"get":{"operationId":"list-reference-data-payment-terms-by-administration","summary":"List payment terms (by administration)","description":"List a ledger's tax rates, payment terms or journals. Use kind 'journals' with journalType 'sales' to pick the journal for a new sales invoice.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-reference-data`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"}]}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/journals":{"get":{"operationId":"list-reference-data-journals-by-administration","summary":"List journals (by administration)","description":"List a ledger's tax rates, payment terms or journals. Use kind 'journals' with journalType 'sales' to pick the journal for a new sales invoice.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-reference-data`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"journalType","in":"query","required":false,"description":"journals only: filter by type","schema":{"type":"string","enum":["sales","purchase","bank","cash","general","other"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"}]}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/receivables":{"get":{"operationId":"list-receivables-by-administration","summary":"List open receivables (by administration)","description":"List what customers still have to pay (open receivables / openstaande debiteuren): one item per open invoice, credit note or unmatched receipt, with the open amount, due date and days overdue. Use minDaysOverdue for overdue invoices (e.g. 60 for more than 60 days late), contact for one customer and kind 'unmatched' for receipts still to be matched. Reads the outstanding items list of the accounting package (Exact: Openstaande posten), refreshed with every sync; items paid since then may still show. Sorted by due date, oldest first. totals covers every matching item, not just this page. All open items are included, also those dated before list-ledgers' dataAvailableFrom. An item without number from a bank or cash journal is a payment or receipt not yet matched to an invoice (af te letteren, usually a negative amount); use kind 'unmatched' to list only those, and compare them with open invoices of the same contact and amount to suggest a match.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-receivables`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"contact","in":"query","required":false,"description":"Customer contact id (con_…) or part of the name","schema":{"type":"string","minLength":1}},{"name":"minDaysOverdue","in":"query","required":false,"description":"Only items at least this many days past their due date (1 = all overdue items)","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"dueFrom","in":"query","required":false,"description":"Due date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dueTo","in":"query","required":false,"description":"Due date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"kind","in":"query","required":false,"description":"invoice = only open invoices and credit notes; unmatched = only receipts from a bank or cash journal not yet matched to an invoice (af te letteren). Default: both","schema":{"type":"string","enum":["invoice","unmatched"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpenItem"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"},"totals":{"type":"array","items":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Open items in this currency"},"openAmount":{"type":"number","description":"Sum of openAmount"},"overdueAmount":{"type":"number","description":"Part of openAmount that is past its due date"}},"required":["currency","count","openAmount","overdueAmount"],"additionalProperties":false},"description":"Per currency: count and sum of all matching items still open (not only this page), and the overdue part"}},"required":["items","total","nextCursor","totals"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/payables":{"get":{"operationId":"list-payables-by-administration","summary":"List open payables (by administration)","description":"List what is still to be paid to suppliers (open payables / openstaande crediteuren): one item per open purchase invoice, credit note or unmatched payment, with the open amount, due date and days overdue. Use dueTo for what falls due before a date (e.g. to plan payments), contact for one supplier and kind 'unmatched' for payments still to be matched. Reads the outstanding items list of the accounting package (Exact: Openstaande posten), refreshed with every sync; items paid since then may still show. Sorted by due date, oldest first. totals covers every matching item, not just this page. All open items are included, also those dated before list-ledgers' dataAvailableFrom. An item without number from a bank or cash journal is a payment or receipt not yet matched to an invoice (af te letteren, usually a negative amount); use kind 'unmatched' to list only those, and compare them with open invoices of the same contact and amount to suggest a match.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-payables`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"contact","in":"query","required":false,"description":"Supplier contact id (con_…) or part of the name","schema":{"type":"string","minLength":1}},{"name":"minDaysOverdue","in":"query","required":false,"description":"Only items at least this many days past their due date (1 = all overdue items)","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"dueFrom","in":"query","required":false,"description":"Due date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dueTo","in":"query","required":false,"description":"Due date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"kind","in":"query","required":false,"description":"invoice = only open invoices and credit notes; unmatched = only payments from a bank or cash journal not yet matched to an invoice (af te letteren). Default: both","schema":{"type":"string","enum":["invoice","unmatched"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpenItem"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"},"totals":{"type":"array","items":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Open items in this currency"},"openAmount":{"type":"number","description":"Sum of openAmount"},"overdueAmount":{"type":"number","description":"Part of openAmount that is past its due date"}},"required":["currency","count","openAmount","overdueAmount"],"additionalProperties":false},"description":"Per currency: count and sum of all matching items still open (not only this page), and the overdue part"}},"required":["items","total","nextCursor","totals"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/transactions":{"get":{"operationId":"search-transactions-by-administration","summary":"List transactions (by administration)","description":"List general ledger transactions (boekingen / grootboekmutaties) with their lines, newest first, filtered by date range, journal type or code, ledger account, contact and status. Each line has the ledger account and a signed amount (debit positive, credit negative); the lines of a transaction balance to zero. Use ledgerAccount to see what was booked on one account, journalType 'bank' for bank transactions. For totals per month use list-account-balances or get-cash-flow instead of adding up pages. Transactions dated before list-ledgers' dataAvailableFrom are not available.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-transactions`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"dateFrom","in":"query","required":false,"description":"Transaction date from (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dateTo","in":"query","required":false,"description":"Transaction date to (YYYY-MM-DD, inclusive)","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"journalType","in":"query","required":false,"description":"Only transactions in journals of this type, e.g. bank","schema":{"type":"string","enum":["sales","purchase","bank","cash","general","other"]}},{"name":"journalCode","in":"query","required":false,"description":"Journal code","schema":{"type":"string","minLength":1}},{"name":"ledgerAccount","in":"query","required":false,"description":"Only transactions with a line on this ledger account (id lac_… or code)","schema":{"type":"string","minLength":1}},{"name":"contact","in":"query","required":false,"description":"Contact id (con_…)","schema":{"type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","posted","unknown"]}},{"name":"includeLines","in":"query","required":false,"description":"Include transaction lines (default true)","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Max results (default 20; max 50 with query, 100 without)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}},{"name":"modifiedSince","in":"query","required":false,"description":"Only records that changed in AskLedger at or after this moment (ISO 8601), oldest change first. Use the previous call's time to sync incrementally","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"includeDeleted","in":"query","required":false,"description":"Include records deleted in the accounting package (default false)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["items","total","nextCursor"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/balances":{"get":{"operationId":"list-account-balances-by-administration","summary":"List balances per ledger account per month (by administration)","description":"Balances of general ledger accounts per month: opening balance, debit, credit, movement and closing balance, for every month in the range (default the last 12 months). Filter by ledgerAccount, classification or kind; accounts without any lines are left out. Answers questions like 'how did our revenue develop per month' or 'what was the balance of account 1300 at the end of June'. For profit and loss accounts use movement per month: their balance keeps adding up over the years. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `list-account-balances`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"ledgerAccount","in":"query","required":false,"description":"Ledger account id (lac_…) or account code, e.g. 1100","schema":{"type":"string","minLength":1}},{"name":"classification","in":"query","required":false,"schema":{"type":"string","enum":["asset","liability","equity","revenue","expense","unknown"]}},{"name":"kind","in":"query","required":false,"description":"balance or pnl (profit and loss)","schema":{"type":"string","enum":["balance","pnl","unknown"]}},{"name":"limit","in":"query","required":false,"description":"Max accounts (default 20, max 100)","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalance"}},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total matching records; null for a free-text search, which ranks instead of counting"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"}},"required":["items","total","nextCursor","currency","months","firstTransactionDate"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/cash-flow":{"get":{"operationId":"get-cash-flow-by-administration","summary":"Get money in and out and the bank balance per month (by administration)","description":"Money in and out per month and the bank and cash balance over time (default the last 12 months), from the ledger accounts of the bank and cash journals. Use it for questions like 'how much money came in last quarter', 'what was our bank balance at the end of each month' or 'are we burning cash'. Lines of one transaction are netted, so a transfer between two of the ledger's own bank accounts within one entry counts as neither. accounts lists the bank and cash accounts with their balances. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-cash-flow`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line on a bank or cash account (YYYY-MM-DD)"},"openingBalance":{"type":"number","description":"Bank and cash balance before the first month"},"closingBalance":{"type":"number","description":"Bank and cash balance at the end of the last month"},"accounts":{"type":"array","items":{"type":"object","properties":{"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"journalCodes":{"type":"array","items":{"type":"string"},"description":"Bank or cash journals booking on this account"},"journalType":{"type":"string","enum":["sales","purchase","bank","cash","general","other"]},"openingBalance":{"type":"number"},"closingBalance":{"type":"number"}},"required":["ledgerAccountId","code","name","journalCodes","journalType","openingBalance","closingBalance"],"additionalProperties":false},"description":"Bank and cash accounts; empty when the ledger's journals name no account"},"months":{"type":"array","items":{"$ref":"#/components/schemas/CashFlowMonth"}}},"required":["currency","firstTransactionDate","openingBalance","closingBalance","accounts","months"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/profit-and-loss":{"get":{"operationId":"get-profit-and-loss-by-administration","summary":"Get the profit and loss statement per month (by administration)","description":"The profit and loss statement (winst- en verliesrekening) per month (default the last 12 months): every profit and loss account's movement, grouped by RGS rubriek (e.g. WOmz netto-omzet, WKpr kostprijs, WPer personeelskosten) in the order of the Dutch P&L model, with totals per group and the result per month. Revenue is positive and costs negative, so result is the sum of the groups. Accounts without an RGS code are in unmapped-revenue / unmapped-expense. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-profit-and-loss`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/ProfitAndLossGroup"},"description":"Rubrieken with at least one account"},"result":{"type":"array","items":{"type":"number"},"description":"Result per month (sum of the groups)"},"total":{"type":"number","description":"Result over the whole range"}},"required":["currency","months","firstTransactionDate","groups","result","total"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/balance-sheet":{"get":{"operationId":"get-balance-sheet-by-administration","summary":"Get the balance sheet per month end (by administration)","description":"The balance sheet (balans) at the end of every month (default the last 12 months): every balance sheet account's closing balance, grouped by RGS rubriek (e.g. BMva materiële vaste activa, BVor vorderingen, BLim liquide middelen, BEiv eigen vermogen, BSch kortlopende schulden) in the order of the Dutch balance sheet. Assets are debit positive, liabilities and equity credit positive. Equity includes the cumulative result of the P&L accounts as 'Resultaat, nog niet verdeeld' (ledgerAccountId null), so difference (assets − liabilities) is 0 when the books balance. Accounts without an RGS code are in unmapped-assets / unmapped-liabilities. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-balance-sheet`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetGroup"},"description":"Asset rubrieken with at least one account"},"liabilities":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetGroup"},"description":"Equity and liability rubrieken with at least one account"},"totals":{"type":"object","properties":{"assets":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false},"liabilities":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false}},"required":["assets","liabilities"],"additionalProperties":false},"result":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false,"description":"Cumulative result of the P&L accounts, included in equity"},"difference":{"type":"object","properties":{"opening":{"type":"number"},"amounts":{"type":"array","items":{"type":"number"}}},"required":["opening","amounts"],"additionalProperties":false,"description":"Assets − liabilities: 0 when the books balance"}},"required":["currency","months","firstTransactionDate","assets","liabilities","totals","result","difference"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/cash-flow-statement":{"get":{"operationId":"get-cash-flow-statement-by-administration","summary":"Get the cash flow statement per month (by administration)","description":"The cash flow statement (kasstroomoverzicht) per month by the indirect method (default the last 12 months): result and depreciation plus the change of every balance sheet RGS rubriek, in operating, investing and financing activities, and the resulting change in liquid assets (BLim). Money in is positive, out negative. Balance sheet accounts without an RGS code are one operating line, so the sections add up to the change in liquid assets; difference shows any gap. For money in and out of the bank accounts themselves use get-cash-flow. Amounts are in the ledger's base currency, debit positive and credit negative. Balances add up every synced line; when the package was synced from a certain date on (see firstTransactionDate) and that year has no opening balance entry, absolute balances miss what came before.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-cash-flow-statement`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"fromMonth","in":"query","required":false,"description":"First month; default 11 months before toMonth (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"toMonth","in":"query","required":false,"description":"Last month; default the current month (YYYY-MM, inclusive)","schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Base currency of the ledger"},"months":{"type":"array","items":{"type":"string"},"description":"The months covered (YYYY-MM)"},"firstTransactionDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date of the oldest synced line (YYYY-MM-DD)"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/CashFlowStatementSection"}},"liquidAssets":{"type":"object","properties":{"opening":{"type":"number","description":"Liquid assets before the first month"},"change":{"type":"array","items":{"type":"number"},"description":"Change per month"},"closing":{"type":"array","items":{"type":"number"},"description":"Liquid assets at the end of every month"},"total":{"type":"number","description":"Change over the whole range"}},"required":["opening","change","closing","total"],"additionalProperties":false,"description":"Liquid assets (RGS BLim)"},"difference":{"type":"array","items":{"type":"number"},"description":"Sum of the sections − change in liquid assets: 0 when the books balance"}},"required":["currency","months","firstTransactionDate","sections","liquidAssets","difference"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/{collection}/{id}":{"get":{"operationId":"get-record-by-administration","summary":"Get one record (by administration)","description":"Fetch one record by collection and id, typically after a search returned it. Invoices and transactions include their lines.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `get-record`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"description":"Collection the record belongs to","schema":{"type":"string","enum":["contacts","invoices","ledger-accounts","items","tax-rates","payment-terms","journals","transactions"]}},{"name":"id","in":"path","required":true,"description":"AskLedger record id","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/LedgerAccount"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/TaxRate"},{"$ref":"#/components/schemas/PaymentTerm"},{"$ref":"#/components/schemas/Journal"},{"$ref":"#/components/schemas/Transaction"}]}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/kvk-companies":{"get":{"operationId":"search-kvk-by-administration","summary":"Search the KvK trade register (by administration)","description":"Look up Dutch companies in the KvK (Chamber of Commerce) trade register by name, KvK number, address or postcode, for example to find or verify the KvK number and address of a (new) customer before create-customer. Live lookup on kvk.nl, independent of Exact Online and the administrations. A company can appear several times: once as legal entity (Rechtspersoon) and once per establishment (Hoofdvestiging/Nevenvestiging) with the same kvkNumber.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too.\n\nRequires the `ledger:read` scope (Lezen). Same operation as the MCP tool `search-kvk`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"query","in":"query","required":true,"description":"Company name, KvK number, establishment number, address or postcode; add a city to narrow down","schema":{"type":"string","minLength":2,"maxLength":200}},{"name":"status","in":"query","required":false,"description":"Registration status (default registered: only current registrations)","schema":{"type":"string","enum":["registered","deregistered","all"]}},{"name":"limit","in":"query","required":false,"description":"Max results (default 10, max 50)","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"skip","in":"query","required":false,"description":"Results to skip for paging","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number","description":"Total number of matches in the register"},"skip":{"type":"number"},"take":{"type":"number"},"companies":{"type":"array","items":{"type":"object","properties":{"kvkNumber":{"type":"string","description":"8-digit KvK number"},"establishmentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"12-digit establishment number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"statutoryName":{"anyOf":[{"type":"string"},{"type":"null"}]},"tradeNames":{"type":"array","items":{"type":"string"}},"registrationType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hoofdvestiging (main), Nevenvestiging (branch) or Rechtspersoon (legal entity)"},"legalForm":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean","description":"False when deregistered"},"registrationDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"visitingAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"postalAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"activity":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kvkNumber","establishmentNumber","name","statutoryName","tradeNames","registrationType","legalForm","active","registrationDate","visitingAddress","postalAddress","activity"],"additionalProperties":false}}},"required":["total","skip","take","companies"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/suppliers":{"post":{"operationId":"create-supplier-by-administration","summary":"Create a supplier (by administration)","description":"Create a supplier (purchase contact) in the accounting package, optionally with its IBAN and VAT number. This is a permanent change. First check with search-contacts (query, kvk or iban) that the supplier does not already exist; to complete or rename an existing supplier use update-supplier instead. The IBAN must have valid check digits (error invalid_iban), the VAT number a valid format and checksum (invalid_vat_number), and a KvK number must be in the KvK register under a name that fits (kvk_name_mismatch). The user must confirm before the supplier is created; possible duplicates are shown to them. If the result has created=false and a confirmation object, nothing was created yet: show confirmation.summary to the user verbatim and ask whether to create the supplier. Only after the user explicitly says yes in the chat, call create-supplier again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments. Pass the returned remoteId as supplierId to create-purchase-entry right away; its contact id (con_…) follows after the next sync, usually within a few minutes.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:purchase-write`) for administrations that include them.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `create-supplier`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Company or person name"},"email":{"description":"Email address","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"kvk":{"description":"Dutch Chamber of Commerce (KvK) number, 8 digits","type":"string","pattern":"^\\d{8}$"},"addressLine1":{"description":"Street and house number, e.g. from search-kvk visitingAddress (the part before the comma)","type":"string","minLength":1,"maxLength":100},"postcode":{"description":"Postcode, e.g. 1234 AB","type":"string","minLength":1,"maxLength":20},"city":{"description":"City","type":"string","minLength":1,"maxLength":50},"country":{"description":"ISO 3166-1 alpha-2 country code; defaults to NL when an address is given","type":"string","pattern":"^[A-Z]{2}$"},"iban":{"description":"IBAN of the supplier, e.g. from its invoice","type":"string","minLength":1,"maxLength":34},"vatNumber":{"type":"string","minLength":4,"maxLength":20,"description":"VAT number with country prefix, e.g. NL123456789B01"}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"ledgerId":{"type":"string"},"remoteId":{"type":"string","description":"Contact key in the package; the AskLedger id follows after the next sync"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"kvk":{"anyOf":[{"type":"string"},{"type":"null"}]},"ibanSaved":{"type":"boolean","description":"False when the IBAN was not given or could not be saved"}},"required":["ledgerId","remoteId","code","name","email","kvk","ibanSaved"],"additionalProperties":false},{"type":"null"}]}},"required":["created","message","confirmation","contact"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/contacts/{supplierId}":{"patch":{"operationId":"update-supplier-by-administration","summary":"Update a supplier (by administration)","description":"Update an existing supplier in the accounting package from an invoice: correct its name (e.g. a typo or a new legal name), or fill in an IBAN, KvK number or VAT number that is still empty. This is a permanent change. IBAN, KvK and VAT number can never be replaced: when the supplier already has another value the call fails with field_already_set and nothing changes. Never retry with other values; tell the user that a different bank account or registration on an invoice can be a sign of invoice fraud, and that they change such fields in the accounting package itself. Find the supplier with search-contacts first (by kvk or iban, then by name). Values equal to the current ones change nothing. The IBAN must have valid check digits (invalid_iban), the VAT number a valid format and checksum (invalid_vat_number), and a KvK number must be in the KvK register under a name that fits the (new) name (kvk_name_mismatch). The user must confirm a summary with old → new per field before anything changes. If the result has created=false and a confirmation object, nothing was changed yet: show confirmation.summary to the user verbatim and ask whether to make these changes. Only after the user explicitly says yes in the chat, call update-supplier again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:purchase-write`) for administrations that include them.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `update-supplier`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"supplierId","in":"path","required":true,"description":"Contact id (con_…) from search-contacts, or its remoteId","schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New name, e.g. the legal name on the invoice","type":"string","minLength":1,"maxLength":50},"iban":{"description":"IBAN to add; only when the supplier has no bank account yet","type":"string","minLength":1,"maxLength":34},"kvk":{"description":"KvK number to add, 8 digits; only when empty","type":"string","pattern":"^\\d{8}$"},"vatNumber":{"description":"VAT number to add, with country prefix; only when empty","type":"string","minLength":4,"maxLength":20},"source":{"description":"Where the new values come from, kept in the audit trail","type":"object","properties":{"type":{"type":"string","const":"invoice"},"reference":{"type":"string","minLength":1,"maxLength":255,"description":"Invoice number or document id"}},"required":["type","reference"],"additionalProperties":false}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean","description":"True when the changes were written to the package"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"contact":{"$ref":"#/components/schemas/Contact"},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","iban","kvk","vatNumber"]},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Value before; null when empty"},"to":{"type":"string"}},"required":["field","from","to"],"additionalProperties":false},"description":"Changed fields (or, before confirmation, the fields that will change)"}},"required":["created","message","confirmation","contact","changes"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/purchase-entries":{"post":{"operationId":"create-purchase-entry-by-administration","summary":"Book a purchase invoice (by administration)","description":"Book a purchase invoice in the accounting package (Exact: inkoopboeking), optionally with the invoice PDF attached. This is a permanent change to the books. Look up supplierId with search-contacts (role 'supplier'), ledger accounts with search-ledger-accounts, and journalCode with list-reference-data (kind 'journals', journalType 'purchase'). VAT needs no lookup: give each line a taxCategory and AskLedger picks the ledger's VAT code: \n- nl_high: Dutch supplier, 21% VAT on the invoice\n- nl_low: Dutch supplier, 9% VAT on the invoice (e.g. food, books, some repairs)\n- nl_reverse_charge: Dutch supplier, no VAT charged with \"BTW verlegd\" / \"reverse charge\" on the invoice (e.g. subcontracting, staffing)\n- eu_acquisition_high: supplier in another EU country, no VAT charged (reverse charge / intra-community), goods or services normally at 21% in NL\n- eu_acquisition_low: supplier in another EU country, no VAT charged, goods or services normally at 9% in NL\n- non_eu_import: supplier outside the EU (e.g. US software, UK after Brexit), no Dutch VAT charged\n- none: no VAT applies or the VAT is not deductible (exempt services such as insurance, bank fees, healthcare; foreign VAT you cannot reclaim): the whole amount is cost\n- zero_rated: Dutch VAT at 0% (e.g. international transport), only the base amount is reported\nMixed rates on one invoice: one line per category.\n The package refuses a second booking with the same supplier and invoiceNumber (error code duplicate). The user must confirm before it is booked. If the result has created=false and a confirmation object, nothing was created yet: show confirmation.summary to the user verbatim and ask whether to create the booking. Only after the user explicitly says yes in the chat, call create-purchase-entry again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:purchase-write`) for administrations that include them.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `create-purchase-entry`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplierId":{"type":"string","minLength":1,"description":"Supplier contact id (con_…) from search-contacts, or the remoteId create-supplier just returned"},"journalCode":{"type":"string","minLength":1,"description":"Purchase journal code"},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Invoice date (YYYY-MM-DD)"},"dueDate":{"description":"Due date (YYYY-MM-DD); defaults from the payment term","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"invoiceNumber":{"description":"The supplier's invoice number (Exact: Uw ref.)","type":"string","minLength":1,"maxLength":255},"description":{"description":"Booking description","type":"string","maxLength":255},"paymentTermCode":{"description":"Payment term code; defaults from the supplier","type":"string","minLength":1},"currency":{"description":"ISO 4217 currency; the ledger's base currency when omitted","type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"ledgerAccount":{"type":"string","minLength":1,"description":"Ledger account id (lac_…) or account code, e.g. 4000"},"amount":{"type":"number","description":"Amount excl. VAT, also for VAT that is included on the invoice: AskLedger converts it for the package; negative for a credit note"},"taxCategory":{"type":"string","enum":["nl_high","nl_low","nl_reverse_charge","eu_acquisition_high","eu_acquisition_low","non_eu_import","none","zero_rated"],"description":"VAT category of the line (see the tool description); AskLedger picks the ledger's VAT code for it"},"vatAmount":{"description":"VAT amount as on the invoice; calculated from the category's rate when omitted","type":"number"},"description":{"description":"Line description","type":"string","maxLength":255},"costCenterCode":{"description":"Cost center code","type":"string","minLength":1}},"required":["ledgerAccount","amount","taxCategory"],"additionalProperties":false},"description":"Booking lines"},"document":{"description":"The invoice (PDF), attached to the booking in the package","type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"File name, e.g. invoice.pdf"},"contentBase64":{"type":"string","minLength":1,"maxLength":4194304,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"The file, base64 encoded (at most 3 MB)"}},"required":["fileName","contentBase64"],"additionalProperties":false}},"required":["supplierId","journalCode","invoiceDate","lines"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"entry":{"anyOf":[{"type":"object","properties":{"ledgerId":{"type":"string"},"remoteId":{"type":"string","description":"Entry key in the package; the AskLedger invoice id follows after the next sync"},"entryNumber":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Booking number in the package"},"supplierName":{"anyOf":[{"type":"string"},{"type":"null"}]},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountInclVat":{"anyOf":[{"type":"number"},{"type":"null"}]},"documentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Key of the attached document in the package"}},"required":["ledgerId","remoteId","entryNumber","supplierName","invoiceNumber","currency","amountInclVat","documentId"],"additionalProperties":false},{"type":"null"}]}},"required":["created","message","confirmation","entry"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/bank-entries":{"post":{"operationId":"create-bank-entry-by-administration","summary":"Book a bank entry (by administration)","description":"Book a bank or credit card entry (Exact: bankboeking) in the accounting package. This is a permanent change to the books. Look up journalCode with list-reference-data (kind 'journals', journalType 'bank'), ledger accounts with search-ledger-accounts and contacts with search-contacts. The user must confirm before it is booked. If the result has created=false and a confirmation object, nothing was created yet: show confirmation.summary to the user verbatim and ask whether to create the booking. Only after the user explicitly says yes in the chat, call create-bank-entry again with exactly the same arguments plus confirmationToken. Never confirm on the user's behalf and never reuse a token for other arguments.\n\nSame as the ledger endpoint, addressed by LedgerSuite administration id instead of ledgerId. Other LedgerSuite products call this with their own client_credentials token (audience `urn:ledgersuite:askledger`, scope `askledger:purchase-write`) for administrations that include them.\n\nA write: over REST only LedgerSuite products with `askledger:purchase-write` can call it, after their user approved the write in the product (no confirmation is asked). Other callers get `403 confirmation_required` and use the MCP tool, which asks the user to confirm. Purchase entries: `409 duplicate` when the package already has the booking (same supplier and invoice number); nothing was booked then. Send an `Idempotency-Key` to make retries safe.\n\nRequires the `ledger:write` scope (Wijzigen in Exact). Same operation as the MCP tool `create-bank-entry`.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique per write (e.g. your own id for it), at most 255 characters. A retry with the same key and body gets the first response again (header `Idempotent-Replayed: true`) instead of a second write; the same key with another body answers `422 idempotency_key_reused`, and a retry while the first request still runs `409 idempotency_in_progress`. Kept for 7 days.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"journalCode":{"type":"string","minLength":1,"description":"Bank or credit card journal code"},"financialYear":{"description":"Financial year; from the line dates when omitted","type":"integer","minimum":1900,"maximum":9999},"financialPeriod":{"description":"Financial period; from the line dates when omitted","type":"integer","minimum":1,"maximum":99},"currency":{"description":"ISO 4217 currency; the journal's currency when omitted","type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"ledgerAccount":{"type":"string","minLength":1,"description":"Ledger account id (lac_…) or account code, e.g. 4000"},"amount":{"type":"number","description":"Amount; positive = received, negative = paid"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Date (YYYY-MM-DD)"},"contactId":{"description":"Contact id (con_…), or the remoteId create-supplier just returned","type":"string","minLength":1},"description":{"description":"Line description","type":"string","maxLength":255},"taxRateCode":{"description":"VAT code","type":"string","minLength":1}},"required":["ledgerAccount","amount","date"],"additionalProperties":false},"description":"Entry lines"}},"required":["journalCode","lines"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"message":{"type":"string"},"confirmation":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"summary":{"type":"string"},"expiresInSeconds":{"type":"number"}},"required":["token","summary","expiresInSeconds"],"additionalProperties":false},{"type":"null"}]},"entry":{"anyOf":[{"type":"object","properties":{"ledgerId":{"type":"string"},"remoteId":{"type":"string","description":"Entry key in the package"},"entryNumber":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Booking number in the package"}},"required":["ledgerId","remoteId","entryNumber"],"additionalProperties":false},{"type":"null"}]}},"required":["created","message","confirmation","entry"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/source":{"get":{"operationId":"get-administration-source","summary":"Source of an administration","description":"Which accounting package feeds the administration, the linked division, the last sync and any error. Unlike the other administration routes this also answers before a package is linked (`source: none`).\n\nA product shows this next to its own connect button: an admin of the administration connects Exact Online by opening `/connect/exact?administrationId=…&returnUrl=…` on AskLedger (see the API overview), or uploads an auditfile (`…/auditfiles`). The source is linked once per administration and every product that includes the administration sees it.\n\nFor an auditfile source (`source: auditfile`) the answer has the latest upload (`auditfile`), the period all processed files cover (`dataAvailableFrom`/`dataAvailableTo`) and, when the latest upload failed, `error.code` `auditfile_failed`. An administration has one source: it is fed by Exact Online or by auditfiles, not both.\n\nOther LedgerSuite products call this with their own client_credentials token (scope `askledger:read`) for administrations that include them; company group API keys and OAuth tokens work too. Requires the `ledger:read` scope.","tags":["Administrations"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"administrationId":{"type":"string"},"source":{"type":"string","enum":["exact","auditfile","none"],"description":"Accounting package that feeds the administration; `none` until one is linked"},"status":{"type":"string","enum":["not_connected","pending","syncing","synced","error"],"description":"`pending`: linked, first sync (or first auditfile) not finished yet; `syncing`: a newer auditfile is being imported"},"division":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"Key in the package (Exact: division code)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["code","name"],"additionalProperties":false},{"type":"null"}],"description":"Exact only"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When data was last fetched from the package, or the last auditfile was processed (ISO 8601)"},"dataAvailableFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auditfile: start of the earliest processed file's period (YYYY-MM-DD); null for Exact"},"dataAvailableTo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auditfile: end of the latest processed file's period (YYYY-MM-DD); null for Exact"},"auditfile":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"status":{"type":"string","enum":["awaiting_upload","queued","processing","processed","failed"]},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]},"uploadedAt":{"type":"string"},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","fileName","status","periodStart","periodEnd","uploadedAt","processedAt"],"additionalProperties":false},{"type":"null"}],"description":"Auditfile: the most recent completed upload (see GET …/auditfiles/{id} for its issues)"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["reauth_required","sync_failed","auditfile_failed"],"description":"`reauth_required`: an admin must connect the package again (the same connect flow); `auditfile_failed`: the latest auditfile was rejected or failed (earlier data stays)"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["code","message","at"],"additionalProperties":false},{"type":"null"}]}},"required":["administrationId","source","status","division","lastSyncedAt","dataAvailableFrom","dataAvailableTo","auditfile","error"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/auditfiles":{"post":{"operationId":"create-auditfile-upload","summary":"Start an auditfile upload","description":"Starts an upload of an XML Auditfile Financieel (XAF 3.2 or 4.0) for the administration and returns a presigned URL. PUT the file's bytes to `upload.url` (no Authorization header, valid for an hour), then call complete.\n\nAn administration has one source: when Exact Online feeds it this answers `409 source_conflict`. Connecting Exact later replaces the auditfile source.\n\nOther LedgerSuite products call this with their own client_credentials token with scope `askledger:auditfile`, for administrations that include them. An AskLedger admin of the administration (company group owner or admin, or AskLedger role `admin`) can call it signed in to AskLedger, or with an OAuth token that has `ledger:write` (Pro and Enterprise). API keys cannot upload.","tags":["Auditfiles"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":500,"description":"Name of the file, shown in the source status"}},"required":["fileName"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created: upload the file to `upload.url`","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"auditfile":{"$ref":"#/components/schemas/Auditfile"},"upload":{"type":"object","properties":{"method":{"type":"string","const":"PUT"},"url":{"type":"string","description":"PUT the file's bytes here, without Authorization header"},"expiresAt":{"type":"string"}},"required":["method","url","expiresAt"],"additionalProperties":false}},"required":["auditfile","upload"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem","description":"`source_conflict` (Exact Online feeds the administration), `file_missing` (nothing uploaded yet), `invalid_state` (the upload failed) or `limit_reached` (the plan has no room for another administration)"},"429":{"$ref":"#/components/responses/Problem"}}},"get":{"operationId":"list-auditfiles","summary":"List auditfiles","description":"The administration's 50 most recent uploads, newest first.\n\nOther LedgerSuite products call this with their own client_credentials token with scope `askledger:auditfile`, for administrations that include them. An AskLedger admin of the administration (company group owner or admin, or AskLedger role `admin`) can call it signed in to AskLedger, or with an OAuth token that has `ledger:write` (Pro and Enterprise). API keys cannot upload.","tags":["Auditfiles"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Auditfile"}}},"required":["items"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/auditfiles/{auditfileId}":{"get":{"operationId":"get-auditfile","summary":"Get an auditfile","description":"Status of an upload: the period the file covers, the import's progress, counts, and errors or warnings.\n\nOther LedgerSuite products call this with their own client_credentials token with scope `askledger:auditfile`, for administrations that include them. An AskLedger admin of the administration (company group owner or admin, or AskLedger role `admin`) can call it signed in to AskLedger, or with an OAuth token that has `ledger:write` (Pro and Enterprise). API keys cannot upload.","tags":["Auditfiles"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"auditfileId","in":"path","required":true,"description":"Auditfile id (auf_…)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"auf_…"},"administrationId":{"type":"string"},"fileName":{"type":"string"},"status":{"type":"string","enum":["awaiting_upload","queued","processing","processed","failed"],"description":"`awaiting_upload`: PUT the file to the upload URL, then complete; `queued`/`processing`: being imported; `processed`: the data is available; `failed`: see `error`"},"sizeBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"XAF version: 3.2 or 4.0"},"fiscalYear":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"From the header, e.g. 2025 or 2025-2026"},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start of the period the file covers (YYYY-MM-DD)"},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the period the file covers (YYYY-MM-DD)"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"kvkNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"KvK number in the file's header"},"software":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Accounting package that made the file"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["file_missing","file_too_large","invalid_file","kvk_mismatch","validation_failed","source_conflict","import_failed"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"issues":{"type":"array","items":{"$ref":"#/components/schemas/AuditfileIssue"},"description":"Errors and warnings found in the file (at most 100)"},"counts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Imported records: relations, ledgerAccounts, vatCodes, journals, transactions, transactionLines, openingBalanceLines"},"createdAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","administrationId","fileName","status","sizeBytes","version","fiscalYear","periodStart","periodEnd","companyName","kvkNumber","software","error","issues","counts","createdAt","completedAt","processedAt"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/administrations/{administrationId}/auditfiles/{auditfileId}/complete":{"post":{"operationId":"complete-auditfile-upload","summary":"Complete an auditfile upload","description":"Checks the uploaded file and queues the import. The file must be a readable XAF 3.2 or 4.0 file of at most 2 GB, and the KvK number in its header must match the administration's in LedgerSuite: a mismatch answers `422 kvk_mismatch`. Without a KvK number on either side the file is accepted with a warning in `issues`.\n\nThe import runs in the background: poll the auditfile or the administration's source until `status` is `processed` or `failed`. A new file replaces the entries of the period it covers; relations, ledger accounts, journals and VAT codes are updated. The opening balance counts only when no earlier period was uploaded. Entries that do not balance reject the file (`validation_failed`); the previous data then stays.\n\nCalling complete again for a queued or processed upload returns it unchanged.\n\nOther LedgerSuite products call this with their own client_credentials token with scope `askledger:auditfile`, for administrations that include them. An AskLedger admin of the administration (company group owner or admin, or AskLedger role `admin`) can call it signed in to AskLedger, or with an OAuth token that has `ledger:write` (Pro and Enterprise). API keys cannot upload.","tags":["Auditfiles"],"parameters":[{"name":"administrationId","in":"path","required":true,"description":"LedgerSuite administration id; its linked ledger is used","schema":{"type":"string"}},{"name":"auditfileId","in":"path","required":true,"description":"Auditfile id (auf_…)","schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted: the import is queued","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"auf_…"},"administrationId":{"type":"string"},"fileName":{"type":"string"},"status":{"type":"string","enum":["awaiting_upload","queued","processing","processed","failed"],"description":"`awaiting_upload`: PUT the file to the upload URL, then complete; `queued`/`processing`: being imported; `processed`: the data is available; `failed`: see `error`"},"sizeBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"XAF version: 3.2 or 4.0"},"fiscalYear":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"From the header, e.g. 2025 or 2025-2026"},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start of the period the file covers (YYYY-MM-DD)"},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the period the file covers (YYYY-MM-DD)"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"kvkNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"KvK number in the file's header"},"software":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Accounting package that made the file"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["file_missing","file_too_large","invalid_file","kvk_mismatch","validation_failed","source_conflict","import_failed"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"issues":{"type":"array","items":{"$ref":"#/components/schemas/AuditfileIssue"},"description":"Errors and warnings found in the file (at most 100)"},"counts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Imported records: relations, ledgerAccounts, vatCodes, journals, transactions, transactionLines, openingBalanceLines"},"createdAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","administrationId","fileName","status","sizeBytes","version","fiscalYear","periodStart","periodEnd","companyName","kvkNumber","software","error","issues","counts","createdAt","completedAt","processedAt"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"402":{"$ref":"#/components/responses/Problem","description":"The company group's plan has no API access (Pro and Enterprise only)"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem","description":"`source_conflict` (Exact Online feeds the administration), `file_missing` (nothing uploaded yet), `invalid_state` (the upload failed) or `limit_reached` (the plan has no room for another administration)"},"413":{"$ref":"#/components/responses/Problem","description":"`file_too_large`"},"422":{"$ref":"#/components/responses/Problem","description":"`kvk_mismatch` or `invalid_file`; the problem's `auditfile` has the details"},"429":{"$ref":"#/components/responses/Problem"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A company group API key (al_live_…, created at /dashboard/api), an OAuth access token from the same authorization flow MCP clients use, or (other LedgerSuite products, /administrations routes only) a LedgerSuite client_credentials token."}},"schemas":{"Contact":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger contact id (con_…)","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"supported","source":"AskLedger","note":"AskLedger-id. Boekingen en regels krijgen bij een nieuw bestand voor dezelfde periode nieuwe id's; stamgegevens houden hun id."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.ID"},"auditfile":{"level":"supported","source":"customerSupplier/custSupID"}}},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.Code"},"auditfile":{"level":"supported","source":"customerSupplier/custSupID"}}},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.Name"},"auditfile":{"level":"supported","source":"customerSupplier/custSupName"}}},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.Email"},"auditfile":{"level":"supported","source":"customerSupplier/eMail"}}},"kvk":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.ChamberOfCommerce"},"auditfile":{"level":"partial","source":"customerSupplier/commerceNr","note":"Alleen als het 8 cijfers zijn."}},"description":"Auditfile (XAF): partially supported."},"vatNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"unsupported","note":"Exact levert het btw-nummer van een relatie niet via de gebruikte synchronisatie-endpoints."},"auditfile":{"level":"supported","source":"customerSupplier/taxRegIdent"}},"description":"Exact Online: not available."},"isCustomer":{"type":"boolean","x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.IsSales"},"auditfile":{"level":"supported","source":"customerSupplier/custSupTp","note":"C of B."}}},"isSupplier":{"type":"boolean","x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.IsSupplier"},"auditfile":{"level":"supported","source":"customerSupplier/custSupTp","note":"S of B."}}},"blocked":{"type":"boolean","x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.Blocked"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen blokkering van relaties."}},"description":"Auditfile (XAF): not available."},"ibans":{"type":"array","items":{"type":"string"},"description":"Bank account numbers (IBANs) of the contact, upper case without spaces. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"BankAccounts.IBAN","note":"Alle niet-geblokkeerde bankrekeningen van de relatie, in hoofdletters zonder spaties; zonder IBAN het rekeningnummer."},"auditfile":{"level":"unsupported","note":"customerSupplier/bankAccount wordt (nog) niet overgenomen."}}},"remoteStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Raw status in the package. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.Status","note":"C = klant, A = geen, P = prospect, S = suspect."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen relatiestatus."}}},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"Accounts.Modified"},"auditfile":{"level":"unsupported","note":"Een auditfile heeft geen wijzigingsdatum per record; `updatedAt` laat zien wanneer het bestand verwerkt is."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"}},"required":["id","remoteId","code","name","email","kvk","vatNumber","isCustomer","isSupplier","blocked","ibans","remoteStatus","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"Customer and/or supplier"},"Invoice":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger invoice id (inv_…). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices.InvoiceID / PurchaseEntries.EntryID"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"type":{"type":"string","enum":["sales","purchase"],"x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"sales uit verkoopfacturen, purchase uit inkoopboekingen."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"documentType":{"type":"string","enum":["invoice","credit_note"],"x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices.Type / PurchaseEntries.Type"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"status":{"type":"string","enum":["draft","pending","posted","rejected","unknown"],"description":"Processing status in the package: draft, pending (entered, not processed), posted (processed in the books), rejected. Not the payment status. Exact Online: partially supported; Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"partial","source":"SalesInvoices.Status / PurchaseEntries.Status","note":"Geeft de verwerkingsstatus in Exact weer (concept, open, verwerkt), niet of de factuur betaald is."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}}},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices.InvoiceNumber / PurchaseEntries.InvoiceNumber","note":"Bij inkoop het factuurnummer van de leverancier, anders het boekstuknummer in Exact."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"partial","source":"SalesInvoices.InvoiceTo / PurchaseEntries.Supplier","note":"Leeg zolang de relatie nog niet gesynchroniseerd is."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Exact Online: partially supported; Auditfile (XAF): not available."},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices.InvoiceToName / PurchaseEntries.SupplierName"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices.InvoiceDate / PurchaseEntries.EntryDate"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}}},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices.DueDate / PurchaseEntries.DueDate"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}}},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices.Currency / PurchaseEntries.Currency"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"totalAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total in the invoice currency; credit notes are negative. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AmountFC","note":"Factuur positief, creditnota negatief. Exact boekt inkoop met het omgekeerde teken; AskLedger draait dat om."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}}},"totalAmountBase":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Total in the ledger's base currency. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AmountDC","note":"Zelfde teken als totalAmount."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}}},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"YourRef"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Description"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"journalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Journal"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"paymentTermCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"partial","source":"SalesInvoices.PaymentCondition","note":"Alleen bij verkoopfacturen."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Exact Online: partially supported; Auditfile (XAF): not available."},"remoteStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Status"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"remoteType":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Type"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}},"description":"Auditfile (XAF): not available."},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"SalesInvoices / PurchaseEntries.Modified"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen facturen (alleen de boekingen ervan, zie Transaction)."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"},"lines":{"description":"Invoice lines, ordered by lineNumber","type":"array","items":{"$ref":"#/components/schemas/InvoiceLine"}}},"required":["id","remoteId","type","documentType","status","number","contactId","contactName","issueDate","dueDate","currency","totalAmount","totalAmountBase","reference","description","journalCode","paymentTermCode","remoteStatus","remoteType","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"Sales or purchase invoice"},"InvoiceLine":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger line id (iln_…). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}}},"invoiceId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"lineNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"x-askledger-coverage":{"exact":{"level":"supported","source":"LineNumber"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Description"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"partial","source":"Item","note":"Leeg bij regels zonder artikel (bij inkoop gebruikelijk)."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Exact Online: partially supported; Auditfile (XAF): not available."},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"ItemCode"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Quantity"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"unitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"partial","source":"SalesInvoices.UnitCode","note":"Alleen bij verkoopfacturen."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Exact Online: partially supported; Auditfile (XAF): not available."},"unitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price per unit excl. VAT. Exact Online: partially supported; Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"partial","source":"SalesInvoices.UnitPrice","note":"Alleen bij verkoopfacturen."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}}},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Fraction: 0.1 = 10%. Exact Online: partially supported; Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"partial","source":"SalesInvoices.Discount","note":"Alleen bij verkoopfacturen."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}}},"netAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Line amount excl. VAT, invoice currency. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AmountFC"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}}},"netAmountBase":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Line amount excl. VAT, base currency. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AmountDC"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}}},"taxRateCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"VATCode"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"taxCategory":{"anyOf":[{"type":"string","enum":["nl_high","nl_low","nl_reverse_charge","eu_acquisition_high","eu_acquisition_low","non_eu_import","none","zero_rated","other"]},{"type":"null"}],"description":"Fixed AskLedger VAT category of the VAT code; null when the code is not synced. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste btw-categorie, afgeleid uit naam, tarief en soort van de btw-code; per administratie te overschrijven."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}}},"taxRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Fraction: 0.21 = 21%. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"VATPercentage"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}}},"taxAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"VATAmountFC"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"taxAmountBase":{"anyOf":[{"type":"number"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"VATAmountDC"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccount"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"ledgerAccountCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"partial","source":"PurchaseEntries.GLAccountCode","note":"Bij verkoopfacturen via ledgerAccountId op te zoeken."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Exact Online: partially supported; Auditfile (XAF): not available."},"costCenter":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"CostCenter"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"costUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"CostUnit"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Auditfile (XAF): not available."},"projectCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"partial","source":"PurchaseEntries.ProjectCode","note":"Alleen bij inkoopboekingen."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen factuurregels."}},"description":"Exact Online: partially supported; Auditfile (XAF): not available."}},"required":["id","invoiceId","lineNumber","description","itemId","itemCode","quantity","unitCode","unitPrice","discount","netAmount","netAmountBase","taxRateCode","taxCategory","taxRate","taxAmount","taxAmountBase","ledgerAccountId","ledgerAccountCode","costCenter","costUnit","projectCode"],"additionalProperties":false,"description":"Line of a sales or purchase invoice"},"LedgerAccount":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger ledger account id (lac_…)","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"supported","source":"AskLedger","note":"AskLedger-id. Boekingen en regels krijgen bij een nieuw bestand voor dezelfde periode nieuwe id's; stamgegevens houden hun id."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.ID"},"auditfile":{"level":"supported","source":"ledgerAccount/accID"}}},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.Code"},"auditfile":{"level":"supported","source":"ledgerAccount/accID"}}},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.Description"},"auditfile":{"level":"supported","source":"ledgerAccount/accDesc"}}},"classification":{"type":"string","enum":["asset","liability","equity","revenue","expense","unknown"],"x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.Type","note":"Algemene rekeningen (type 90) worden ingedeeld op balanstype en debet/credit."},"auditfile":{"level":"partial","source":"RGScode (4.0) / leadReference (3.2)","note":"Afgeleid van de RGS-code; zonder RGS-code `unknown`."}},"description":"Auditfile (XAF): partially supported."},"kind":{"type":"string","enum":["balance","pnl","unknown"],"description":"balance sheet or profit and loss","x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.BalanceType"},"auditfile":{"level":"supported","source":"ledgerAccount/accTp","note":"B = balance, P = pnl; M (3.2, gemengd) wordt `unknown`."}}},"normalBalance":{"anyOf":[{"type":"string","enum":["debit","credit"]},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.BalanceSide"},"auditfile":{"level":"partial","note":"Afgeleid van de classificatie."}},"description":"Auditfile (XAF): partially supported."},"rgsCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RGS reference code (Referentie GrootboekSchema), e.g. WOmzNop. Exact Online: partially supported; Auditfile (XAF): partially supported.","x-askledger-coverage":{"exact":{"level":"partial","source":"GLAccountClassificationMappings.ClassificationCode","note":"Alleen als de rekening in Exact aan een RGS-code is gekoppeld."},"auditfile":{"level":"partial","source":"RGScode (4.0) / leadReference (3.2)","note":"Alleen een geldige RGS-referentiecode; een eigen verdichtingscode in leadReference wordt `null`."}}},"remoteType":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.Type"},"auditfile":{"level":"supported","source":"ledgerAccount/accTp"}}},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"GLAccounts.Modified"},"auditfile":{"level":"unsupported","note":"Een auditfile heeft geen wijzigingsdatum per record; `updatedAt` laat zien wanneer het bestand verwerkt is."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"}},"required":["id","remoteId","code","name","classification","kind","normalBalance","rgsCode","remoteType","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"General ledger account"},"BookedLineAccount":{"type":"object","properties":{"ledgerAccountCode":{"type":"string","description":"Account code, e.g. 46100"},"ledgerAccountName":{"anyOf":[{"type":"string"},{"type":"null"}]},"taxCategory":{"anyOf":[{"type":"string","enum":["nl_high","nl_low","nl_reverse_charge","eu_acquisition_high","eu_acquisition_low","non_eu_import","none","zero_rated","other"]},{"type":"null"}],"description":"VAT category used most on the matching lines; null when their VAT codes are unknown"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Matching lines booked on this account in the period"},"lastUsed":{"type":"string","description":"Date (YYYY-MM-DD) of the latest matching line"},"examples":{"type":"array","items":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}]},"date":{"type":"string","description":"Invoice date (YYYY-MM-DD)"},"netAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Line amount excl. VAT, invoice currency"}},"required":["description","contactName","date","netAmount"],"additionalProperties":false},"description":"Up to 3 most recent matching lines"}},"required":["ledgerAccountCode","ledgerAccountName","taxCategory","count","lastUsed","examples"],"additionalProperties":false,"description":"How matching lines were booked on one ledger account"},"Item":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger item id (itm_…). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"Items.ID"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Items.Code"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Items.Description"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"isSalesItem":{"type":"boolean","x-askledger-coverage":{"exact":{"level":"supported","source":"Items.IsSalesItem"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"isPurchaseItem":{"type":"boolean","x-askledger-coverage":{"exact":{"level":"supported","source":"Items.IsPurchaseItem"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Items.Unit"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"salesTaxRateCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Items.SalesVatCode"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Items.GLRevenue"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}},"description":"Auditfile (XAF): not available."},"activeUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"Items.EndDate"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}}},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"Items.Modified"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen artikelen."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"}},"required":["id","remoteId","code","name","isSalesItem","isPurchaseItem","unit","salesTaxRateCode","revenueAccountId","activeUntil","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"Article, product or service"},"TaxRate":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger tax rate id (tax_…)","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"supported","source":"AskLedger","note":"AskLedger-id. Boekingen en regels krijgen bij een nieuw bestand voor dezelfde periode nieuwe id's; stamgegevens houden hun id."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"VATCodes.ID"},"auditfile":{"level":"supported","source":"vatCode/vatID"}}},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"VATCodes.Code"},"auditfile":{"level":"supported","source":"vatCode/vatID"}}},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"VATCodes.Description"},"auditfile":{"level":"supported","source":"vatCode/vatDesc"}}},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Fraction: 0.21 = 21%. Auditfile (XAF): partially supported.","x-askledger-coverage":{"exact":{"level":"supported","source":"VATCodes.Percentage"},"auditfile":{"level":"partial","source":"trLine/vat/vatPerc","note":"De btw-code zelf heeft geen percentage; AskLedger neemt het eerste percentage dat in de boekingsregels bij de code staat."}}},"remoteType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"VAT type in the package (Exact: I = incl. VAT, E/B = excl., N = no VAT). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"VATCodes.Type","note":"I = inclusief btw; E en B = exclusief (B onder meer voor verlegd/0%); N = geen btw."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen btw-soort."}}},"taxCategory":{"type":"string","enum":["nl_high","nl_low","nl_reverse_charge","eu_acquisition_high","eu_acquisition_low","non_eu_import","none","zero_rated","other"],"description":"Fixed AskLedger VAT category: nl_high = Dutch input VAT, high rate (21%), deductible; nl_low = Dutch input VAT, low rate (9%), deductible; nl_reverse_charge = Domestic reverse charge (BTW verlegd); eu_acquisition_high = Acquisitions/services from within the EU, high rate; eu_acquisition_low = Acquisitions/services from within the EU, low rate; non_eu_import = Acquisitions/services from outside the EU (import); none = No VAT, or non-deductible VAT booked gross on this code; zero_rated = 0%, base amount only; other = Anything else (private use, other rates, sales codes); not bookable through AskLedger","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste btw-categorie, afgeleid uit naam, tarief en soort van de btw-code; per administratie te overschrijven."},"auditfile":{"level":"supported","source":"AskLedger","note":"Vaste btw-categorie, afgeleid uit naam en tarief van de btw-code; per administratie te overschrijven."}}},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Exact Online: not available; Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"unsupported","note":"Deze lijst wordt in zijn geheel ververst; Exact geeft geen wijzigingsdatum mee."},"auditfile":{"level":"unsupported","note":"Een auditfile heeft geen wijzigingsdatum per record; `updatedAt` laat zien wanneer het bestand verwerkt is."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"}},"required":["id","remoteId","code","name","rate","remoteType","taxCategory","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"VAT rate"},"PaymentTerm":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger payment term id (pmt_…). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen betalingscondities."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"PaymentConditions.ID"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen betalingscondities."}},"description":"Auditfile (XAF): not available."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"PaymentConditions.Code"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen betalingscondities."}},"description":"Auditfile (XAF): not available."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"PaymentConditions.Description"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen betalingscondities."}},"description":"Auditfile (XAF): not available."},"days":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"PaymentConditions.PaymentDays"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen betalingscondities."}},"description":"Auditfile (XAF): not available."},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Exact Online: not available; Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"unsupported","note":"Deze lijst wordt in zijn geheel ververst; Exact geeft geen wijzigingsdatum mee."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen betalingscondities."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"}},"required":["id","remoteId","code","name","days","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"Payment term"},"Journal":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger journal id (jnl_…)","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"supported","source":"AskLedger","note":"AskLedger-id. Boekingen en regels krijgen bij een nieuw bestand voor dezelfde periode nieuwe id's; stamgegevens houden hun id."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.ID"},"auditfile":{"level":"supported","source":"journal/jrnID"}}},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.Code"},"auditfile":{"level":"supported","source":"journal/jrnID"}}},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.Description"},"auditfile":{"level":"supported","source":"journal/desc"}}},"type":{"type":"string","enum":["sales","purchase","bank","cash","general","other"],"x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.Type"},"auditfile":{"level":"supported","source":"journal/jrnTp","note":"B = bank, C = cash, S = sales, P = purchase, M en O (beginbalans) = general, overige = other."}}},"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Bank and cash journals: the ledger account (lac_…) holding the money; null for other journals. Auditfile (XAF): partially supported.","x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.GLAccount","note":"Alleen bij bank-, kas- en betaaldienstdagboeken: de rekening waarop het geld staat."},"auditfile":{"level":"partial","source":"journal/offsetAccID","note":"Bank- en kasdagboeken. Zonder offsetAccID neemt AskLedger de rekening die in elke boeking van het dagboek voorkomt."}}},"blocked":{"type":"boolean","x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.IsBlocked"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen blokkering van dagboeken."}},"description":"Auditfile (XAF): not available."},"remoteType":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.Type"},"auditfile":{"level":"supported","source":"journal/jrnTp"}}},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Exact Online: not available; Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"unsupported","note":"Deze lijst wordt in zijn geheel ververst; Exact geeft geen wijzigingsdatum mee."},"auditfile":{"level":"unsupported","note":"Een auditfile heeft geen wijzigingsdatum per record; `updatedAt` laat zien wanneer het bestand verwerkt is."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"}},"required":["id","remoteId","code","name","type","ledgerAccountId","blocked","remoteType","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"Journal (dagboek)"},"OpenItem":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger open item id (opi_…). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.HID / PayablesList.HID"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}},"description":"Auditfile (XAF): not available."},"type":{"type":"string","enum":["receivable","payable"],"description":"receivable: the customer still has to pay; payable: still to pay the supplier. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"receivable uit ReceivablesList, payable uit PayablesList."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Customer or supplier contact id (con_…). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.AccountId / PayablesList.AccountId"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"contactCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.AccountCode / PayablesList.AccountCode"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}},"description":"Auditfile (XAF): not available."},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.AccountName / PayablesList.AccountName"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}},"description":"Auditfile (XAF): not available."},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Invoice number (matches search-invoices); null for a payment not yet matched to an invoice. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.InvoiceNumber / PayablesList.InvoiceNumber","note":"Leeg voor een betaling die nog niet aan een factuur is gekoppeld."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Invoice date, or payment date for an unmatched payment (YYYY-MM-DD). Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.InvoiceDate / PayablesList.InvoiceDate"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.DueDate / PayablesList.DueDate"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"daysOverdue":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Days past the due date as of today; 0 or negative = not overdue. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Berekend uit de vervaldatum op het moment van opvragen."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.CurrencyCode / PayablesList.CurrencyCode"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}},"description":"Auditfile (XAF): not available."},"openAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Amount still open in the item's currency. Positive = still to be received/paid; negative = credit note or payment not yet matched to an invoice. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.Amount / PayablesList.Amount","note":"In de valuta van de post; Exact levert geen bedrag in de basisvaluta."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"amountInTransit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Part of the open amount the bank has been asked to pay or collect. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.AmountInTransit / PayablesList.AmountInTransit"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your reference of the invoice. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.YourRef / PayablesList.YourRef"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.Description / PayablesList.Description"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}},"description":"Auditfile (XAF): not available."},"journalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"ReceivablesList.JournalCode / PayablesList.JournalCode"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}},"description":"Auditfile (XAF): not available."},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Exact Online: not available; Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"unsupported","note":"Deze lijst wordt in zijn geheel ververst; Exact geeft geen wijzigingsdatum mee."},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen lijst met openstaande posten."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"}},"required":["id","remoteId","type","contactId","contactCode","contactName","number","issueDate","dueDate","daysOverdue","currency","openAmount","amountInTransit","reference","description","journalCode","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"Outstanding item (openstaande post) of a customer or supplier"},"Transaction":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger transaction id (trx_…)","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"supported","source":"AskLedger","note":"AskLedger-id. Boekingen en regels krijgen bij een nieuw bestand voor dezelfde periode nieuwe id's; stamgegevens houden hun id."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.EntryID"},"auditfile":{"level":"supported","source":"AskLedger","note":"`<auditfile-id>:<jrnID>:<nr>`; de openingsbalans `<auditfile-id>:opening`."}}},"entryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Entry (boekstuk) number in the package","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.EntryNumber"},"auditfile":{"level":"supported","source":"transaction/nr"}}},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Date"},"auditfile":{"level":"supported","source":"transaction/trDt","note":"De openingsbalans krijgt de dag vóór de periode van het bestand."}}},"financialYear":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.FinancialYear"},"auditfile":{"level":"supported","source":"header/fiscalYear","note":"Eerste jaartal bij een gebroken boekjaar."}}},"financialPeriod":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.FinancialPeriod"},"auditfile":{"level":"supported","source":"transaction/periodNumber","note":"0 voor de openingsbalans."}}},"journalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.JournalCode"},"auditfile":{"level":"supported","source":"journal/jrnID"}}},"journalType":{"anyOf":[{"type":"string","enum":["sales","purchase","bank","cash","general","other"]},{"type":"null"}],"description":"Type of the journal; null when unknown","x-askledger-coverage":{"exact":{"level":"supported","source":"Journals.Type","note":"Via het dagboek van de boeking; leeg als het dagboek (nog) niet gesynchroniseerd is, zoals bij een beginbalans zonder dagboek."},"auditfile":{"level":"supported","source":"journal/jrnTp"}}},"status":{"type":"string","enum":["pending","posted","unknown"],"description":"pending = entered but not processed in the package, posted = processed","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Status","note":"20 = pending, 50 = posted."},"auditfile":{"level":"supported","source":"AskLedger","note":"Altijd `posted`: een auditfile bevat verwerkte boekingen."}}},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Description","note":"Exact kent geen boekingskop in deze feed: de eerste regel met een omschrijving."},"auditfile":{"level":"supported","source":"transaction/desc","note":"Anders de eerste regelomschrijving."}}},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Account","note":"De eerste regel met een relatie."},"auditfile":{"level":"supported","source":"trLine/custSupID","note":"Van de eerste regel met een relatie."}}},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.AccountName"},"auditfile":{"level":"supported","source":"customerSupplier/custSupName"}}},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.InvoiceNumber"},"auditfile":{"level":"supported","source":"trLine/invRef","note":"Van de eerste regel met een factuurnummer."}}},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.YourRef"},"auditfile":{"level":"supported","source":"trLine/docRef","note":"Van de eerste regel met een documentnummer."}}},"remoteType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transaction type in the package (Exact: 10 = opening balance, 20 = sales, 40 = cash flow, …)","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Type","note":"Bijvoorbeeld 10 = beginbalans, 20 = verkoopboeking, 30 = inkoopboeking, 40 = kasstroom (bank/kas), 90 = overig."},"auditfile":{"level":"supported","source":"journal/jrnTp","note":"`opening` voor de openingsbalans en beginbalansdagboeken."}}},"remoteUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 timestamp. Auditfile (XAF): not available.","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Modified"},"auditfile":{"level":"unsupported","note":"Een auditfile heeft geen wijzigingsdatum per record; `updatedAt` laat zien wanneer het bestand verwerkt is."}}},"updatedAt":{"type":"string","description":"When AskLedger last saw this record change (ISO 8601)"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the record was deleted in the accounting package; null = not deleted"},"lines":{"description":"Lines of the transaction; their amountBase sums to zero (debit = credit)","type":"array","items":{"$ref":"#/components/schemas/TransactionLine"}}},"required":["id","remoteId","entryNumber","date","financialYear","financialPeriod","journalCode","journalType","status","description","contactId","contactName","invoiceNumber","reference","remoteType","remoteUpdatedAt","updatedAt","deletedAt"],"additionalProperties":false,"description":"General ledger transaction (boeking) with its lines"},"TransactionLine":{"type":"object","properties":{"id":{"type":"string","description":"AskLedger transaction line id (trl_…)","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste AskLedger-id, verandert niet bij een nieuwe synchronisatie."},"auditfile":{"level":"supported","source":"AskLedger","note":"AskLedger-id. Boekingen en regels krijgen bij een nieuw bestand voor dezelfde periode nieuwe id's; stamgegevens houden hun id."}}},"transactionId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.EntryID"},"auditfile":{"level":"supported","source":"AskLedger","note":"AskLedger-id. Boekingen en regels krijgen bij een nieuw bestand voor dezelfde periode nieuwe id's; stamgegevens houden hun id."}}},"remoteId":{"type":"string","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.ID"},"auditfile":{"level":"supported","source":"AskLedger","note":"Boeking-remoteId plus het volgnummer van de regel."}}},"lineNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.LineNumber"},"auditfile":{"level":"supported","source":"AskLedger","note":"Volgorde in het bestand, vanaf 1."}}},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Date"},"auditfile":{"level":"supported","source":"transaction/trDt"}}},"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.GLAccount"},"auditfile":{"level":"supported","source":"trLine/accID"}}},"ledgerAccountCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.GLAccountCode"},"auditfile":{"level":"supported","source":"trLine/accID"}}},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Debit positive, credit negative; transaction currency","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.AmountFC","note":"Debet positief, credit negatief, in de valuta van de boeking."},"auditfile":{"level":"supported","source":"trLine/currency/curAmnt, anders trLine/amnt","note":"Debet positief, credit negatief (amntTp)."}}},"amountBase":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Debit positive, credit negative; the ledger's base currency","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.AmountDC","note":"Debet positief, credit negatief, in de basisvaluta van de administratie."},"auditfile":{"level":"supported","source":"trLine/amnt + amntTp"}}},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Currency"},"auditfile":{"level":"supported","source":"trLine/currency/curCode, anders header/curCode"}}},"taxRateCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.VATCode"},"auditfile":{"level":"supported","source":"trLine/vat/vatID"}}},"taxCategory":{"anyOf":[{"type":"string","enum":["nl_high","nl_low","nl_reverse_charge","eu_acquisition_high","eu_acquisition_low","non_eu_import","none","zero_rated","other"]},{"type":"null"}],"description":"Fixed AskLedger VAT category of the VAT code; null when the code is not synced","x-askledger-coverage":{"exact":{"level":"supported","source":"AskLedger","note":"Vaste btw-categorie, afgeleid uit naam, tarief en soort van de btw-code; per administratie te overschrijven."},"auditfile":{"level":"supported","source":"AskLedger","note":"Vaste btw-categorie, afgeleid uit naam, tarief en soort van de btw-code; per administratie te overschrijven."}}},"taxAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"VAT amount in the transaction currency","x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.AmountVATFC"},"auditfile":{"level":"supported","source":"trLine/vat/vatAmnt + vatAmntTp"}}},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Account"},"auditfile":{"level":"supported","source":"trLine/custSupID"}}},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.Description"},"auditfile":{"level":"supported","source":"trLine/desc"}}},"costCenter":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.CostCenter"},"auditfile":{"level":"supported","source":"trLine/costID (3.2) / cost (4.0)"}}},"costUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.CostUnit"},"auditfile":{"level":"unsupported","note":"Een auditfile bevat geen kostendrager als apart veld."}},"description":"Auditfile (XAF): not available."},"projectCode":{"anyOf":[{"type":"string"},{"type":"null"}],"x-askledger-coverage":{"exact":{"level":"supported","source":"TransactionLines.ProjectCode"},"auditfile":{"level":"supported","source":"trLine/projID (3.2) / project (4.0)"}}}},"required":["id","transactionId","remoteId","lineNumber","date","ledgerAccountId","ledgerAccountCode","amount","amountBase","currency","taxRateCode","taxCategory","taxAmount","contactId","description","costCenter","costUnit","projectCode"],"additionalProperties":false,"description":"Line of a general ledger transaction on one ledger account (grootboekmutatie)"},"AccountBalance":{"type":"object","properties":{"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"classification":{"anyOf":[{"type":"string","enum":["asset","liability","equity","revenue","expense","unknown"]},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["balance","pnl","unknown"]},{"type":"null"}]},"rgsCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RGS reference code"},"openingBalance":{"type":"number","description":"Balance before the first month (debit positive)"},"closingBalance":{"type":"number","description":"Balance at the end of the last month (debit positive)"},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM"},"openingBalance":{"type":"number"},"debit":{"type":"number"},"credit":{"type":"number"},"movement":{"type":"number","description":"debit − credit"},"closingBalance":{"type":"number","description":"Balance at the end of the month (debit positive)"}},"required":["month","openingBalance","debit","credit","movement","closingBalance"],"additionalProperties":false},"description":"Every month of the range, also without movements"}},"required":["ledgerAccountId","code","name","classification","kind","rgsCode","openingBalance","closingBalance","months"],"additionalProperties":false,"description":"Balance of one ledger account per month"},"CashFlowMonth":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM"},"openingBalance":{"type":"number"},"inflow":{"type":"number","description":"Money received (positive)"},"outflow":{"type":"number","description":"Money paid (positive)"},"net":{"type":"number","description":"inflow − outflow"},"closingBalance":{"type":"number","description":"Bank and cash balance at the end of the month"}},"required":["month","openingBalance","inflow","outflow","net","closingBalance"],"additionalProperties":false,"description":"Money in and out of bank and cash accounts in one month"},"ProfitAndLossGroup":{"type":"object","properties":{"code":{"type":"string","description":"RGS rubriek (level 2, e.g. WOmz), or unmapped-revenue / unmapped-expense for accounts without an RGS code"},"name":{"type":"string"},"accounts":{"type":"array","items":{"type":"object","properties":{"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"rgsCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"amounts":{"type":"array","items":{"type":"number"},"description":"Per month of `months`: revenue positive, costs negative"},"total":{"type":"number","description":"Sum of amounts"}},"required":["ledgerAccountId","code","name","rgsCode","amounts","total"],"additionalProperties":false}},"totals":{"type":"array","items":{"type":"number"},"description":"Per month: sum of the accounts"},"total":{"type":"number"}},"required":["code","name","accounts","totals","total"],"additionalProperties":false,"description":"One RGS rubriek of the profit and loss statement"},"BalanceSheetGroup":{"type":"object","properties":{"code":{"type":"string","description":"RGS rubriek (level 2, e.g. BLim), or unmapped-assets / unmapped-liabilities for accounts without an RGS code"},"name":{"type":"string"},"side":{"type":"string","enum":["assets","liabilities"]},"accounts":{"type":"array","items":{"type":"object","properties":{"ledgerAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null for the result that is not yet distributed"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"rgsCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"opening":{"type":"number","description":"Balance before the first month"},"amounts":{"type":"array","items":{"type":"number"},"description":"Per month of `months`: the balance at the end of the month"}},"required":["ledgerAccountId","code","name","rgsCode","opening","amounts"],"additionalProperties":false}},"totals":{"type":"object","properties":{"opening":{"type":"number","description":"Balance before the first month"},"amounts":{"type":"array","items":{"type":"number"},"description":"Per month of `months`: the balance at the end of the month"}},"required":["opening","amounts"],"additionalProperties":false,"description":"Sum of the accounts"}},"required":["code","name","side","accounts","totals"],"additionalProperties":false,"description":"One RGS rubriek of the balance sheet; assets debit positive, liabilities credit positive"},"CashFlowStatementSection":{"type":"object","properties":{"code":{"type":"string","enum":["operating","investing","financing"]},"name":{"type":"string"},"amounts":{"type":"array","items":{"type":"number"},"description":"Per month of `months`: money in positive, out negative"},"total":{"type":"number","description":"Sum of amounts"},"lines":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"amounts":{"type":"array","items":{"type":"number"},"description":"Per month of `months`: money in positive, out negative"},"total":{"type":"number","description":"Sum of amounts"}},"required":["code","name","amounts","total"],"additionalProperties":false},"description":"result, depreciation, inventories, receivables, currentLiabilities, provisions, unmapped (operating); fixedAssets, securities (investing); equity, longTermDebt (financing). Lines that are 0 in every month are left out, except result."}},"required":["code","name","amounts","total","lines"],"additionalProperties":false,"description":"Operating, investing or financing activities"},"AuditfileIssue":{"type":"object","properties":{"code":{"type":"string","description":"e.g. kvk_mismatch, transaction_unbalanced, total_debit_mismatch, administration_kvk_missing"},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string"},"line":{"description":"Line in the file (1-based), for issues in the file","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","severity","message"],"additionalProperties":false},"Auditfile":{"type":"object","properties":{"id":{"type":"string","description":"auf_…"},"administrationId":{"type":"string"},"fileName":{"type":"string"},"status":{"type":"string","enum":["awaiting_upload","queued","processing","processed","failed"],"description":"`awaiting_upload`: PUT the file to the upload URL, then complete; `queued`/`processing`: being imported; `processed`: the data is available; `failed`: see `error`"},"sizeBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"XAF version: 3.2 or 4.0"},"fiscalYear":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"From the header, e.g. 2025 or 2025-2026"},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start of the period the file covers (YYYY-MM-DD)"},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the period the file covers (YYYY-MM-DD)"},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"kvkNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"KvK number in the file's header"},"software":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Accounting package that made the file"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["file_missing","file_too_large","invalid_file","kvk_mismatch","validation_failed","source_conflict","import_failed"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"issues":{"type":"array","items":{"$ref":"#/components/schemas/AuditfileIssue"},"description":"Errors and warnings found in the file (at most 100)"},"counts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Imported records: relations, ledgerAccounts, vatCodes, journals, transactions, transactionLines, openingBalanceLines"},"createdAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","administrationId","fileName","status","sizeBytes","version","fiscalYear","periodStart","periodEnd","companyName","kvkNumber","software","error","issues","counts","createdAt","completedAt","processedAt"],"additionalProperties":false},"Problem":{"type":"object","description":"RFC 9457 problem details","properties":{"type":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string","description":"Stable error code, e.g. unauthorized, invalid_token, plan_required, insufficient_scope, ledger_not_found, administration_not_found, ledger_not_linked, product_not_enabled, unknown_product, administration_required, invalid_request, invalid_cursor, rate_limited; auditfiles: source_conflict, file_missing, file_too_large, invalid_file, kvk_mismatch, invalid_state, limit_reached, auditfile_not_found"},"detail":{"type":"string"}},"required":["status","code","detail"]}},"responses":{"Problem":{"description":"Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"headers":{"RateLimitLimit":{"schema":{"type":"integer"},"description":"Requests allowed per minute"},"RateLimitRemaining":{"schema":{"type":"integer"},"description":"Requests left in this minute"}}}}