Bird
0
0

What is wrong with this endpoint to delete a single order: DELETE /orders?

medium📝 Debug Q7 of 15
Rest API - URL and Resource Design
What is wrong with this endpoint to delete a single order: DELETE /orders?
AEndpoint should be <code>/order/delete</code>
BMissing order ID to specify which order to delete
CDELETE method cannot be used on orders
DUsing plural resource name instead of singular
Step-by-Step Solution
Solution:
  1. Step 1: Understand delete operation requirements

    Deleting a single resource requires specifying its unique ID in the endpoint.
  2. Step 2: Identify missing ID in endpoint

    The endpoint DELETE /orders lacks an ID, so it cannot target a single order.
  3. Final Answer:

    Missing order ID to specify which order to delete -> Option B
  4. Quick Check:

    Delete single resource needs ID = D [OK]
Quick Trick: Include resource ID to delete a single item [OK]
Common Mistakes:
MISTAKES
  • Omitting ID for single resource delete
  • Confusing plural vs singular for delete
  • Using incorrect endpoint format

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes