PUT/pet

Replace a pet record

Replaces an existing pet record in the store with the supplied pet details. Include name and photoUrls in every update; status, when supplied, must be available, pending, or sold.

6 body fields

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

categoryobjectoptional

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

idintegeroptional

The pet's unique identifier as a 64-bit integer.

namestringrequired

The pet's name.

photoUrlsarray<string>required

URLs for photos of the pet.

statusstringoptional

pet status in the store

Allowed:availablependingsold
tagsarray<object>optional

Tags associated with the pet, each with an integer id and a 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 pet ID or other input is invalid.
404Returned when the pet was not found.
422Returned when the request fails validation.
defaultUnexpected error

Error handling

A 400 is returned for an invalid pet ID or other invalid input. A 404 indicates that the pet was not found. name and photoUrls are required, and a 422 indicates a validation exception; if supplied, status must be one of available, pending, or sold.