API Design · Middle · Question 48 of 75
How should an API handle a bulk operation where some items fail?
- ✓Correct answer: Return per-item results (success or error with a code) so the client knows exactly which items to retry
- 2Fail the whole request with one generic error
- 3Return 200 and silently drop failed items
Explanation
Some APIs use 207 Multi-Status; others return 200 with a results array. Document whether the operation is atomic.