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