Everything about your Pets
Swagger Petstore - OpenAPI 3.0 (1.0.20-SNAPSHOT)
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:
Download OpenAPI description
Overview
Languages
Servers
Mock server
https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore
https://phronesis-inspironix.redocly.app/v3
Bodyrequired
- application/json
- application/xml
- application/x-www-form-urlencoded
Create a new pet in the store
- Mock serverhttps://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet
- https://phronesis-inspironix.redocly.app/v3/pet
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- application/json
- application/xml
- application/x-www-form-urlencoded
curl -i -X POST \
https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}'Response
- application/xml
- application/json
<pet>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>0</id>
<name>string</name>
</tag>
</tags>
<status>available</status>
</pet>Bodyrequired
- application/json
- application/xml
- application/x-www-form-urlencoded
Update an existent pet in the store
- Mock serverhttps://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet
- https://phronesis-inspironix.redocly.app/v3/pet
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- application/json
- application/xml
- application/x-www-form-urlencoded
curl -i -X PUT \
https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}'Response
- application/xml
- application/json
<pet>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>0</id>
<name>string</name>
</tag>
</tags>
<status>available</status>
</pet>Security
petstore_auth(Required scopes:
write:pets
read:pets
)- Mock serverhttps://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/findByStatus
- https://phronesis-inspironix.redocly.app/v3/pet/findByStatus
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/findByStatus?status=available' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
- application/xml
- application/json
<pet>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>0</id>
<name>string</name>
</tag>
</tags>
<status>available</status>
</pet>- Mock serverhttps://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}
- https://phronesis-inspironix.redocly.app/v3/pet/{petId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}' \
-H 'api_key: YOUR_API_KEY_HERE'Response
- application/xml
- application/json
<pet>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>0</id>
<name>string</name>
</tag>
</tags>
<status>available</status>
</pet>- Mock serverhttps://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}
- https://phronesis-inspironix.redocly.app/v3/pet/{petId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}?name=string&status=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}
- https://phronesis-inspironix.redocly.app/v3/pet/{petId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'api_key: string'- Mock serverhttps://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}/uploadImage
- https://phronesis-inspironix.redocly.app/v3/pet/{petId}/uploadImage
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://phronesis-inspironix.redocly.app/_mock/apis/pets-store-api/petstore/pet/{petId}/uploadImage?additionalMetadata=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/octet-stream' \
-d stringResponse
application/json
{ "code": 0, "type": "string", "message": "string" }