Update an existing pet

PUT /pet

Update an existing pet by Id

Body Required

Update an existent pet in the store

  • id integer(int64)
  • name string Required
  • category object

    Additional properties are allowed.

    Hide category attributes Show category attributes object
    • id integer(int64)
    • name string
  • photoUrls array[string] Required
  • tags array[object]
    Hide tags attributes Show tags attributes object
    • id integer(int64)
    • name string
  • status string

    pet status in the store

    Values are available, pending, or sold.

Body Required

Update an existent pet in the store

  • id integer(int64)
  • name string Required
  • category object

    Additional properties are allowed.

    Hide category attributes Show category attributes object
    • id integer(int64)
    • name string
  • photoUrls array[string] Required
  • tags array[object]
    Hide tags attributes Show tags attributes object
    • id integer(int64)
    • name string
  • status string

    pet status in the store

    Values are available, pending, or sold.

Body Required

Update an existent pet in the store

  • id integer(int64)
  • name string Required
  • category object

    Additional properties are allowed.

    Hide category attributes Show category attributes object
    • id integer(int64)
    • name string
  • photoUrls array[string] Required
  • tags array[object]
    Hide tags attributes Show tags attributes object
    • id integer(int64)
    • name string
  • status string

    pet status in the store

    Values are available, pending, or sold.

Responses

  • Successful operation

    Hide response attributes Show response attributes object
    • id integer(int64)
    • name string Required
    • category object

      Additional properties are allowed.

      Hide category attributes Show category attributes object
      • id integer(int64)
      • name string
    • photoUrls array[string] Required
    • tags array[object]
      Hide tags attributes Show tags attributes object
      • id integer(int64)
      • name string
    • status string

      pet status in the store

      Values are available, pending, or sold.

    Hide response attributes Show response attributes object
    • id integer(int64)
    • name string Required
    • category object

      Additional properties are allowed.

      Hide category attributes Show category attributes object
      • id integer(int64)
      • name string
    • photoUrls array[string] Required
    • tags array[object]
      Hide tags attributes Show tags attributes object
      • id integer(int64)
      • name string
    • status string

      pet status in the store

      Values are available, pending, or sold.

  • 400

    Invalid ID supplied

  • 404

    Pet not found

  • 405

    Validation exception

curl \
 --request PUT '/api/v3/pet' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"id":10,"name":"doggie","category":{"id":1,"name":"Dogs"},"photoUrls":["string"],"tags":[{"id":42,"name":"string"}],"status":"available"}'
curl \
 --request PUT '/api/v3/pet' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/xml"
curl \
 --request PUT '/api/v3/pet' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'id=10&name=doggie&category=%7B%22id%22%3D%3E1%2C+%22name%22%3D%3E%22Dogs%22%7D&photoUrls=string&tags=%7B%22id%22%3D%3E42%2C+%22name%22%3D%3E%22string%22%7D&status=available'
Request examples
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id type="integer">10</id>
  <name>doggie</name>
  <category>
    <id type="integer">1</id>
    <name>Dogs</name>
  </category>
  <photoUrls type="array">
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags type="array">
    <tag>
      <id type="integer">42</id>
      <name>string</name>
    </tag>
  </tags>
  <status>available</status>
</root>
Response examples (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id type="integer">10</id>
  <name>doggie</name>
  <category>
    <id type="integer">1</id>
    <name>Dogs</name>
  </category>
  <photoUrls type="array">
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags type="array">
    <tag>
      <id type="integer">42</id>
      <name>string</name>
    </tag>
  </tags>
  <status>available</status>
</root>
Response examples (200)
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}