Skip to content

Info for a specific pet

GET
/pets/{petId}
curl --request GET \
--url http://petstore.swagger.io/v1/pets/example
petId
required
string

The id of the pet to retrieve

Expected response to a valid request

Media typeapplication/json
object
id
required
integer format: int64
name
required
string
tag
string
Examplegenerated
{
"id": 1,
"name": "example",
"tag": "example"
}

Unexpected error

Media typeapplication/json
object
code
required
integer format: int32
message
required
string
Examplegenerated
{
"code": 1,
"message": "example"
}