API Style & Pattern Comparisons

Side-by-side trade-offs. Neither column wins — the consumer environment, the data shape and the operational budget decide.

Batch endpoint vs Individual requests

One request carrying 500 items vs 500 requests carrying one item each — round trips traded against the hard questions batches force: partial failure, size limits and retry granularity.

Batch endpointOpen lesson →
Use when

Clients routinely operate on many items at once — imports, syncs, bulk tagging — and per-request overhead dominates the work.

Avoid when

You can't answer "what happens when item 3 of 5 fails?" — a batch without partial-failure semantics is a trap, not a feature.

Strengths

One round trip and one auth check for N items; the server can bulk-insert and validate as a set.

Fails when

One bad item 500s the whole batch of 500 with no per-item report — the client can't tell what committed.

Operational cost

Per-item result envelopes, batch size caps, atomicity documentation, and retry guidance for partially-applied batches.

Individual requestsOpen lesson →
Use when

Operations are independent, per-item semantics are simple, and existing retry, rate-limit and error handling should just work.

Avoid when

A client needs 500 items done and your rate limit is 10 req/s — you've made the network chatter the product's bottleneck.

Strengths

Uniform semantics: every request has one status code, one retry decision, one log line; failures isolate naturally.

Fails when

500 sequential calls at 50ms RTT is 25 seconds of wall clock; parallelizing them trips the rate limiter instead.

Operational cost

Connection pool and rate-limit headroom sized for bursts; clients build their own concurrency and backoff machinery.

DimensionBatch endpointIndividual requests
Round trips for 500 itemsOne (or a few pages)500 — RTT × 500 unless parallelized
Partial failureMust be designed: per-item results, 207-style reportingFree — each request succeeds or fails alone
Retry granularityThe failed items, if the response identifies themExactly the failed request
Size limitsExplicit max batch size, body size, per-item validationOrdinary request limits apply
Rate limitingCount items, not requests, or batches become a loopholeRequest-based limits work as designed