---
title: "Replace the document attachments and document date of an existing booking."
method: PUT
path: "/core/latest/bookings/{id}/documents"
tags: ["Accounting"]
deprecated: true
---

# Replace the document attachments and document date of an existing booking.

`PUT /core/latest/bookings/{id}/documents`

## Request

- Base URL: `https://api.klara.ch`
- URL: `https://api.klara.ch/core/latest/bookings/{id}/documents`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer

> **Deprecated.**

This operation remains available until <b>2027-08-14</b> and is removed after that date. Use <code>PUT /core/v1/bookings/{id}/documents</code> instead.<br/><br/>Replaces the set of supporting-document identifiers and the document date stored on an existing accounting booking. The operation is a full replacement &mdash; 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 &mdash; 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.

## Path parameters

- `id` integer, required

## Query parameters

- `ignore-unsubscripted-dates` boolean

## Request body

- object: Document metadata to attach to (or replace on) an existing accounting booking.
  - `documentDate` string, date: Date printed on the underlying paper document (e.g. supplier invoice date). When omitted or null, the booking's existing documentDate is cleared.
  - `documentIds` string[]: Identifiers of supporting documents attached to the booking. Replaces the current set on the booking; pass an empty array to clear. Obtain each id by first uploading a file with POST /core/latest/companies/{company-id}/documents and then copying the returned documentId into this array.

## Response `200`

Document attachments and date applied to the booking (or accepted as a no-op when the booking does not exist on the downstream side).

## Other responses

- `400`: Data invalid<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `401`: No Authorization header found or invalid token<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `403`: The current user is not allowed to access this company data<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `410`: Gone. This operation is removed after 2027-08-14; every call after that date answers 410. Use <code>PUT /core/v1/bookings/{id}/documents</code> instead.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `429`: API rate limit exceeded<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.
- `500`: Something went wrong on our side while processing the request. Please kindly contact our support.<br/><br/>Failures detected by a downstream service carry that service's own <code>code</code>, which this reference does not enumerate, so the <code>code</code> field may hold a value not documented here. Treat an unrecognised code as a generic failure of the status it arrives with, and do not branch on a code this reference does not list.

---

[API](https://skmtc.dev/klara/apis/klara-public-api.md) · [All operations](https://skmtc.dev/klara/apis/klara-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/klara/apis/klara-public-api/revisions/490b1a879fc2?raw)
