Unfortunately, this feature is not supported on mobile devices. For the best experience, please use a computer.

Swagger Petstore (1.0.0)

This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.

Download OpenAPI description
Languages
Servers
Mock server
https://redocly.com/_mock/openapi/petstore/
https://petstore.swagger.io/v2/

pet

Everything about your Pets

Operations

store

Access to Petstore orders

Operations

Returns pet inventories by status

Request

Returns a map of status codes to quantities

curl -i -X GET \
  https://redocly.com/_mock/openapi/petstore/store/inventory \
  -H 'api_key: YOUR_API_KEY_HERE'
Experience it firsthand in the API Explorer!

Responses

successful operation

Bodyapplication/json
property name*integer(int32)additional property
Response
application/json
{ "property1": 0, "property2": 0 }

Place an order for a pet

Request

Bodyapplication/jsonrequired

order placed for purchasing the pet

idinteger(int64)
petIdinteger(int64)
quantityinteger(int32)
shipDatestring(date-time)
statusstring

Order Status

Enum"placed""approved""delivered"
completeboolean
Default false
curl -i -X POST \
  https://redocly.com/_mock/openapi/petstore/store/order \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 0,
    "petId": 0,
    "quantity": 0,
    "shipDate": "2019-08-24T14:15:22Z",
    "status": "placed",
    "complete": false
  }'
Experience it firsthand in the API Explorer!

Responses

successful operation

Body
idinteger(int64)
petIdinteger(int64)
quantityinteger(int32)
shipDatestring(date-time)
statusstring

Order Status

Enum"placed""approved""delivered"
completeboolean
Default false
Response
No response example

Find purchase order by ID

Request

For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions

Path
orderIdinteger(int64)[ 1 .. 10 ]required

ID of pet that needs to be fetched

curl -i -X GET \
  'https://redocly.com/_mock/openapi/petstore/store/order/{orderId}'
Experience it firsthand in the API Explorer!

Responses

successful operation

Body
idinteger(int64)
petIdinteger(int64)
quantityinteger(int32)
shipDatestring(date-time)
statusstring

Order Status

Enum"placed""approved""delivered"
completeboolean
Default false
Response
No response example

Delete purchase order by ID

Request

For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors

Path
orderIdinteger(int64)>= 1required

ID of the order that needs to be deleted

curl -i -X DELETE \
  'https://redocly.com/_mock/openapi/petstore/store/order/{orderId}'
Experience it firsthand in the API Explorer!

Responses

OK

user

Operations about user

Operations