GET/pet/{petId}

Get a pet by ID

Retrieves one pet from the store by its identifier. Supply petId as the integer identifier of the pet to retrieve. The response contains the pet's details, including its status and associated media.

1 parameter
petIdintegerrequired

The unique integer identifier of the pet to retrieve.

4 status codes
200Returns the pet object with its identifier, name, category, photo URLs, tags, and store status.
idintegeroptional
namestringrequired
categoryobjectoptional
photoUrlsarray<string>required
tagsarray<object>optional
statusstringoptional

pet status in the store

Allowed:availablependingsold
400Returned when petId is not a valid pet identifier.
404Returned when no pet exists with the supplied petId.
defaultUnexpected error

Error handling

The petId value must be a valid integer identifier. An invalid identifier returns a 400, while an identifier for a pet that does not exist returns a 404.