API 1 - Swagger Petstore
Swagger Petstore - OpenAPI 3.0 (1.0.11)
Download OpenAPI specification:Download
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at http://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
Update an existing pet by Id
Authorizations:
Request Body schema:
Update an existent 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 |
Responses
Request samples
- Payload
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
Response samples
- 200
Add a new pet to the store
Add a new pet to the store
Authorizations:
Request Body schema:
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 |
Responses
Request samples
- Payload
{- "id": 10,
- "name": "doggie",
- "category": {
- "id": 1,
- "name": "Dogs"
}, - "photoUrls": [
- "string"
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
], - "status": "available"
}
Response samples
- 200
Finds Pets by status
Multiple status values can be provided with comma separated strings
Authorizations:
query Parameters
status | string Default: "available" Enum: "available" "pending" "sold" Status values that need to be considered for filter |
Responses
Response samples
- 200
uploads an image
Authorizations:
path Parameters
petId required | integer <int64> ID of pet to update |
query Parameters
additionalMetadata | string Additional Metadata |
Request Body schema: application/octet-stream
Responses
Response samples
- 200
{- "code": 0,
- "type": "string",
- "message": "string"
}
Place an order for a pet
Place a new order in the store
Request Body schema:
id | integer <int64> |
petId | integer <int64> |
quantity | integer <int32> |
shipDate | string <date-time> |
status | string Enum: "placed" "approved" "delivered" Order Status |
complete | boolean |
Responses
Request samples
- Payload
{- "id": 10,
- "petId": 198772,
- "quantity": 7,
- "shipDate": "2019-08-24T14:15:22Z",
- "status": "approved",
- "complete": true
}
Response samples
- 200
{- "id": 10,
- "petId": 198772,
- "quantity": 7,
- "shipDate": "2019-08-24T14:15:22Z",
- "status": "approved",
- "complete": true
}
Create user
This can only be done by the logged in user.
Request Body schema:
Created user object
id | integer <int64> |
username | string |
firstName | string |
lastName | string |
string | |
password | string |
phone | string |
userStatus | integer <int32> User Status |
Responses
Request samples
- Payload
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}
Response samples
- default
{- "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
Creates list of users with given input array
Request Body schema: application/json
id | integer <int64> |
username | string |
firstName | string |
lastName | string |
string | |
password | string |
phone | string |
userStatus | integer <int32> User Status |
Responses
Request samples
- Payload
[- {
- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}
]
Response samples
- 200
Update user
This can only be done by the logged in user.
path Parameters
username required | string name that need to be deleted |
Request Body schema:
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 |
Responses
Request samples
- Payload
{- "id": 10,
- "username": "theUser",
- "firstName": "John",
- "lastName": "James",
- "email": "john@email.com",
- "password": "12345",
- "phone": "12345",
- "userStatus": 1
}