# Data and APIs — one-pager

BayLearn · System Design Interview Sprint

**Clock:** 2–4 APIs → lookup key → QPS on that key → then the store. Retry key. I will not: ____.

## Six rows

| Product | 2 APIs | Key | Hot key | Store instinct | Replay |
|---------|--------|-----|---------|----------------|--------|
| Linkly | GET `/{code}` 302 · POST `/v1/urls` 201 | `code` | viral code 50k/s | KV + cache | optional key / hash(url+owner) |
| PulseFeed | POST `/v1/posts` 201 · GET `/feed?cursor=` | `postId` · Home `userId` | celebrity author | ids cache, not a join | optional client key |
| RideHail | PUT `/location` · POST `/trips` | `driverId` vs `tripId` | downtown cell | two stores | PUT replace · pay key |
| PayRail | POST `/charges` + header · GET by id | merchant + key · `chargeId` | not a shard story | one primary | same key → same chargeId |
| ClinicDocs | POST 202 · signed GET when clean | `fileId` | none at 19/s | SQL pointer + objects | overwrite landing |
| TicketDrop | status · POST `/holds` · checkout | `holdId` · seat | one show lock | cached status ≠ inventory | same holdId · 410 gone |

## Codes

| Code | Means | Use |
|------|--------|-----|
| 201 | Official row exists | Post, charge, code, hold |
| 202 | Accepted, work later | ClinicDocs upload |
| 302 | Redirect I can turn off | Linkly. Never 301 |
| 409 | In flight, same key | PayRail processing |
| 410 | Gone. Stop. | TicketDrop sold out |
| 429 | Mint limiter | Bots / POST quota — not a cache |

## Refuse in the API

Landing download URL · file bytes · PAN · shard id · replica lag as truth · guessable holdId · click charts on GET `/{code}`.

This is not a hiring prediction tool.
