BillOS v1
Console llms.txt OpenAPI
GET/businesses/{bid}/fx-rate

Bank of Israel rate for a date

GET /businesses/{bid}/fx-rate

Requires the documents scope.

The שער יציג a foreign-currency document dated date is converted at when the draft carries no fxRate of its own: the last rate the Bank of Israel published on or before that day. Show it to your user before issue; pass fxRate on the draft to use a different one. fx_rate_required (422) when there is none to be had (a future date, the service down).

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.

Query parameters

NameTypeDescription
currencystringrequiredOne of: USD, EUR, GBP, CHF, AUD, CAD.
datestringThe document date. Defaults to today, Asia/Jerusalem.

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
fxobjectrequired
fx.currencystringrequired
fx.datestringrequiredThe date asked for.
fx.ratenumberrequiredILS per 1 unit.
fx.rateDatestringrequiredThe publishing day the rate is from (≤ date).
fx.sourcestringOne of: boi.

Errors: 400, 401, 403, 404, 422, 429. Every failure answers { "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }: branch on reason, and read hint for what to change (https://docs.billos.co.il/errors.md).

GET /businesses/{bid}/fx-rate
curl -X GET "$BASE/businesses/$BID/fx-rate?currency=&date=" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/fx-rate`, {
  method: 'GET',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.get(
    f"{BASE}/businesses/{BID}/fx-rate",
    headers={"X-Api-Key": KEY},
)
data = res.json()
Set BASE to https://api.billos.co.il/v1 and KEY to your bk_live_… key, or a bk_test_… key to run it against the sandbox.
Manage your businesses, keys and webhooks in the BillOS Console.