GET/pet/{petId}

Retrieve a pet by ID

Retrieves a pet from the store by its identifier. Supply the pet's petId to look up its details. The response includes the pet's identifier, name, photo URLs, status, category, and tags.

1 parameter
petIdintegerrequired

The int64 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

A 400 is returned when the supplied pet ID is invalid, and a 404 when the pet is not found. The petId path parameter must be an int64 identifier.