Accounting

Get the CHF exchange rate for a currency on a given date.

Returns the Swiss National Bank reference rate that converts one unit of <code>from-currency-code</code> into CHF on <code>exchange-date</code>. When <code>from-currency-code</code> equals <code>CHF</code> (case-insensitive) the rate is always <code>1</code>. The exchange-rate table is global SNB data — the same response is returned for every tenant, so there are no tenant or company path parameters. If no rate is stored for the requested day, the downstream service transparently fetches the SNB feed for that date and persists the result; if the feed has no entry either, the most recent rate strictly before <code>exchange-date</code> is returned instead. The endpoint is a pure read for the caller — idempotent. Requires a bearer token whose principal carries the <code>ACCOUNTING</code> permission.

get/core/v1/accounting/currencies/exchange-rate

Request

  • Base URL: https://api.klara.ch
  • URL: https://api.klara.ch/core/v1/accounting/currencies/exchange-rate
  • Auth: one of:
    • API key in header X-API-KEY
    • HTTP bearer

Query parameters

exchange-datestring date required
Example:2024-09-30

Reference date for the exchange rate, expressed as an ISO-8601 calendar date (<code>yyyy-MM-dd</code>).

from-currency-codestring required
Example:EUR

ISO-4217 alpha-3 currency code of the source amount. Case-insensitive; <code>CHF</code> short-circuits to a rate of <code>1</code>.

Response

Exchange rate as a JSON number; the value <code>1</code> when <code>from-currency-code</code> is CHF.

number required

Example response

0.9421

Changes

No recorded changes to this operation across all 1 revision of this API.