Toy Store API

Delete a toy

delete
https://api.toystore.com/v1/toys/{toyId}

Path Parameters

toyIdstringrequired

Response

204

Toy deleted successfully

delete/toys/{toyId}
 
204

Place a new order

post
https://api.toystore.com/v1/orders

Body

application/json

Order

idstringrequired
customerIdstringrequired
itemsarray[object]required
Show Child Parameters
totalPricenumberrequired

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

Order details

Order

idstringrequired
customerIdstringrequired
itemsarray[object]required
Show Child Parameters
totalPricenumberrequired
get/orders/{orderId}
 
200 application/json

Toy

object
idstringrequired
namestringrequired
pricenumberrequired
categorystringrequired
stockintegerrequired
Example

Order

object
idstringrequired
customerIdstringrequired
itemsarray[object]required
Show Child Parameters
totalPricenumberrequired
Example