Skip to content

Swagger Petsstore - OpenAPI 3.0 (1.0.20-SNAPSHOT)

This is a sample Pets 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 pets 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
Languages
Servers
Mock server
https://vlad.redocly.xyz/_mock/apis/petsstore
https://vlad.redocly.xyz/v3

pets

Everything about your Pets

Operations

Add a new pets to the store

Request

Add a new pets to the store

Security
petstore_auth
Bodyrequired

Create a new pets in the store

idinteger(int64)
Example: 10
namestringrequired
Example: "doggie"
categoryobject(Category)
photoUrlsArray of stringsrequired
tagsArray of objects(Tag)
statusstring

pets status in the store

Enum"available""pending""sold"
Example: "available"
curl -i -X POST \
  https://vlad.redocly.xyz/_mock/apis/petsstore/pets \
  -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": 1,
        "name": "name"
      }
    ],
    "status": "available"
  }'

Responses

Successful operation

Body
idinteger(int64)
Example: 10
namestringrequired
Example: "doggie"
categoryobject(Category)
photoUrlsArray of stringsrequired
tagsArray of objects(Tag)
statusstring

pets status in the store

Enum"available""pending""sold"
Example: "available"
Response
<pets>
  <id>10</id>
  <name>doggie</name>
  <category>
    <id>1</id>
    <name>Dogs</name>
  </category>
  <photoUrls>
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags>
    <tag>
      <id>1</id>
      <name>name</name>
    </tag>
  </tags>
  <status>available</status>
</pets>

Update an existing pets

Request

Update an existing pets by Id

Security
petstore_auth
Bodyrequired

Update an existent pets in the store

idinteger(int64)
Example: 10
namestringrequired
Example: "doggie"
categoryobject(Category)
photoUrlsArray of stringsrequired
tagsArray of objects(Tag)
statusstring

pets status in the store

Enum"available""pending""sold"
Example: "available"
curl -i -X PUT \
  https://vlad.redocly.xyz/_mock/apis/petsstore/pets \
  -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": 1,
        "name": "name"
      }
    ],
    "status": "available"
  }'

Responses

Successful operation

Body
idinteger(int64)
Example: 10
namestringrequired
Example: "doggie"
categoryobject(Category)
photoUrlsArray of stringsrequired
tagsArray of objects(Tag)
statusstring

pets status in the store

Enum"available""pending""sold"
Example: "available"
Response
<pets>
  <id>10</id>
  <name>doggie</name>
  <category>
    <id>1</id>
    <name>Dogs</name>
  </category>
  <photoUrls>
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags>
    <tag>
      <id>1</id>
      <name>name</name>
    </tag>
  </tags>
  <status>available</status>
</pets>

Finds pets by status

Request

Multiple status values can be provided with comma separated strings

Security
petstore_auth
Query
statusstring

Status values that need to be considered for filter

Default "available"
Enum"available""pending""sold"
curl -i -X GET \
  'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/findByStatus?status=available' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful operation

BodyArray [
idinteger(int64)
Example: 10
namestringrequired
Example: "doggie"
categoryobject(Category)
photoUrlsArray of stringsrequired
tagsArray of objects(Tag)
statusstring

pets status in the store

Enum"available""pending""sold"
Example: "available"
]
Response
<pets>
  <id>10</id>
  <name>doggie</name>
  <category>
    <id>1</id>
    <name>Dogs</name>
  </category>
  <photoUrls>
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags>
    <tag>
      <id>1</id>
      <name>name</name>
    </tag>
  </tags>
  <status>available</status>
</pets>

Finds pets by tags

Request

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Security
petstore_auth
Query
tagsArray of strings

Tags to filter by

curl -i -X GET \
  'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/findByTags?tags=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful operation

BodyArray [
idinteger(int64)
Example: 10
namestringrequired
Example: "doggie"
categoryobject(Category)
photoUrlsArray of stringsrequired
tagsArray of objects(Tag)
statusstring

pets status in the store

Enum"available""pending""sold"
Example: "available"
]
Response
<pets>
  <id>10</id>
  <name>doggie</name>
  <category>
    <id>1</id>
    <name>Dogs</name>
  </category>
  <photoUrls>
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags>
    <tag>
      <id>1</id>
      <name>name</name>
    </tag>
  </tags>
  <status>available</status>
</pets>

Find pets by ID

Request

Returns a single pets

Security
api_key or petstore_auth
Path
petIdinteger(int64)required

ID of pets to return

curl -i -X GET \
  'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}' \
  -H 'api_key: YOUR_API_KEY_HERE'

Responses

successful operation

Body
idinteger(int64)
Example: 10
namestringrequired
Example: "doggie"
categoryobject(Category)
photoUrlsArray of stringsrequired
tagsArray of objects(Tag)
statusstring

pets status in the store

Enum"available""pending""sold"
Example: "available"
Response
<pets>
  <id>10</id>
  <name>doggie</name>
  <category>
    <id>1</id>
    <name>Dogs</name>
  </category>
  <photoUrls>
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags>
    <tag>
      <id>1</id>
      <name>name</name>
    </tag>
  </tags>
  <status>available</status>
</pets>

Updates a pets in the store with form data

Request

Security
petstore_auth
Path
petIdinteger(int64)required

ID of pets that needs to be updated

Query
namestring

Name of pets that needs to be updated

statusstring

Status of pets that needs to be updated

curl -i -X POST \
  'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}?name=string&status=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Invalid input

Deletes a pets

Request

Security
petstore_auth
Path
petIdinteger(int64)required

Pet id to delete

Headers
api_keystring
curl -i -X DELETE \
  'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'api_key: string'

Responses

Invalid pets value

Uploads an image

Request

Security
petstore_auth
Path
petIdinteger(int64)required

ID of pets to update

Query
additionalMetadatastring

Additional Metadata

Bodyapplication/octet-stream
string(binary)
curl -i -X POST \
  'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}/uploadImage?additionalMetadata=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/octet-stream' \
  -d string

Responses

successful operation

Bodyapplication/json
codeinteger(int32)
Example: 1
typestring
Example: "type"
messagestring
Example: "test message"
Response
application/json
{ "code": 1, "type": "type", "message": "test message" }

store

Access to Petsstore orders

Operations

user

Operations about user

Operations