Interview Q&A · questions with model answers

API Design Interview Questions

Part of the study plan for: Backend Engineer · Full Stack Engineer · Native AI Engineer · Forward Deployed Engineer (FDE) · QA Engineer / SDET · Tech Lead

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked Write an Express or FastAPI endpoint that creates an order idempotently.

    Require an Idempotency-Key header, store the key with the request's result in the same transaction that creates the order, and return the stored result when the same key arrives again. A unique…

  2. Most asked Write a SQL query that returns each customer's three most recent orders.

    Rank each customer's orders by date with a window function, then keep ranks 1 to 3. ROW_NUMBER() gives exactly three per customer; RANK() would include ties.

Was this page helpful?

Report a mistake