Every developer has been there. You're building a user registration form, a product creation page, or a settings panel. You need a dropdown list. Maybe it's a list of countries, a currency selector, or a list of US states. What's your go-to move?
If you're like most of us, you might sigh, open a new tab, and search for "list of all countries JSON." You copy the resulting blob, paste it into a file in your project, and write some code to load it. It works. For now.
But what happens when a country changes its name? Or when another team building a different microservice needs the same list? This seemingly simple task of populating selection fields quickly snowballs into a significant data management headache. There's a better way.
Managing foundational data—what experts call reference data—across applications is a classic source of technical debt and inconsistency. The common approaches are all flawed:
These methods create unnecessary work. Your focus should be on your application's core features, not on becoming a part-time master data management expert.
Imagine if you could treat all reference data like a utility. You don't build a power plant to turn on a light; you just connect to the grid. The same principle can be applied to data.
This is where a managed reference data service like reference.do comes in. Instead of copying, storing, or serving static files, you make a simple API call.
Need a list of all official ISO 4217 currencies for a payment form? It's one line of code.
import { Do } from '@do-inc/sdk';
const an = new Do(process.env.DO_API_KEY);
// Get a list of all ISO 4217 currencies
const currencies = await an.reference.get('iso-4217');
console.log(currencies);
/*
=> [
{ "code": "USD", "name": "United States Dollar", "symbol": "$" },
{ "code": "EUR", "name": "Euro", "symbol": "€" },
{ "code": "JPY", "name": "Japanese Yen", "symbol": "¥" },
...
]
*/
With this approach, your form's currency selector is now powered by a reliable, centrally managed dataset. The data is always up-to-date, and every service in your organization that makes the same call gets the exact same list. Instantly, you've eliminated data duplication and inconsistency.
The power of a reference data API isn't limited to public standards like ISO codes. The real magic happens when you can manage your own proprietary data with the same simplicity.
Think about the custom data that powers your business:
With reference.do, you can upload your own custom datasets and access them through the exact same API. Your frontend can populate a dropdown with product categories, and your backend can use the same endpoint to validate an incoming product submission. This creates a unified, consistent data layer for both standard and custom reference data, establishing a true single source of truth across your entire application stack.
By shifting from static files to a dynamic API, you unlock several key benefits:
Your application's forms are the frontline of user interaction. They need to be fast, accurate, and reliable. Stop wasting development cycles on the tedious task of managing the data that populates them.
Embrace a modern, API-first approach to data management. Let a dedicated service handle the complexity of providing clean, consistent, and up-to-date reference data, so you can get back to building what matters most.
Q: What is reference data?
A: Reference data is foundational, slow-changing data used to classify and categorize other data. Common examples include country codes, currency lists, airport codes, and measurement units. It's the 'master data' that provides context to your transactional data.
Q: Why shouldn't I just hardcode a list of countries in my app?
A: Managing reference data across many applications and services is inefficient and leads to inconsistencies. A centralized service like reference.do ensures a single source of truth, reduces data duplication, simplifies updates, and makes integration seamless via a unified API.
Q: Can I use my own custom reference data?
A: Yes. reference.do allows you to upload, manage, version, and query your own proprietary reference datasets right alongside our standard public ones, all through the same simple API.