Swagger Petstore

This is a sample Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger.
More information: https://helloreverb.com
Contact Info: apiteam@swagger.io
Version: 1.0.0
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html

Access

  1. APIKey KeyParamName:api_key KeyInQuery:false KeyInHeader:true
  2. OAuth AuthorizationUrl:http://petstore.swagger.io/oauth/dialogTokenUrl:

Methods

[ Jump to Models ]

Table of Contents

Default

Pet

Store

User

Default

Up
get /test
(testMethod)

Return type

array[Test]

Example data

Content-Type: application/json
[ "", "" ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

peticion realizada con exito

Pet

Up
post /parrot
Add a new parrow to the store (addParrot)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body body_2 (optional)
Body Parameter

Return type

inline_response_200_1

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

405

Invalid input

200

successful operation inline_response_200_1

Up
post /pet
Add a new pet to the store (addPet)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Pet (required)
Body Parameter — Pet object that needs to be added to the store

Responses

405

Invalid input

Up
delete /pet/{petId}
Deletes a pet (deletePet)

Path parameters

petId (required)
Path Parameter — Pet id to delete format: int64

Request headers

Responses

400

Invalid ID supplied

404

Pet not found

Up
post /pet/feed/{petId}
Find pet by ID (feedPet)
schedule pet feeding

Path parameters

petId (required)
Path Parameter — ID of pet to return format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Pet (required)
Body Parameter — Pet object that needs to be added to the store

Request headers

Query parameters

petType (required)
Query Parameter — type of food
status (required)
Query Parameter — status

Responses

200

successful operation

Up
get /pet/findByStatus
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

array[Pet]

Example data

Content-Type: application/json
[ {
  "part" : [ "", "" ],
  "name" : "doggie",
  "id" : 0,
  "status" : "available"
}, {
  "part" : [ "", "" ],
  "name" : "doggie",
  "id" : 0,
  "status" : "available"
} ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

400

Invalid status value

Up
get /pet/findByTags
Finds Pets by tags (findPetsByTags)
Muliple 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

array[Pet]

Example data

Content-Type: application/json
[ {
  "part" : [ "", "" ],
  "name" : "doggie",
  "id" : 0,
  "status" : "available"
}, {
  "part" : [ "", "" ],
  "name" : "doggie",
  "id" : 0,
  "status" : "available"
} ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation

400

Invalid tag value

Up
get /parrot
get Parrots (getParrots)

Return type

array[null]

Example data

Content-Type: application/json
[ "", "" ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation array[null]

Up
get /pet/{petId}
Find pet by ID (getPetById)
Returns a single pet

Path parameters

petId (required)
Path Parameter — ID of pet to return format: int64

Return type

Pet

Example data

Content-Type: application/json
{
  "part" : [ "", "" ],
  "name" : "doggie",
  "id" : 0,
  "status" : "available"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation Pet

400

Invalid ID supplied

404

Pet not found

Up
put /parrot
update parrots (updateParrots)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body body_1 (optional)
Body Parameter

Return type

inline_response_200

Example data

Content-Type: application/json
{
  "parrots" : [ "", "" ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

405

Invalid input

200

successful operation inline_response_200

Up
put /pet
Update an existing pet (updatePet)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Pet (required)
Body Parameter — Pet object that needs to be added to the store

Responses

400

Invalid ID supplied

404

Pet not found

405

Validation exception

Up
post /pet/{petId}
Updates a pet in the store with form data (updatePetWithForm)

Path parameters

petId (required)
Path Parameter — ID of pet that needs to be updated format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Form parameters

name (optional)
Form Parameter
status (optional)
Form Parameter

Responses

405

Invalid input

Up
post /pet/{petId}/uploadImage
uploads an image (uploadFile)

Path parameters

petId (required)
Path Parameter — ID of pet to update format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Object (optional)
Body Parameter

Return type

ApiResponse

Example data

Content-Type: application/json
{
  "code" : 0,
  "type" : "type",
  "message" : "message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation ApiResponse

Store

Up
delete /store/order/{orderId}
Delete purchase order by ID (deleteOrder)
For valid response try integer IDs with positive integer value.\ \ Negative or non-integer values will generate API errors

Path parameters

orderId (required)
Path Parameter — ID of the order that needs to be deleted format: int64

Responses

400

Invalid ID supplied

404

Order not found

Up
get /store/inventory
Returns pet inventories by status (getInventory)
Returns a map of status codes to quantities

Return type

map[String, Integer]

Example data

Content-Type: application/json
{
  "key" : 0
}

Produces

This API call produces the following media types according to the Accept 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 >= 1 and <= 10.\ \ Other values will generated exceptions

Path parameters

orderId (required)
Path Parameter — ID of pet that needs to be fetched format: int64

Return type

Order

Example data

Content-Type: application/json
{
  "petId" : 6,
  "quantity" : 1,
  "id" : 0,
  "shipDate" : "2000-01-23T04:56:07.000+00:00",
  "complete" : false,
  "status" : "placed"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation Order

400

Invalid ID supplied

404

Order not found

Up
post /store/order
Place an order for a pet (placeOrder)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Order (required)
Body Parameter — order placed for purchasing the pet

Return type

Order

Example data

Content-Type: application/json
{
  "petId" : 6,
  "quantity" : 1,
  "id" : 0,
  "shipDate" : "2000-01-23T04:56:07.000+00:00",
  "complete" : false,
  "status" : "placed"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation Order

400

Invalid Order

User

Up
post /user
Create user (createUser)
This can only be done by the logged in user.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body User (required)
Body Parameter — Created user object

Responses

default

successful operation

Up
post /user/createWithArray
Creates list of users with given input array (createUsersWithArrayInput)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body User (required)
Body Parameter — List of user object

Responses

default

successful operation

Up
post /user/createWithList
Creates list of users with given input array (createUsersWithListInput)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body User (required)
Body Parameter — List of user object

Responses

default

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

Responses

400

Invalid username supplied

404

User not found

Up
get /user/{username}
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

User

Example data

Content-Type: application/json
{
  "firstName" : "firstName",
  "lastName" : "lastName",
  "password" : "password",
  "userStatus" : 6,
  "phone" : "phone",
  "id" : 0,
  "email" : "email",
  "username" : "username"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation User

400

Invalid username supplied

404

User not found

Up
get /user/login
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

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

successful operation String

400

Invalid username/password supplied

Up
get /user/logout
Logs out current logged in user session (logoutUser)

Responses

default

successful operation

Up
put /user/{username}
Updated user (userUsernamePut)
This can only be done by the logged in user.

Path parameters

username (required)
Path Parameter — name that need to be updated

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body User (required)
Body Parameter — Updated user object

Responses

400

Invalid user supplied

404

User not found

Models

[ Jump to Methods ]

Table of Contents

  1. AllPetsResponse
  2. ApiResponse
  3. Cat
  4. Category
  5. Dog
  6. Macaw
  7. Order
  8. Parakeet
  9. PartFour
  10. PartMaster
  11. PartOne
  12. PartThree
  13. PartTwo
  14. Pet
  15. Pup
  16. Tag
  17. Test
  18. User
  19. body
  20. body_1
  21. body_2
  22. inline_response_200
  23. inline_response_200_1
  24. val_MemberChoice1
  25. val_MemberChoice2
  26. val_Members

AllPetsResponse Up

ApiResponse Up

code (optional)
Integer format: int32
type (optional)
message (optional)

Cat Up

id (optional)
Long format: int64
name
example: doggie
status (optional)
String pet status in the store
Enum:
available
pending
sold
part (optional)
items oneOf: Dog    Cat   
hunts (optional)
age (optional)

Category Up

id (optional)
Long format: int64
name (optional)
subcategories (optional)

Dog Up

id (optional)
Long format: int64
name
example: doggie
status (optional)
String pet status in the store
Enum:
available
pending
sold
part (optional)
items oneOf: Dog    Cat   
bark (optional)
breed (optional)
Enum:
Dingo
Husky
Retriever
Shepherd

Macaw Up

color (optional)
singer (optional)

Order Up

id (optional)
Long format: int64
petId (optional)
Long format: int64
quantity (optional)
Integer format: int32
shipDate (optional)
Date format: date-time
status (optional)
String Order Status
Enum:
placed
approved
delivered
complete (optional)

Parakeet Up

color (optional)
soundRepeater (optional)

PartFour Up

otherIdPart (optional)

PartMaster Up

destination (optional)
oneOf: PartOne    PartTwo   
origin (optional)
oneOf: PartThree    PartFour   

PartOne Up

name (optional)
String A test description

PartThree Up

otherId (optional)

PartTwo Up

id (optional)

Pet Up

id (optional)
Long format: int64
name
example: doggie
status (optional)
String pet status in the store
Enum:
available
pending
sold
part (optional)
items oneOf: Dog    Cat   

Pup Up

id (optional)
Long format: int64

Tag Up

id (optional)
Long format: int64
name (optional)

Test Up

User Up

id (optional)
Long format: int64
username (optional)
firstName (optional)
lastName (optional)
email (optional)
password (optional)
phone (optional)
userStatus (optional)
Integer User Status format: int32

body Up

name (optional)
String Updated name of the pet
status (optional)
String Updated status of the pet

body_1 Up

parrots (optional)
items anyOf: Macaw    Parakeet   

body_2 Up

inline_response_200 Up

parrots (optional)
items oneOf: Macaw    Parakeet   

inline_response_200_1 Up

val_MemberChoice1 Up

Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due.
val_date_of_birth
date Business Term: Date Of Birth Definition: The date of birth of the member. Purpose: To be able to uniquely identify a member within a scheme. format: date
val_leaving_date (optional)
date Business Term: Leaving Date Definition: The date the member left/is due to leave the scheme. Purpose: To identify those members that have left or are due to leave the scheme. To be able to calculate the benefit insured/premium payable in respect of the member/category. format: date

val_MemberChoice2 Up

Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due.
val_leaving_date (optional)
date Business Term: Leaving Date Definition: The date the member left/is due to leave the scheme. Purpose: To identify those members that have left or are due to leave the scheme. To be able to calculate the benefit insured/premium payable in respect of the member/category. format: date

val_Members Up

Business Term: Scheme Members Definition: Information about the Members of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due.
val_member
array[null] Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due.
items oneOf: val_MemberChoice1    val_MemberChoice2