This is a sample Pet Store Server based on the OpenAPI 3.0 specification.

Server
https://petstore3.swagger.io/api/v3
Server Variables
apiKey api_key

For testing purposes, this is not required. You can use any value for api_key.

Fields
KeyIn
api_keyHeader

Update an existing pet

Update an existing pet by Id

Auth
Request Body

Update an existent pet in the store

objectobject
idint64
namestring
categoryobject
idint64
namestring
photoUrlsarray[string]
tagsarray[object]
idint64
namestring
statusstring

pet status in the store

Enum: available,pending,sold

PUT /pet
Copy
Responses
200

Successful operation

objectobject
idint64
namestring
categoryobject
idint64
namestring
photoUrlsarray[string]
tagsarray[object]
idint64
namestring
statusstring

pet status in the store

Enum: available,pending,sold

400

Invalid ID supplied

404

Pet not found

405

Validation exception

Response
Copy

Add a new pet to the store

Add a new pet to the store

Auth
Request Body

Create a new pet in the store

objectobject
idint64
namestring
categoryobject
idint64
namestring
photoUrlsarray[string]
tagsarray[object]
idint64
namestring
statusstring

pet status in the store

Enum: available,pending,sold

POST /pet
Copy
Responses
200

Successful operation

objectobject
idint64
namestring
categoryobject
idint64
namestring
photoUrlsarray[string]
tagsarray[object]
idint64
namestring
statusstring

pet status in the store

Enum: available,pending,sold

405

Invalid input

Response
Copy

Finds Pets by status

Multiple status values can be provided with comma separated strings

Auth
Query String
statusstring

Status values that need to be considered for filter

Enum: available,pending,sold

Default: available

GET /pet/findByStatus
Copy
Responses
200

successful operation

arrayarray[object]
idint64
namestring
categoryobject
idint64
namestring
photoUrlsarray[string]
tagsarray[object]
idint64
namestring
statusstring

pet status in the store

Enum: available,pending,sold

400

Invalid status value

Response
Copy

Finds Pets by tags

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Auth
Query String
tagsarray

Tags to filter by

GET /pet/findByTags
Copy
Responses
200

successful operation

arrayarray[object]
idint64
namestring
categoryobject
idint64
namestring
photoUrlsarray[string]
tagsarray[object]
idint64
namestring
statusstring

pet status in the store

Enum: available,pending,sold

400

Invalid tag value

Response
Copy

Find pet by ID

Returns a single pet

Auth
Path Params
petIdinteger

ID of pet to return

GET /pet/{petId}
Copy
Responses
200

successful operation

objectobject
idint64
namestring
categoryobject
idint64
namestring
photoUrlsarray[string]
tagsarray[object]
idint64
namestring
statusstring

pet status in the store

Enum: available,pending,sold

400

Invalid ID supplied

404

Pet not found

Response
Copy

Updates a pet in the store with form data

Auth
Path Params
petIdinteger

ID of pet that needs to be updated

Query String
namestring

Name of pet that needs to be updated

statusstring

Status of pet that needs to be updated

POST /pet/{petId}
Copy
Responses
405

Invalid input

No response body
Response
Copy

Deletes a pet

Auth
Headers
api_keystring
Path Params
petIdinteger

Pet id to delete

DELETE /pet/{petId}
Copy
Responses
400

Invalid pet value

No response body
Response
Copy

uploads an image

Auth
Path Params
petIdinteger

ID of pet to update

Query String
additionalMetadatastring

Additional Metadata

Request Body
filefile
POST /pet/{petId}/uploadImage
Copy
Responses
200

successful operation

objectobject
codeint32
typestring
messagestring
Response
Copy

Returns pet inventories by status

Returns a map of status codes to quantities

Auth
GET /store/inventory
Copy
Responses
200

successful operation

objectobject
*int32
Response
Copy

Place an order for a pet

Place a new order in the store

Auth
Request Body
objectobject
idint64
petIdint64
quantityint32
shipDatedate-time
statusstring

Order Status

Enum: placed,approved,delivered

completeboolean
POST /store/order
Copy
Responses
200

successful operation

objectobject
idint64
petIdint64
quantityint32
shipDatedate-time
statusstring

Order Status

Enum: placed,approved,delivered

completeboolean
405

Invalid input

Response
Copy

Find purchase order by ID

For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.

Auth
Path Params
orderIdinteger

ID of order that needs to be fetched

GET /store/order/{orderId}
Copy
Responses
200

successful operation

objectobject
idint64
petIdint64
quantityint32
shipDatedate-time
statusstring

Order Status

Enum: placed,approved,delivered

completeboolean
400

Invalid ID supplied

404

Order not found

Response
Copy

Delete purchase order by ID

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

Auth
Path Params
orderIdinteger

ID of the order that needs to be deleted

DELETE /store/order/{orderId}
Copy
Responses
400

Invalid ID supplied

No response body
404

Order not found

Response
Copy

Create user

This can only be done by the logged in user.

Auth
Request Body

Created user object

objectobject
idint64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusint32

User Status

POST /user
Copy
Responses
default

successful operation

objectobject
idint64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusint32

User Status

Response
Copy

Creates list of users with given input array

Creates list of users with given input array

Auth
Request Body
arrayarray[object]
idint64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusint32

User Status

POST /user/createWithList
Copy
Responses
200

Successful operation

objectobject
idint64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusint32

User Status

default

successful operation

Response
Copy

Logs user into the system

Auth
Query String
usernamestring

The user name for login

passwordstring

The password for login in clear text

GET /user/login
Copy
Responses
200

successful operation

Headers
X-Rate-Limitinteger

calls per hour allowed by the user

X-Expires-Afterstring

date in UTC when token expires

Body
stringstring
400

Invalid username/password supplied

Response
Copy

Logs out current logged in user session

Auth
GET /user/logout
Copy
Responses
default

successful operation

No response body
Response
Copy

Get user by user name

Auth
Path Params
usernamestring

The name that needs to be fetched. Use user1 for testing.

GET /user/{username}
Copy
Responses
200

successful operation

objectobject
idint64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusint32

User Status

400

Invalid username supplied

404

User not found

Response
Copy

Update user

This can only be done by the logged in user.

Auth
Path Params
usernamestring

name that need to be deleted

Request Body

Update an existent user in the store

objectobject
idint64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusint32

User Status

PUT /user/{username}
Copy
Responses
default

successful operation

No response body
Response
Copy

Delete user

This can only be done by the logged in user.

Auth
Path Params
usernamestring

The name that needs to be deleted

DELETE /user/{username}
Copy
Responses
400

Invalid username supplied

No response body
404

User not found

Response
Copy