On this page
Find pet by ID.
Returns a single pet.
GET
/pet/{petId}Find pet by ID.curl 'https://petstore3.swagger.io/api/v3/pet/0' \
-H 'api_key: <api_key>'Example response · 200
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}#Authentication
Requests need one of these:
petstore_authwrite:petsread:pets#Parameters
petIdinteger (int64)requiredpathID of pet to return
#Responses
successful operation
application/json application/xml · Type: Pet
idinteger (int64)namestringrequiredcategoryCategoryphotoUrlsarray of stringrequiredtagsarray of Tagstatusstringpet status in the store
Allowed values: "available", "pending", "sold"
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}<pet>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>0</id>
<name>string</name>
</tag>
</tags>
<status>available</status>
</pet>Invalid ID supplied
Pet not found
Unexpected error