Skip to content

Swagger Petstore (1.0.0)

My lovely API

This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.

Introduction

This API is documented in OpenAPI format and is based on Petstore sample provided by swagger.io team. It was extended to illustrate features of generator-openapi-repo tool and ReDoc documentation. In addition to standard OpenAPI syntax we use a few vendor extensions.

OpenAPI Specification

This API is documented in OpenAPI format and is based on Petstore sample provided by swagger.io team. It was extended to illustrate features of generator-openapi-repo tool and ReDoc documentation. In addition to standard OpenAPI syntax we use a few vendor extensions.

Cross-Origin Resource Sharing

This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec. And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.

Authentication

Petstore offers two forms of authentication:

  • API Key
  • OAuth2 OAuth2 - an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.
Download OpenAPI description
Languages
Servers
Mock server

https://innovario.apishowdown.com/_mock/petstore/

Default server

https://petstore.swagger.io/v2/

Sandbox server

https://petstore.swagger.io/sandbox/

Operations

Request

Add new pet to the store inventory.

Security
petstore_auth
Cookies
cookieParaminteger(int64)required

Some cookie

Headers
Accept-Languagestring

The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US

Default en-AU
Example: en-US
Bodyrequired

Pet object that needs to be added to the store

categoryobject(Category)

Categories this pet belongs to

namestringrequired

The name given to a pet

Example: "Guru"
photoUrlsstring or integer or null[ 1 .. 10 ] itemsrequired

The list of URL to a cute photos featuring pet

Default []
One of:

The list of URL to a cute photos featuring pet

[ 1 .. 15 ] items
string or integer or null(isString)[ 1 .. 15 ] items

The list of URL to a cute photos featuring pet

Default []
friendobject(Pet)Recursive
tagsArray of objects(Tag)( 0 .. 100 )

Tags attached to the pet

statusstring

Pet status in the store

Default "pending"
Enum"available""pending""sold"
petTypestring

Type of a pet

Discriminator
huntingSkillstring or boolean or integerrequired

The measured skill for hunting

Default "lazy"
Enum"clueless""lazy""adventurous""aggressive"012
Example: "adventurous"
curl -i -X POST \
  https://innovario.apishowdown.com/_mock/petstore/pet \
  -H 'Accept-Language: en-US' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -b cookieParam=0 \
  -d '{
    "category": {
      "name": "string",
      "sub": {
        "prop1": "string"
      }
    },
    "name": "Guru",
    "photoUrls": [],
    "friend": {},
    "tags": [
      {
        "name": "string"
      }
    ],
    "status": "available",
    "petType": "cat",
    "huntingSkill": "adventurous"
  }'

Responses

Invalid input

Request

Security
petstore_auth
Cookies
cookieParaminteger(int64)required

Some cookie

Headers
Accept-Languagestring

The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US

Default en-AU
Example: en-US
Bodyrequired

Pet object that needs to be added to the store

categoryobject(Category)

Categories this pet belongs to

namestringrequired

The name given to a pet

Example: "Guru"
photoUrlsstring or integer or null[ 1 .. 10 ] itemsrequired

The list of URL to a cute photos featuring pet

Default []
One of:

The list of URL to a cute photos featuring pet

[ 1 .. 15 ] items
string or integer or null(isString)[ 1 .. 15 ] items

The list of URL to a cute photos featuring pet

Default []
friendobject(Pet)Recursive
tagsArray of objects(Tag)( 0 .. 100 )

Tags attached to the pet

statusstring

Pet status in the store

Default "pending"
Enum"available""pending""sold"
petTypestring

Type of a pet

Discriminator
huntingSkillstring or boolean or integerrequired

The measured skill for hunting

Default "lazy"
Enum"clueless""lazy""adventurous""aggressive"012
Example: "adventurous"
curl -i -X PUT \
  https://innovario.apishowdown.com/_mock/petstore/pet \
  -H 'Accept-Language: en-US' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -b cookieParam=0 \
  -d '{
    "category": {
      "name": "string",
      "sub": {
        "prop1": "string"
      }
    },
    "name": "Guru",
    "photoUrls": [],
    "friend": {},
    "tags": [
      {
        "name": "string"
      }
    ],
    "status": "available",
    "petType": "cat",
    "huntingSkill": "adventurous"
  }'

Responses

Invalid ID supplied

Request

Cookies
cookieParaminteger(int64)required

Some cookie

Headers
Accept-Languagestring

The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US

Default en-AU
Example: en-US
curl -i -X DELETE \
  https://innovario.apishowdown.com/_mock/petstore/pet \
  -H 'Accept-Language: en-US' \
  -b cookieParam=0
Operations

webhooks

Everything about your Webhooks

Webhooks
Operations