# Update an existing pet

`PUT /pet`

Operation ID: `updatePet`

Tags: `pet`

OpenAPI specification: https://raw.githubusercontent.com/PaloAltoNetworks/docusaurus-openapi-docs/main/demo/examples/petstore.yaml

## Servers

- `https://petstore.swagger.io/v2`: Default server
- `https://petstore.swagger.io/sandbox`: Sandbox server
- `http://127.0.0.1:4010`: Prism Mock API (local)

## Authentication

This operation requires:

- `petstore_auth` (OAuth 2.0: implicit (authorization URL http://petstore.swagger.io/api/oauth/dialog), scopes: `write:pets`, `read:pets`)

## Parameters

### Header parameters

- `Accept-Language` (string, default: `en-AU`, example: `en-US`)
  The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US

### Cookie parameters

- `cookieParam` (integer<int64>, required)
  Some cookie

## Request body (required)

Pet object that needs to be added to the store

### Content type: `application/json`

Schema: `Pet`

A pet

- `id` (integer<int64>, read-only)
  Pet ID
  More information: Find more info here https://example.com
- `category` (Category)
  Categories this pet belongs to
  - `category.id` (integer<int64>, read-only)
    Category ID
  - `category.name` (string, non-empty)
    Category name
  - `category.sub` (object)
    Test Sub Category
    - `category.sub.prop1` (string)
      Dumb Property
- `name` (string, required, example: `Guru`)
  The name given to a pet
- `photoUrls` (string<url>[], required, max items: 20)
  The list of URL to a cute photos featuring pet
- `friend` (circular reference to Pet)
- `tags` (Tag[], required, min items: 1)
  Tags attached to the pet
  - `tags[].id` (integer<int64>, read-only)
    Tag ID
  - `tags[].name` (string, non-empty)
    Tag name
- `status` (string, possible values: `available`, `pending`, `sold`)
  Pet status in the store
  - `available`: When the pet is available
  - `pending`: When the pet is being sold
  - `sold`: When the pet has been sold.

    These descriptions can contain line

    breaks and also [links](https://docusaurus.io/)
- `petType` (string, discriminator)
  Type of a pet
  - The value selects one of these schemas:
    - `cat`: Cat (object)
      A representation of a cat
      Also includes all fields of Pet (circular reference, not repeated here).
      - `huntingSkill` (string, required, possible values: `clueless`, `lazy`, `adventurous`, `aggressive`, default: `lazy`, example: `adventurous`)
        The measured skill for hunting
    - `dog`: Dog (object)
      A representation of a dog
      Also includes all fields of Pet (circular reference, not repeated here).
      - `packSize` (integer<int32>, required, >= 1, default: `1`)
        The size of the pack the dog is from
    - `bee`: HoneyBee (object)
      A representation of a honey bee
      Also includes all fields of Pet (circular reference, not repeated here).
      - `honeyPerDay` (number, required, multiple of 0.01, default: `0`, example: `3.14`)
        Average amount of honey produced per day in ounces

Example:

```json
{
  "summary": "A great example!",
  "category": {
    "name": "Great Dane",
    "sub": {
      "prop1": "Just a test property"
    }
  },
  "name": "Pepper",
  "photoUrls": [
    "https://assets.orvis.com/is/image/orvisprd/great-dane"
  ],
  "tags": [
    {
      "name": "Great Danes"
    }
  ],
  "status": "pending",
  "petType": {
    "huntingSkill": "lazy"
  }
}
```

### Content type: `application/xml`

Schema: `object`

- `name` (string)
  hooray

## Responses

### 400

Invalid ID supplied

### 404

Pet not found

### 405

Validation exception
