15 REST design decisions. Click any to see the canonical endpoint and why.
You're designing the cart service for an e-commerce app. The frontend needs to add a specific item to a logged-in user's cart. Pick the best endpoint.
Your profile screen lets users edit just their display name or just their avatar URL without touching other fields. Pick the best endpoint for saving the change.
You're building a payments API (Application Programming Interface). Clients sometimes retry after a timeout and you cannot double-charge. Pick the best endpoint for creating a charge.
A post on your social app can have millions of comments and the feed appends new ones constantly. The mobile client needs to scroll through them. Pick the best endpoint.
You're shipping the first public version of your API (Application Programming Interface). You know breaking changes are inevitable and you need a versioning scheme that's easy to operate. Pick the best approach.
Customers can request a CSV export of all their orders. Generating it takes 30 seconds to 10 minutes. Pick the best endpoint design.
Your blog API needs to let an author delete one of their posts. Pick the best endpoint and response.
Your warehouse system needs to update on-hand counts for up to 5,000 SKUs at once after a nightly stock count. Pick the best endpoint.
Your storefront needs to list products filtered by category, price range, and in-stock status, with a free-text search query. Pick the best endpoint.
Users upload videos up to 5 GB to your platform. Pick the best endpoint design for the upload path.
Two editors open the same document and both save changes a few seconds apart. You need to detect and reject the second save instead of silently overwriting the first. Pick the best endpoint.
An authenticated user requests GET /v1/documents/{id}, but that document belongs to a different tenant and they have no permission to see it. Pick the best response.
Earlier you exposed POST /v1/exports to start an export job. Now you need to let the user cancel an in-progress job. Pick the best endpoint.
Your API (Application Programming Interface) needs an endpoint that returns the orders belonging to the currently authenticated user. Pick the best design.
Your platform sends webhook events to subscribers when a payment succeeds. You're designing the outbound HTTP (Hypertext Transfer Protocol) call. Pick the best design.