Quick revision
The short answer
First we quantify what the inconsistency costs, then we give each core concept such as customer one owning domain team that publishes the canonical API and events for it. We do not impose a single company-wide data model; we use shared identifiers and bounded contexts with explicit translations. Migration is gradual, new consumers use the owning API and old copies retire as systems are replaced, and platform tooling (catalog, contract tests, linting, deprecation tracking) makes it sustainable.
What to remember
In this answer, we built a long-term strategy for inconsistent business concepts across hundreds of APIs. We started by quantifying the cost in integration effort, incidents and onboarding time, then gave each core concept one owning team that publishes its API, events and identifiers. We rejected a single enforced canonical model in favour of bounded contexts with shared ids and explicit translations, migrated gradually as systems are replaced, and funded catalog, contract testing, linting and deprecation tracking to keep it working.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
First we quantify what the inconsistency costs, then we give each core concept such as customer one owning domain team that publishes the canonical API and events for it. We do not impose a single company-wide data model; we use shared identifiers and bounded contexts with explicit translations. Migration is gradual, new consumers use the owning API and old copies retire as systems are replaced, and platform tooling (catalog, contract tests, linting, deprecation tracking) makes it sustainable.
Why this question is asked
After ten years, a large company typically has a dozen definitions of customer: one in billing with a VAT number, one in CRM with a lifecycle stage, one in the web shop keyed by email. Each team made a sensible local choice, and together they produce mapping bugs, slow integrations and long onboarding. Interviewers ask this question at the most senior level to see whether a candidate can set a strategy that works over years and across hundreds of teams without proposing a big-bang rewrite. In this answer, we will measure the problem, decide on ownership, see why a single canonical model fails, plan the migration and list the tooling it needs.
1Quantifying the Cost First
A strategy that touches hundreds of APIs needs a business case, and the case comes from numbers. We look at how much integration work goes into mapping between models (for example, the share of a new integration's effort spent writing translators), at incidents caused by mismatched concepts, such as a customer merged in CRM but not in billing, and at how long a new engineer needs before they can safely use customer data.
These figures do two things. They tell leadership what the problem costs per year, and they tell us where to start. Usually two or three concepts, often customer, account and product, cause most of the pain, and the strategy should begin with them rather than with every noun in the company.
2One Owner per Core Concept
The central move is ownership. For each core concept, one domain team becomes the owner: it publishes the canonical API (for example GET /customers/{customerId}), the events when the concept changes (CustomerCreated, CustomerMerged), and the identifier everyone else uses. Other teams may keep their own data about a customer, such as billing preferences, but they reference the customer through the owner's id and do not create customers of their own.
Ownership solves the problem that caused the mess: nobody was responsible for the meaning of customer, so everyone defined it. It also gives consumers one place to ask questions and one contract to test against.
3Why Not One Canonical Data Model for Everything?
The classic reaction is a company-wide canonical data model: one schema of customer with every field any team needs, enforced on every API. It sounds like the cure, but in practice it becomes a bottleneck. Every change needs agreement from every team, the model grows to hundreds of optional fields nobody understands, and teams quietly work around it.
The alternative comes from domain-driven design. A bounded context is a part of the business, such as billing or support, inside which a word has one precise meaning. Billing's customer and support's customer are allowed to differ. What we standardise is what crosses the boundaries: shared identifiers, so a customer id means the same person everywhere, and explicit translations at the edges of each context, so the mapping is written once and tested, not reinvented in every integration.
| Aspect | Single canonical model | Owned concepts and contexts |
|---|---|---|
| Change process | every team must agree | owner changes its API with versioning rules |
| Model size | grows to every field anyone wants | each context keeps only what it needs |
| Shared part | the whole schema | identifiers and published events |
| Translation | hidden, inconsistent | explicit at context boundaries, tested |
| Typical outcome | bottleneck and workarounds | local freedom with consistent references |
4Migrating Gradually
We cannot stop hundreds of systems to move them to the new owner. Instead the migration follows the natural replacement cycle. From a chosen date, new consumers must use the owner's API and identifiers, which the API review checks. Existing systems keep their copies but subscribe to the owner's events to stay in sync, and each copy is retired when its system is rebuilt or decommissioned. A mapping table from old local ids to the canonical id bridges the period in between.
This takes years, and that is acceptable. What matters is that the number of independent definitions goes down every quarter and never up. We track it as a metric and report it alongside the cost figures from the start.
- Pick the concept with the highest measured costfor example customer
- Name the owning teamit publishes the API, events and ids
- New consumers must use the ownerchecked in API review
- Old copies sync from owner eventsid mapping table bridges old ids
- Retire copies as systems are replacedcount of definitions goes down
5 steps in order. Play them, or step through them one at a time.
5Platform Tooling That Makes It Last
Strategy fails without support, so we fund a platform effort. An API catalog lists every API with its owner and the concepts it exposes, so a team looking for customer data finds the owner instead of building another copy. Contract tests between owners and consumers catch breaking changes before release. A linter checks that APIs use the canonical identifier names and formats. Deprecation tracking, from gateway or tracing data, shows which consumers still call old copies so we can help them move. Each tool turns a policy into something teams can see and act on every day.
6Follow-up questions
How do you decide which team owns a concept like customer?
We look for the team whose business capability creates and changes the concept and is accountable for its correctness, not the team with the biggest database. For customer, that is usually the team running customer onboarding and identity, because it decides when a customer exists, merges duplicates and handles consent. If several teams have equal claims, we split the concept, for example customer identity owned by one team and billing account owned by another, and make the relationship explicit through ids.
What if the owning team does not have capacity?
Then ownership is not real yet. Taking on a core concept means funding the team for it, because it will serve many consumers. Leadership has to treat that as a platform investment, with the measured cost of inconsistency as the justification.
Do events replace the API?
No, they complement it. The API answers questions about the current state on demand, and events let other contexts keep their local data in sync without polling. Both are published by the owner and versioned under the same rules.
7Conclusion
In this answer, we built a long-term strategy for inconsistent business concepts across hundreds of APIs. We started by quantifying the cost in integration effort, incidents and onboarding time, then gave each core concept one owning team that publishes its API, events and identifiers. We rejected a single enforced canonical model in favour of bounded contexts with shared ids and explicit translations, migrated gradually as systems are replaced, and funded catalog, contract testing, linting and deprecation tracking to keep it working.
Open with
I would start by putting numbers on the problem: how much of each integration is spent mapping between models, how many incidents come from mismatched concepts like customer merges, and how long onboarding takes.
Then, if they want more
That tells me which two or three concepts to tackle first. Then I would assign each core concept to one owning domain team, the team whose business capability actually creates and changes it. That team publishes the canonical API, the change events and the identifier everyone else uses.
I would deliberately not impose one company-wide canonical data model, because in my experience it turns into a committee bottleneck with hundreds of optional fields. Instead each bounded context keeps its own meaning internally, and we standardise only what crosses boundaries: shared ids and explicit, tested translations at the edges. Migration would be gradual.
New consumers must use the owner's API, existing copies sync from the owner's events and are retired when their systems are replaced, and we track the number of definitions going down each quarter. Finally I would fund platform tooling: an API catalog with owners, contract tests, linting for identifier conventions, and deprecation tracking from gateway data.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Framework reference, Spring Web MVC
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Over ten years your company built several hundred internal REST APIs with inconsistent...": https://scrivio-interview-library.netlify.app/spring-boot/rest-api-design/acd066c497/