Challenge: Delete an Order
Explore how to import and execute Postman collections to test the DELETE api/orders endpoint in a React-based work order manager. Learn to write positive and negative test cases, use collection variables to manage order IDs, and validate API responses. This lesson helps you understand how to automate deletion scenarios effectively using Postman.
We'll cover the following...
We'll cover the following...
Overview
The DELETE api/orders/{{id}} endpoint allows us to remove an order. When we make a request to the endpoint, the API responds with data including the status of the request and the order name and ID:
Let's explain the code above:
In line 2, the value for the
successproperty is a boolean.In lines 3–4, the values for
nameand ...