Skip to content

find pet by id

GET
/pets/{id}
curl --request GET \
--url https://petstore.swagger.io/v2/pets/1

Returns a user based on a single ID, if the user does not have access to the pet

id
required
integer format: int64

ID of pet to fetch

age
integer format: int32

Age of pet to fetch

Pet response

Media type application/json
object
name
required
string
tag
string
id
required
integer format: int64
Example generated
{
"name": "example",
"tag": "example",
"id": 1
}

Unexpected error

Media type application/json
object
code
required
integer format: int32
message
required
string
Example generated
{
"code": 1,
"message": "example"
}