GET/pet/{petId}

Get a pet by ID

Retrieves a pet record by its identifier. Use petId to select the pet whose details you want to retrieve.

1 parameter
petIdintegerrequired
The pet's numeric identifier, in int64 format.

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 ID is invalid.
404Returned when the pet is not found.
defaultReturned when an unexpected error occurs.

Error handling

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