Riege Scope, the freight forwarding system, downloads some exchange rates on its own, the ECB's among them. The trouble starts when a rule names a rate Scope doesn't download: a tax invoice rate set by a tax authority, or a central bank other than the ECB for a non-euro company. Then someone types rates in by hand, or you build the CSV import.
This post covers that import, the direction flag that's easy to get wrong, and how to check the separate customs rates Scope maintains. The full guide is at allratestoday.com/docs/integrations/riege-scope/. Menu names and the CSV layout below are Riege's as published in its knowledge base; confirm them against your Scope release.
Two kinds of rate in Scope
Riege's knowledge base describes two separate sets:
- Exchange Rates, under Master Data > Finance. These are used for receivables, payables, quotations and tariffs, with the types Day Rate, Buying Rate, Selling Rate, Bank Selling Rate and Tax invoice rate. Riege states that these "are not used for customs declarations".
- System Exchange Rates, the customs rates, which Scope updates automatically.
So there are two jobs: import official rates into the finance rate types, and check the customs rates.
The CSV format
Per Riege's documentation, the import file is:
- semicolon separated
- comma as the decimal sign
- five columns:
baseCurrency,rate,unit,directQuotation(0 indirect, 1 direct) andvalidFrom(DD.MM.YYYY)
Their example row:
USD;1,2370;1;0;15.11.2019 Each rate type is imported separately, so you build one file per type.
Generating the file from an official table
AllRatesToday serves tax authority and central bank tables from the same endpoint, so one function covers both. It fetches the latest table, works out the direction per row, and writes Scope's format:
import requests API = "https://allratestoday.com/api/v1/central-bank" HEADERS = {"Authorization": "Bearer art_live_your_key"} def scope_csv(source, home_ccy, path): """Write one Scope exchange-rate CSV (one rate type) from an official table. Scope's format: semicolon separated, comma decimal, baseCurrency;rate;unit;directQuotation;validFrom (DD.MM.YYYY) """ t = requests.get(f"{API}/{source}/latest", headers=HEADERS, timeout=10).json() y, m, d = t["rate_date"].split("-") valid_from = f"{d}.{m}.{y}" lines = [] for r in t["rates"]: if r["base"] == home_ccy: # table quotes foreign per 1 home unit (ECB style) ccy, rate, direct = r["quote"], r["value"], 0 elif r["quote"] == home_ccy: # table quotes home per foreign unit ccy, rate, direct = r["base"], r["value"], 1 else: continue lines.append(f"{ccy};{f'{rate:.6f}'.replace('.', ',')};1;{direct};{valid_from}") with open(path, "w", encoding="utf-8") as f: f.write("\n".join(lines) + "\n") # Example: the ECB reference table for a EUR-based Scope company scope_csv("ecb", "EUR", "scope-ecb.csv") The direction flag follows the table
This is the part to check before you schedule anything. The ECB, German customs and most EU tables quote foreign currency per 1 euro, which is indirect (0). Tables such as the Reserve Bank of India's quote home currency per foreign unit, which is direct (1). The function sets the flag from which side of the row your home currency sits on, but check the first import against a rate you know.
Also use the table's rate_date as validFrom, not the import date. A late or repeated run should not move the validity date.
A scheduled job that writes the CSV once per period is enough: tax and customs tables are fixed for a week, a fortnight or a month.
One more filter to consider: pairs the authority did not print are flagged "derived": true in the response. Leave them out of the file if your policy needs printed rates only.
Checking the customs rates Scope maintains
Riege's article on system exchange rates says Scope updates the customs exchange rates automatically, and offers a manual override (Master Data > Finance > System Exchange Rates, then the rate history and Override) only for the rare case of an incorrect or outdated rate.
To spot such a case, compare Scope's rate with the official customs table of the clearance country for the same date:
# Compare a customs rate shown in Scope (System Exchange Rates) with the official table def check(country, date, ccy, local_ccy, scope_rate, tolerance=0.0001): r = requests.get(f"https://allratestoday.com/api/v1/customs/{country}/{date}", params={"source": ccy, "target": local_ccy}, headers=HEADERS, timeout=10).json() diff = abs(scope_rate - r["rate"]) / r["rate"] return {"official": r["rate"], "table_date": r["rate_date"], "authority": r["authority"]["code"], "matches": diff <= tolerance} If they differ, the response's authority and rate_date identify the official table to cite when you override. Riege does not document an API for writing customs rates, so the override itself stays manual.
Links
- Guide: https://allratestoday.com/docs/integrations/riege-scope/
- Official customs exchange rate API: https://allratestoday.com/customs-exchange-rate-api/
- Other integration guides: https://allratestoday.com/docs/integrations/
- API key: https://allratestoday.com/register/
Rates are redistributed from each institution's own publication. They are reference rates for accounting, tax and compliance, not dealing quotes.
