GET/pet/{petId}

Get a pet by ID

Retrieves a single pet by its identifier. Use the petId path parameter to identify the pet you want to retrieve.

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

4 status codes
200Returns the pet object with its identifier, name, category, photo URLs, 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 ID is invalid.
404Returned when no pet is found for the supplied ID.
defaultUnexpected error

Error handling

A 400 is returned when the petId path parameter is invalid. A 404 is returned when no pet is found for the supplied petId.