GET/pet/{petId}

Get a pet by ID

Retrieves a single pet record from the store by its identifier. Supply the petId path parameter to select the pet. The response contains the pet's details, including its name, photo URLs, status, category, and tags.

1 parameter
petIdintegerrequired

The integer identifier of the pet to retrieve.

4 status codes
200Returns the 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 supplied pet ID is invalid.
404Returned when the pet is not found.
defaultUnexpected error

Error handling

The petId path parameter must be a valid pet identifier; an invalid ID returns a 400. A 404 is returned when the pet is not found.