Replace the document attachments and document date of an existing booking.
Replaces the set of supporting-document identifiers and the document date stored on an existing accounting booking. The operation is a full replacement — pass an empty <code>documentIds</code> array to clear all existing attachments, or omit <code>documentDate</code> / set it to <code>null</code> to clear it. By default the operation fails when the booking's existing <code>bookingDate</code> falls outside the active Klara Accounting subscription window; set <code>ignore-unsubscripted-dates</code> to <code>true</code> to bypass this guard. Tenant and company are derived from the bearer token — the booking <code>{id}</code> must belong to the caller's company. The caller must hold the <code>ACCOUNTING</code> permission on that company. The endpoint is idempotent: re-sending the same body produces the same state. Returns HTTP 200 with no body on success.
Request
- Base URL: https://api.klara.ch
- URL: https://api.klara.ch/core/v1/bookings/{id}/documents
- Auth: one of:
- API key in header X-API-KEY
- HTTP bearer
Path parameters
Internal id of the booking whose documents should be replaced. Obtain from the <code>id</code> field returned by <code>POST /core/v1/bookings</code>.
Query parameters
When <code>true</code>, accept the update even if the booking's <code>bookingDate</code> falls outside the active Klara Accounting subscription period. Defaults to <code>false</code>.
Request body
Example request
{
"documentDate": "2024-06-15",
"documentIds": [
"98765"
]
}Response
Document attachments and date applied to the booking (or accepted as a no-op when the booking does not exist on the downstream side).
Changes
No recorded changes to this operation across all 1 revision of this API.