Blog·Craft·

Currency rides along on country

/country/{code} already carries the currency code, name, and symbol, no second call needed.

You already have the currency. You just didn't ask for it separately.

GET /country/us
{
  "country": "us",
  "name": "United States",
  "currency": "USD",
  "currency_name": "United States Dollar",
  "currency_symbol": "$"
}

Look up a country for its capital or its borders and the currency comes with it, code, full name, and symbol, in the same object. Enough for a price label or a receipt without a second round trip.

The full currency record lives at /currency

/country carries the identifier. /currency/{code} is where decimal places, plural name, and every other country that uses it live, plus the daily reference rate at /currency/{code}/{code}. A currency shared across borders, like the euro across the eurozone, only needs resolving once no matter how many of its member countries you look up.

Try it

Call /country/{code} and check currency, currency_name, and currency_symbol. They ride along.