Evolve a Product Catalog API Without Breaking Older Client Versions

Last updated: November 29, 2026

Quick Overview

The catalog API must change price from a float in dollars to an amount and currency object and rename name to title, while old Kindle and mobile app versions keep calling it for years. Design the versioning scheme and implement response downgrading.

Amazon
Software Engineering Fundamentals
Software Engineer
Amazon
November 29, 2026
Software Engineer
Onsite
Software Engineering Fundamentals
Medium

0

0

0 solved


The catalog API must change price from a float in dollars to an amount and currency object and rename name to title, while old Kindle and mobile app versions keep calling it for years. Design the versioning scheme and implement response downgrading.

Amazon devices and apps stay in the field long after a release, so a public-facing API change has to coexist with every client still calling it. The interviewer checks additive-change discipline, where versioning is negotiated, and how to avoid a maze of per-version code paths.

What the Interviewer Expects
  • Distinguishes additive, backward-compatible changes from breaking ones
  • Picks an explicit version negotiation mechanism with a safe default
  • Keeps one canonical internal model and converts at the edge
  • Chains one-step downgraders instead of writing N by N converters
  • Plans deprecation using per-version traffic metrics
Key Topics to Cover
API versioning
backward compatibility
content negotiation
adapters
deprecation
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How would you handle a client sending a v1-shaped request body to a v3 server?
  • When would you instead publish a new endpoint rather than a new version?
  • How do you know when it is safe to remove v1?
  • How would contract tests protect old clients?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • v1: name, price float, USD implied. v2: title, price float, currency. v3: price: {amount, currency} in cents.
  • Clients choose a version; clients that send nothing are legacy and get v1....
High-Level Design

Business logic only ever produces the latest shape. At the response edge, a chain of single-step downgraders converts v3 to v2 to v1, so adding v4 means writing one v4_to_v3 function, not touching e...


Submit Your Answer
Markdown supported