Toy Store API

Online Toy Store API

1.0.0OAS 3.1

API for browsing, ordering, and managing toys in an online toy store.

API Base URL
  • Server 1:https://api.toystore.com/v1

    Production server

Get a list of all toys

get
https://api.toystore.com/v1/toys

Response

200 application/json

A list of toys

idstringrequired
namestringrequired
pricenumberrequired
categorystringrequired
stockintegerrequired
get/toys
 
200 application/json

Add a new toy

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

Body

application/json

Toy

idstringrequired
namestringrequired
pricenumberrequired
categorystringrequired
stockintegerrequired

Response

201

Toy added successfully

post/toys

Body

{ "id": "id", "name": "name", "price": 0, "category": "category", "stock": 0 }
 
201