Download OpenAPI specification:
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at https://swagger.io. In the third iteration of the pet store, we've switched to the design first approach! You can now help us improve the API whether it's by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
Some useful links:
Update an existing pet by Id.
Update an existent pet in the store
Pet object that needs to be added to the store
null
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
Add a new pet to the store.
Create a new pet in the store
id | integer <int64> |
name required | string |
object (Category) | |
photoUrls required | Array of strings |
Array of objects (Tag) | |
status | string Enum: "available" "pending" "sold" pet status in the store |
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
Multiple status values can be provided with comma separated strings.
status | string Default: "available" Enum: "available" "pending" "sold" Status values that need to be considered for filter |
[- {
- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
]
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
tags | Array of strings Tags to filter by |
[- {
- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
]
Returns a single pet.
petId required | integer <int64> ID of pet to return |
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
Updates a pet resource based on the form data.
petId required | integer <int64> ID of pet that needs to be updated |
name | string Name of pet that needs to be updated |
status | string Status of pet that needs to be updated |
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
Upload image of the pet.
petId required | integer <int64> ID of pet to update |
additionalMetadata | string Additional Metadata |
{- "code": 0,
- "type": "string",
- "message": "string"
}
Place a new order in the store.
id | integer <int64> |
petId | integer <int64> |
quantity | integer <int32> |
shipDate | string <date-time> |
status | string Enum: "placed" "approved" "delivered" Order Status |
complete | boolean |
{- "id": 10,
- "petId": 198772,
- "quantity": 7,
- "shipDate": "2019-08-24T14:15:22Z",
- "status": "approved",
- "complete": true
}
{- "id": 10,
- "petId": 198772,
- "quantity": 7,
- "shipDate": "2019-08-24T14:15:22Z",
- "status": "approved",
- "complete": true
}
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.
orderId required | integer <int64> ID of order that needs to be fetched |
{- "id": 10,
- "petId": 198772,
- "quantity": 7,
- "shipDate": "2019-08-24T14:15:22Z",
- "status": "approved",
- "complete": true
}
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors.
orderId required | integer <int64> ID of the order that needs to be deleted |
{- "code": "string",
- "message": "string"
}
This can only be done by the logged in user.
Created user object
id | integer <int64> |
username | string |
firstName | string |
lastName | string |
string | |
password | string |
phone | string |
userStatus | integer <int32> User Status |
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}
Creates list of users with given input array.
List of user object
null
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}
Get user detail based on username.
username required | string The name that needs to be fetched. Use user1 for testing |
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}
This can only be done by the logged in user.
username required | string name that need to be deleted |
Update an existent user in the store
id | integer <int64> |
username | string |
firstName | string |
lastName | string |
string | |
password | string |
phone | string |
userStatus | integer <int32> User Status |
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}
{- "code": "string",
- "message": "string"
}