API Design · Junior · Question 8 of 75

What should DELETE /orders/42 return if the order was deleted and there's nothing to send back?

Explanation

200 OK with a body is also fine if you return something. A repeated delete may return 404 or 204; document the choice.

Further reading

Problem with a question

API Design · Junior · question 8

Test yourself

Take the API Design · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz