GET/pet/{petId}

Get a pet by ID

Retrieves a single pet from the store by its identifier. Supply the pet's integer petId to look up the corresponding pet.

1 parameter
petIdintegerrequired
The int64 identifier of the pet to retrieve.

4 status codes
200Returns the pet object, including its identifier, name, photo URLs, and any category, tags, or 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 no pet is found with the supplied ID.
defaultUnexpected error

Error handling

The petId path parameter must be an integer identifier for the pet. An invalid ID returns a 400, and a 404 is returned when no pet is found for that ID.