PUT/pet

Replace a pet record

Replaces an existing pet record in the store with the supplied pet details. Supply name and photoUrls; status, if provided, must be available, pending, or sold. A 200 response returns the updated pet object.

6 body fields

Pet details to replace the existing store record. name and photoUrls are required.

categoryobjectoptional

The pet's category, with an optional integer id and category name.

idintegeroptional

The pet's integer identifier.

namestringrequired

The pet's name.

photoUrlsarray<string>required

An array of URLs for photos of the pet.

statusstringoptional

pet status in the store

Allowed:availablependingsold
tagsarray<object>optional

An array of tags, each with an optional integer id and tag name.

5 status codes
200Returns the updated pet object, including its identifier, name, photo URLs, status, category, and tags.
categoryobjectoptional
idintegeroptional
namestringrequired
photoUrlsarray<string>required
statusstringoptional

pet status in the store

Allowed:availablependingsold
tagsarray<object>optional
400Returned when the supplied pet ID is invalid.
404Returned when the pet is not found.
422Returned when the request fails validation.
defaultUnexpected error

Error handling

name and photoUrls are required. status must be one of available, pending, or sold when provided; invalid input returns a 400, and a validation failure returns a 422. A 404 indicates that the pet was not found.