GET/pet/{petId}

Get a pet by ID

Retrieves a pet from the store by its identifier. Use the petId path parameter to select the pet. The response contains the pet's details, including its name, photos, and store status.

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

4 status codes
200Returns the pet object, including its identifier, name, photos, category, tags, and status.
idintegeroptional
namestringrequired
categoryobjectoptional
photoUrlsarray<string>required
tagsarray<object>optional
statusstringoptional
pet status in the store
Allowed:availablependingsold
400Returned when the supplied pet identifier is invalid.
404Returned when no pet is found for the supplied identifier.
defaultUnexpected error

Error handling

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