# One hotel. Three JSONs.

> Every hotel supplier speaks its own dialect.

- **Format:** short video, 10 steps, ~57 seconds
- **Topic:** Hotel aggregator system design — how a platform that searches many hotel suppliers, each returning completely different JSON, uses one adapter per supplier, a canonical model and a master hotel ID to show one comparable price per hotel.
- **Author:** Suthahar Jegatheesan (MSDEVBUILD)
- **Category:** Architecture · Design Pattern
- **Published:** 2026-10-02
- **Tags:** systemdesign, softwarearchitecture, traveltech, apiintegration, designpatterns, dotnet, azure, backenddeveloper, microservices, interviewprep, msdevbuild
- **Canonical URL:** https://blog.msdevbuild.com/shorts/hotel-aggregator-supplier-adapters/

---
## What you'll learn

- Why supplier JSON cannot be shown to travellers as it arrives
- How one adapter per supplier and a canonical model fix prices and units
- How a master hotel ID and a time budget fix duplicates and slow search

## Understand it one step at a time

### 1. Three suppliers, three JSONs

The same room, described three ways: per night, in paise, in dollars.

### 2. Used as-is

No adapter in the middle. Supplier C says 212.40 USD, and the app shows ₹212.

### 3. The quiet bug

Supplier B sends paise. Nobody divided by 100, so its hotels sank out of sight.

### 4. One hotel, three listings

Three names, three IDs, one building. The list shows it three times.

### 5. One adapter per supplier

Each adapter knows one supplier: its auth, its JSON, its units, its quirks.

### 6. One canonical model

Whole stay, taxes in, major units, ISO currency. Every adapter returns the same shape.

### 7. One master hotel ID

An offline mapping turns three supplier IDs into one hotel, with three offers.

### 8. A slow supplier? Budget

Call every adapter at once. At 2.5 seconds, cancel whoever is still running.

### 9. The JSON changes

Supplier B renames a field overnight. Its adapter rejects and counts. Search carries on.

### 10. Every JSON in, one model out

Adapters per supplier, one canonical model, one master hotel ID, one time budget.

---

## The takeaway

**Every JSON in. One model out.**

One adapter per supplier, one canonical model, one master hotel ID, and a time budget on every search.
