#API Document ## BasePath: http://petstore.swagger.wordnik.com/api ## Api Version: 0.2 ## Resources ### 1. /user #### Overview Operations about user #### 1.1 `/user.{format}/createWithArray` ##### 1.1.1 createUsersWithArrayInput **POST** `/user.{format}/createWithArray` Creates list of users with given input array ###### URL http://petstore.swagger.wordnik.com/api/user.{format}/createWithArray ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>Array[User]</th> <td>true</td> <td>List of user object</td> <td><a href="#User">Array[User]</a></td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> </table> - - - #### 1.2 `/user.{format}` ##### 1.2.1 createUser **POST** `/user.{format}` Create user This can only be done by the logged in user. ###### URL http://petstore.swagger.wordnik.com/api/user.{format} ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>User</th> <td>true</td> <td>Created user object</td> <td><a href="#User">User</a></td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> </table> - - - #### 1.3 `/user.{format}/createWithList` ##### 1.3.1 createUsersWithListInput **POST** `/user.{format}/createWithList` Creates list of users with given list input ###### URL http://petstore.swagger.wordnik.com/api/user.{format}/createWithList ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>List[User]</th> <td>true</td> <td>List of user object</td> <td><a href="#User">List[User]</a></td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> </table> - - - #### 1.4 `/user.{format}/{username}` ##### 1.4.1 updateUser **PUT** `/user.{format}/{username}` Updated user This can only be done by the logged in user. ###### URL http://petstore.swagger.wordnik.com/api/user.{format}/{username} ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>User</th> <td>true</td> <td>Updated user object</td> <td><a href="#User">User</a></td> </tr> </table> - path <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>username</th> <td>true</td> <td>name that need to be deleted</td> <td>string</td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid username supplied</td> </tr> <tr> <td>404</td> <td>User not found</td> </tr> </table> - - - ##### 1.4.2 deleteUser **DELETE** `/user.{format}/{username}` Delete user This can only be done by the logged in user. ###### URL http://petstore.swagger.wordnik.com/api/user.{format}/{username} ###### Parameters - path <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>username</th> <td>true</td> <td>The name that needs to be deleted</td> <td>string</td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid username supplied</td> </tr> <tr> <td>404</td> <td>User not found</td> </tr> </table> - - - ##### 1.4.3 getUserByName **GET** `/user.{format}/{username}` Get user by user name ###### URL http://petstore.swagger.wordnik.com/api/user.{format}/{username} ###### Parameters - path <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>username</th> <td>true</td> <td>The name that needs to be fetched. Use user1 for testing.</td> <td>string</td> </tr> </table> ###### Response [User](#User) ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid username supplied</td> </tr> <tr> <td>404</td> <td>User not found</td> </tr> </table> - - - #### 1.5 `/user.{format}/login` ##### 1.5.1 loginUser **GET** `/user.{format}/login` Logs user into the system ###### URL http://petstore.swagger.wordnik.com/api/user.{format}/login ###### Parameters - query <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>username</th> <td>true</td> <td>The user name for login</td> <td>string</td> </tr> <tr> <th>password</th> <td>true</td> <td>The password for login in clear text</td> <td>string</td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid username and password combination</td> </tr> </table> - - - #### 1.6 `/user.{format}/logout` ##### 1.6.1 logoutUser **GET** `/user.{format}/logout` Logs out current logged in user session ###### URL http://petstore.swagger.wordnik.com/api/user.{format}/logout ###### Parameters ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> </table> - - - ### 2. /pet #### Overview Operations about pets #### 2.1 `/pet.{format}/{petId}` ##### 2.1.1 getPetById **GET** `/pet.{format}/{petId}` Find pet by ID Returns a pet based on ID ###### URL http://petstore.swagger.wordnik.com/api/pet.{format}/{petId} ###### Parameters - path <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>petId</th> <td>true</td> <td>ID of pet that needs to be fetched</td> <td>string</td> </tr> </table> ###### Response [Pet](#Pet) ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid ID supplied</td> </tr> <tr> <td>404</td> <td>Pet not found</td> </tr> </table> - - - #### 2.2 `/pet.{format}` ##### 2.2.1 addPet **POST** `/pet.{format}` Add a new pet to the store ###### URL http://petstore.swagger.wordnik.com/api/pet.{format} ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>Pet</th> <td>true</td> <td>Pet object that needs to be added to the store</td> <td><a href="#Pet">Pet</a></td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>405</td> <td>Invalid input</td> </tr> </table> - - - ##### 2.2.2 updatePet **PUT** `/pet.{format}` Update an existing pet ###### URL http://petstore.swagger.wordnik.com/api/pet.{format} ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>Pet</th> <td>true</td> <td>Pet object that needs to be updated in the store</td> <td><a href="#Pet">Pet</a></td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid ID supplied</td> </tr> <tr> <td>404</td> <td>Pet not found</td> </tr> <tr> <td>405</td> <td>Validation exception</td> </tr> </table> - - - #### 2.3 `/pet.{format}/findByStatus` ##### 2.3.1 findPetsByStatus **GET** `/pet.{format}/findByStatus` Finds Pets by status Multiple status values can be provided with comma seperated strings ###### URL http://petstore.swagger.wordnik.com/api/pet.{format}/findByStatus ###### Parameters - query <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>status</th> <td>true</td> <td>Status values that need to be considered for filter</td> <td>string</td> </tr> </table> ###### Response [List[Pet]](#Pet) ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid status value</td> </tr> </table> - - - #### 2.4 `/pet.{format}/findByTags` ##### 2.4.1 findPetsByTags **GET** `/pet.{format}/findByTags` Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. ###### URL http://petstore.swagger.wordnik.com/api/pet.{format}/findByTags ###### Parameters - query <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>tags</th> <td>true</td> <td>Tags to filter by</td> <td>string</td> </tr> </table> ###### Response [List[Pet]](#Pet) ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid tag value</td> </tr> </table> - - - ### 3. /store #### Overview Operations about store #### 3.1 `/store.{format}/order/{orderId}` ##### 3.1.1 getOrderById **GET** `/store.{format}/order/{orderId}` Find purchase order by ID For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors ###### URL http://petstore.swagger.wordnik.com/api/store.{format}/order/{orderId} ###### Parameters - path <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>orderId</th> <td>true</td> <td>ID of pet that needs to be fetched</td> <td>string</td> </tr> </table> ###### Response [Order](#Order) ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid ID supplied</td> </tr> <tr> <td>404</td> <td>Order not found</td> </tr> </table> - - - ##### 3.1.2 deleteOrder **DELETE** `/store.{format}/order/{orderId}` Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ###### URL http://petstore.swagger.wordnik.com/api/store.{format}/order/{orderId} ###### Parameters - path <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>orderId</th> <td>true</td> <td>ID of the order that needs to be deleted</td> <td>string</td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid ID supplied</td> </tr> <tr> <td>404</td> <td>Order not found</td> </tr> </table> - - - #### 3.2 `/store.{format}/order` ##### 3.2.1 placeOrder **POST** `/store.{format}/order` Place an order for a pet ###### URL http://petstore.swagger.wordnik.com/api/store.{format}/order ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>Order</th> <td>true</td> <td>order placed for purchasing the pet</td> <td><a href="#Order">Order</a></td> </tr> </table> ###### Errors <table border="1"> <tr> <th>Status Code</th> <th>Reason</th> </tr> <tr> <td>400</td> <td>Invalid order</td> </tr> </table> - - - ## Data Types ## <a name="Category">Category</a> <table border="1"> <tr> <th>type</th> <th>required</th> <th>access</th> <th>description</th> <th>notes</th> </tr> <tr> <th>id</th> <td>long</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>name</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> </table> ## <a name="Order">Order</a> <table border="1"> <tr> <th>type</th> <th>required</th> <th>access</th> <th>description</th> <th>notes</th> </tr> <tr> <th>id</th> <td>long</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>petId</th> <td>long</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>status</th> <td>string</td> <td>optional</td> <td>Order Status</td> <td>-</td> </tr> <tr> <th>quantity</th> <td>int</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>shipDate</th> <td>Date</td> <td>optional</td> <td>-</td> <td>-</td> </tr> </table> ## <a name="Pet">Pet</a> <table border="1"> <tr> <th>type</th> <th>required</th> <th>access</th> <th>description</th> <th>notes</th> </tr> <tr> <th>tags</th> <td><a href="#Tag">Array:Tag</a></td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>id</th> <td>long</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>category</th> <td><a href="#Category">Category</a></td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>status</th> <td>string</td> <td>optional</td> <td>pet status in the store</td> <td>-</td> </tr> <tr> <th>name</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>photoUrls</th> <td>Array:string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> </table> ## <a name="Tag">Tag</a> <table border="1"> <tr> <th>type</th> <th>required</th> <th>access</th> <th>description</th> <th>notes</th> </tr> <tr> <th>id</th> <td>long</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>name</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> </table> ## <a name="User">User</a> <table border="1"> <tr> <th>type</th> <th>required</th> <th>access</th> <th>description</th> <th>notes</th> </tr> <tr> <th>id</th> <td>long</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>lastName</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>phone</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>username</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>email</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>userStatus</th> <td>int</td> <td>optional</td> <td>User Status</td> <td>-</td> </tr> <tr> <th>firstName</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> <tr> <th>password</th> <td>string</td> <td>optional</td> <td>-</td> <td>-</td> </tr> </table>