API Design · Middle · Question 1 of 75

How would you model 'cancel an order' in a REST API?

Explanation

Cancelling usually keeps the order for history and may have business rules. A dedicated action makes those rules explicit; GET must never change state.

Further reading

Problem with a question

API Design · Middle · question 1

Test yourself

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

Take this quiz