toyIdstringrequired
Delete a toy
delete
https://api.toystore.com/v1/toys/{toyId}
Path Parameters
Response
204
Response
204
Toy deleted successfully
delete/toys/{toyId}
Path Parameters
204
Place a new order
post
https://api.toystore.com/v1/orders
Body
application/json
Body
application/json
Order
idstringrequired
customerIdstringrequired
itemsarray[object]required
Show Child Parameters
totalPricenumberrequired
Response
201
Response
201
Order placed successfully
post/orders
Body
{
"id": "id",
"customerId": "customerId",
"items": [
{
"toyId": "toyId",
"quantity": 0
}
],
"totalPrice": 0
}
201
Get order details
get
https://api.toystore.com/v1/orders/{orderId}
Path Parameters
orderIdstringrequired
Response
200 application/json
Response
200 application/json
Order details
Order
idstringrequired
customerIdstringrequired
itemsarray[object]required
Show Child Parameters
totalPricenumberrequired
get/orders/{orderId}
Path Parameters
200 application/json
Toy
objectidstringrequired
namestringrequired
pricenumberrequired
categorystringrequired
stockintegerrequired
Example
Order
objectidstringrequired
customerIdstringrequired
itemsarray[object]required
Show Child Parameters
totalPricenumberrequired
Example