Interview practice question
Modelling non-CRUD actions
Backend Engineering · API Design · Intermediate
How would you design REST endpoints for actions like "cancel order", "approve invoice" or "resend verification email"?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Sub-resource action endpoints (POST /orders/{id}/cancel).
- Or state change via PATCH status.
- Validate allowed transitions.
- Idempotent where possible.
- Return updated resource.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.