AI Assistant

How can I help you today?

PetsUpdate Pets Petid
Pets

PUT /pets/{petId}

Update an existing pet's information

curl -X PUT "https://api.petstore.example.com/v1/pets/123" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "John Doe",
  "categoryId": 123,
  "photoUrls": [
    "example_string"
  ],
  "status": "available",
  "age": 25,
  "breed": "example_string",
  "description": "example_string"
}'
{
  "id": 123,
  "name": "Buddy",
  "category": {
    "id": 1,
    "name": "Dogs",
    "description": "All types of dogs"
  },
  "photoUrls": [
    "https://images.petstore.example.com/pets/123/main.jpg",
    "https://images.petstore.example.com/pets/123/side.jpg"
  ],
  "tags": [
    {
      "id": 1,
      "name": "friendly"
    }
  ],
  "status": "available",
  "age": 3,
  "breed": "Golden Retriever",
  "description": "Friendly and energetic dog, great with kids",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:45:00Z"
}
PUT
/pets/{petId}
PUT
Security Scheme
Bearer Tokenstring
Required

JWT token obtained from the login endpoint

JWT token obtained from the login endpoint
path
petIdinteger
Required

ID of the pet to update

Format: int64
Content-Typestring
Required

The media type of the request body

Options: application/json
categoryIdinteger
Format: int64
statusstring
Options: available, pending, sold
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token obtained from the login endpoint

Path Parameters

petIdinteger
Required

ID of the pet to update

Responses

idinteger
Required

Unique identifier for the pet

namestring
Required

Pet's name

categoryobject
Required
photoUrlsstring[]

Array of photo URLs

tagsarray

Pet tags for categorization

statusstring
Required

Pet status in the store

ageinteger

Pet's age in years

breedstring

Pet's breed

descriptionstring

Detailed description of the pet

createdAtstring

Timestamp when the pet was added

updatedAtstring

Timestamp when the pet was last updated