Swagger Petstore
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
Version: 1.0.0
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
post /pet
delete /pet/{petId}
get /pet/findByStatus
get /pet/findByTags
get /pet/{petId}
put /pet
post /pet/{petId}
post /pet/{petId}/uploadImage
delete /store/order/{orderId}
get /store/inventory
get /store/order/{orderId}
post /store/order
post /user
post /user/createWithArray
post /user/createWithList
delete /user/{username}
get /user/{username}
get /user/login
get /user/logout
put /user/{username}
Add a new pet to the store (addPet)
Consumes
This API call consumes the following media types via the
Content-Type request header:
application/json
application/xml
Request body
body (required)
Body Parameter — Pet object that needs to be added to the store
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
405
Invalid input
Deletes a pet (deletePet)
Path parameters
petId (required)
Path Parameter — Pet id to delete
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid pet value
Finds Pets by status (findPetsByStatus)
Multiple status values can be provided with comma separated strings
Query parameters
status (required)
Query Parameter — Status values that need to be considered for filter
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
400
Invalid status value
Finds Pets by tags (findPetsByTags)
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
Query parameters
tags (required)
Query Parameter — Tags to filter by
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
400
Invalid tag value
Find pet by ID (getPetById)
Returns a single pet
Path parameters
petId (required)
Path Parameter — ID of pet to return
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
400
Invalid ID supplied
404
Pet not found
Update an existing pet (updatePet)
Consumes
This API call consumes the following media types via the
Content-Type request header:
application/json
application/xml
Request body
body (required)
Body Parameter — Pet object that needs to be added to the store
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid ID supplied
404
Pet not found
405
Validation exception
Updates a pet in the store with form data (updatePetWithForm)
Path parameters
petId (required)
Path Parameter — ID of pet that needs to be updated
Consumes
This API call consumes the following media types via the
Content-Type request header:
application/x-www-form-urlencoded
Form parameters
name (optional)
Form Parameter — Updated name of the pet
status (optional)
Form Parameter — Updated status of the pet
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
405
Invalid input
Up
post /pet/{petId}/uploadImage
uploads an image (uploadFile)
Path parameters
petId (required)
Path Parameter — ID of pet to update
Consumes
This API call consumes the following media types via the
Content-Type request header:
Form parameters
additionalMetadata (optional)
Form Parameter — Additional data to pass to server
file (optional)
Form Parameter — file to upload
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
successful operation
Up
delete /store/order/{orderId}
Delete purchase order by ID (deleteOrder)
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
Path parameters
orderId (required)
Path Parameter — ID of the order that needs to be deleted
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid ID supplied
404
Order not found
Returns pet inventories by status (getInventory)
Returns a map of status codes to quantities
Return type
map[String, Integer]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
successful operation
Up
get /store/order/{orderId}
Find purchase order by ID (getOrderById)
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
Path parameters
orderId (required)
Path Parameter — ID of pet that needs to be fetched
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
400
Invalid ID supplied
404
Order not found
Place an order for a pet (placeOrder)
Request body
body (required)
Body Parameter — order placed for purchasing the pet
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
400
Invalid Order
Create user (createUser)
This can only be done by the logged in user.
Request body
body (required)
Body Parameter — Created user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
0
successful operation
Up
post /user/createWithArray
Creates list of users with given input array (createUsersWithArrayInput)
Request body
body (required)
Body Parameter — List of user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
0
successful operation
Up
post /user/createWithList
Creates list of users with given input array (createUsersWithListInput)
Request body
body (required)
Body Parameter — List of user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
0
successful operation
Up
delete /user/{username}
Delete user (deleteUser)
This can only be done by the logged in user.
Path parameters
username (required)
Path Parameter — The name that needs to be deleted
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid username supplied
404
User not found
Get user by user name (getUserByName)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
Return type
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
400
Invalid username supplied
404
User not found
Logs user into the system (loginUser)
Query parameters
username (required)
Query Parameter — The user name for login
password (required)
Query Parameter — The password for login in clear text
Return type
String
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
400
Invalid username/password supplied
Logs out current logged in user session (logoutUser)
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
0
successful operation
Updated user (updateUser)
This can only be done by the logged in user.
Path parameters
username (required)
Path Parameter — name that need to be deleted
Request body
body (required)
Body Parameter — Updated user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid user supplied
404
User not found
[ Jump to Methods ]
Table of Contents
ApiResponse
Category
Order
Pet
Tag
User
code (optional)
Integer
type (optional)
String
message (optional)
String
id (optional)
Long
name (optional)
String
id (optional)
Long
petId (optional)
Long
quantity (optional)
Integer
shipDate (optional)
Date
status (optional)
String Order Status
placed
approved
delivered
complete (optional)
Boolean
id (optional)
Long
category (optional)
Category
name
String
photoUrls
array[String]
tags (optional)
array[Tag]
status (optional)
String pet status in the store
available
pending
sold
id (optional)
Long
name (optional)
String
id (optional)
Long
username (optional)
String
firstName (optional)
String
lastName (optional)
String
email (optional)
String
password (optional)
String
phone (optional)
String
userStatus (optional)
Integer User Status