PUT
/petReplace a pet
Replaces an existing pet in the store with the supplied pet details. Include name and photoUrls in each request; status, if provided, must be available, pending, or sold.
Pet details to replace the existing pet record. name and photoUrls are required.
idintegeroptional
The pet's unique identifier.
namestringrequired
The pet's name.
categoryobjectoptional
The pet's category, with an optional identifier and name.
photoUrlsarray<string>required
An array of URLs for photos of the pet.
tagsarray<object>optional
An array of tags, each with an optional identifier and name.
statusstringoptional
pet status in the store
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
400Returned when the supplied pet ID is invalid.
404Returned when the pet to update is not found.
422Returned when the request fails validation.
defaultUnexpected error
Error handling
A 400 is returned when the pet ID is invalid, a 404 when the pet is not found, and a 422 for a validation exception. name and photoUrls are required, and status must be one of available, pending, or sold.