start_month picks the range. The month an existing range starts in updates
that range. Any later month creates a new range that applies from the first
day of that month until the next range. A new range must start after the
latest one.
rates is the range’s whole table, not a change to it: every currency the
company uses must be listed, or the call is refused. Read the current rates
with list_exchange_rates
first and send back the ones to keep. The company currency can be left out:
its rate is always 1. A currency the company does not use yet is added to
every range at the rate given, because a currency is configured company-wide.
To set a different rate on an older range, call the tool again on that range.
The call is refused when:
- a validated statement was computed with the range’s rates, which locks them (a currency new to the company can still be added). Unvalidate those statements in the Qobra web app first.
- a new range would start over months a validated statement covers.
start_monthmatches no existing range and is not after the latest one.- a currency is listed twice, a rate is not greater than 0, or the company currency is given a rate other than 1.
unchanged, so
the same call can be sent twice.
Statements are not recalculated by this call. They convert with the new rates
at their next recalculation.
Requires write permission on company settings > currency, and multi-currency
access for the company. Refused on demonstration companies. Available only
where the Qobra write tools beta is enabled. Every write is recorded in the
audit trail as the Qobra MCP agent.
Example arguments
Parameters
Body
Body
string
required
The month the range starts,
YYYY-MM. The month an existing range starts
in (the month of its start_date in list_exchange_rates) updates that
range; any later month creates a new range from its first day.object[]
required
The range’s whole table: one rate per currency the company uses, plus any
currency to add. The company currency can be left out — its rate is always
1.
Response
Body
Body
string
The company’s own currency — the base every rate is expressed against. One
of:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN,
BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL,
BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHF, CLF, CLP, CNY,
COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD,
EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD,
GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR,
IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW,
KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL,
LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR,
MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR,
PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RMB, RON, RSD,
RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS,
SRD, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY,
TTD, TWD, TZS, UAH, UGX, USD, UYI, UYU, UZS, VEF, VND,
VUV, WON, WST, XAF, XAG, XAU, XCD, XOF, XPD, XPF, XPT,
XSU, YER, ZAR, ZMK, ZWL.object[]
All date ranges of exchange rates after the write, oldest first.
string
What the call did to the range:
created (a new range), updated (some of
its rates changed, or it gained a currency), or unchanged (it already had
these rates; nothing was written).string[]
Currencies the range did not carry before, now added at the rate given to
every range that lacked them. To set another rate on an older range, call
the tool on that range.