Find pet by ID.
Returns a single pet.
GET
/pet/{petId}Path parameters
petIdinteger<int64>requiredID of pet to return
Responses
200successful operation
idinteger<int64>namestringrequiredcategoryCategoryShow propertiesHide properties
idinteger<int64>namestringphotoUrlsstring[]requiredtagsTag[]Show propertiesHide properties
Array of
Tagidinteger<int64>namestringstatusstringpet status in the store
Allowed:
availablependingsold400Invalid ID supplied
404Pet not found
defaultUnexpected error
Request
curl -X GET "/api/v3/pet/0"const response = await fetch("/api/v3/pet/0", {
method: "GET"
});import requests
response = requests.get(
"/api/v3/pet/0",
)Response
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}Invalid ID supplied
Pet not found
Unexpected error