GET/pet/{petId}

Get a pet by ID

Retrieves a single pet record by its identifier. Use the petId path parameter to select the pet. The response includes the pet's available details, such as its name, category, photo URLs, tags, and status.

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

4 status codes
200Returns the pet record, including 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 the pet cannot be found.
defaultReturned when an unexpected error occurs.

Error handling

The petId path parameter must be a 64-bit integer. An invalid ID returns a 400, and a pet that cannot be found returns a 404.