Layer 3 · Go deeper · 7 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
Build-up · 6 steps
Read one API call, part by part
A shopping app asks a UPI-style payments API for ₹249 at checkout. Each part of the call carries a different promise.
Step 1 of 6
Method and path
/v1 names the API’s major version. POST creates or acts, and /payments is the collection the new payment joins.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“A partner wants your order data. A teammate suggests giving them read access to the orders database. What do you say?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Finance wants payment amounts in rupees, not paise. Old app versions can’t be forced to upgrade. What do you change?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“Pricing is an internal service, and your teams own every caller. One field must change incompatibly. How do you ship it?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Any merchant with a valid API key can call
GET /v1/payments/{id}. Where do you check they may see that payment?”Your move. Pick an approach:
Build-up · 6 steps
Peel the contract, layer by layer
A JSON example shows only the top layer. Callers depend on far more, and most bugs between teams live in the layers nobody wrote down.
Step 1 of 6
Shapes
Operations, field names and types, required fields and error codes. This is the layer an OpenAPI file captures well, and the only one a JSON example shows.