logo
On this page

Update an existing pet

PUT

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

Request

Header Parameters

    Accept-Language string

    Default value: en-AU

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

    Example: en-US

Cookie Parameters

    cookieParam int64required

    Some cookie

Body

required
Pet object that needs to be added to the store
    category Category
    Categories this pet belongs to
    name string

    Possible values: non-empty

    Category name

    sub object
    Test Sub Category
    prop1 string

    Dumb Property

    name stringrequired

    The name given to a pet

    photoUrls url[]required

    Possible values: <= 20

    The list of URL to a cute photos featuring pet

    friend
    tags Tag[]required
    Possible values: >= 1
    Tags attached to the pet
  • Array[
  • name string

    Possible values: non-empty

    Tag name

  • ]
  • status string

    Possible values: [available, pending, sold]

    Pet status in the store

    petType string
    Possible values: [cat, dog, bee]
    Type of a pet
    huntingSkill stringrequired

    Possible values: [clueless, lazy, adventurous, aggressive]

    Default value: lazy

    The measured skill for hunting

Responses

Invalid ID supplied

Authorization: oauth2

name: petstore_authtype: oauth2scopes: write:pets,read:petsdescription: Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
flows: {
  "implicit": {
    "authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
    "scopes": {
      "write:pets": "modify pets in your account",
      "read:pets": "read your pets"
    }
  }
}

1
Copied!
Request
Collapse all
Base URL
https://petstore.swagger.io/v2
Default server
Auth
Bearer Token
Parameters
cookierequired
header
Bodyrequired
Content-Type
application/json
{
"category": {
"name": "string",
"sub": {
"prop1": "string"
}
},
"name": "Guru",
"photoUrls": [
"string"
],
"friend": {},
"tags": [
{
"name": "string"
}
],
"status": "available",
"petType": {
"huntingSkill": "adventurous"
}
}
RESPONSEClear

Click the "Send" button above and see the response here!

On this page

Back to top