PUT/pet

Replace a pet's details

Replaces a pet's details in the store. Supply name and photoUrls with each request; status, if provided, must be available, pending, or sold.

6 body fields

Pet details to replace in the store; send the request as JSON, XML, or URL-encoded form data.

idintegeroptional
The pet's identifier.
namestringrequired
The pet's name.
categoryobjectoptional
The pet's category, with an identifier and name.
photoUrlsarray<string>required
URLs for photos of the pet.
tagsarray<object>optional
Tags associated with the pet, each with an identifier and name.
statusstringoptional
pet status in the store
Allowed:availablependingsold

5 status codes
200Returns the updated pet object, including its identifier, name, category, photo URLs, tags, and status.
idintegeroptional
namestringrequired
categoryobjectoptional
photoUrlsarray<string>required
tagsarray<object>optional
statusstringoptional
pet status in the store
Allowed:availablependingsold
400Returned when the supplied pet ID is invalid.
404Returned when the pet to update is not found.
422Returned when the request fails validation.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned for an invalid pet ID, a 404 when the pet is not found, and a 422 when validation fails. name and photoUrls are required; status, when provided, must be one of available, pending, or sold.