toyIdstringrequired
Get details of a specific toy
get
https://api.toystore.com/v1/toys/{toyId}
Path Parameters
Response
200 application/json
Response
200 application/json
Details of the toy
Toy
idstringrequired
namestringrequired
pricenumberrequired
categorystringrequired
stockintegerrequired
get/toys/{toyId}
Path Parameters
200 application/json
Update a toy's details
put
https://api.toystore.com/v1/toys/{toyId}
Path Parameters
toyIdstringrequired
Body
application/json
Body
application/json
Toy
idstringrequired
namestringrequired
pricenumberrequired
categorystringrequired
stockintegerrequired
Response
200
Response
200
Toy updated successfully
put/toys/{toyId}
Path Parameters
Body
{
"id": "id",
"name": "name",
"price": 0,
"category": "category",
"stock": 0
}
200
Delete a toy
delete
https://api.toystore.com/v1/toys/{toyId}
Path Parameters
toyIdstringrequired
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