All Questions
Api Design easy

A client wants to update only the 'status' field of an order, leaving other fields unchanged. Which HTTP method is most appropriate?

  1. A PUT /orders/123 with the new status and all other existing fields.
  2. B PATCH /orders/123 with a JSON body containing only { "status": "shipped" }.
  3. C POST /orders/123/status with the value "shipped".
  4. D GET /orders/123?status=shipped to trigger the update.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions