GET/pet/{petId}

Get a pet by ID

Retrieves a single pet record from the store by its identifier. Supply petId to select the pet you want to retrieve. The response contains the pet's available details.

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

4 status codes
200Returns the pet object, including its name, photo URLs, and any available identifier, 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 identifier is invalid.
404Returned when no pet exists with the supplied identifier.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned when the petId path parameter is invalid. A 404 is returned when no pet exists with the supplied petId.