GET/pet/{petId}

Get a pet by ID

Retrieves a pet record by its identifier. Use petId to specify which pet to retrieve.

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

4 status codes
200Returns the pet record, including its name, photo URLs, and any 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 ID is invalid.
404Returned when the pet cannot be found.
defaultUnexpected error

Error handling

An invalid petId returns a 400, and a pet that cannot be found returns a 404. The petId path parameter identifies the pet to retrieve.