Get Pet By Id
Returns a single pet.
Request
URI
GET
https://petstore3.swagger.io/pet/{petId}
COPY
Path Parameters
integer
petId
Required
ID of pet to return
Responses
200
successful operation
Returns
Pet
of type(s)
application/json
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"0": "P",
"1": "e",
"2": "t",
"3": " ",
"4": "O",
"5": "b",
"6": "j",
"7": "e",
"8": "c",
"9": "t",
"id": 0,
"name": "string"
}
],
"status": "string"
}
integer As int64
As int64
id
Optional
id
string
name
Required
name
object
category
Optional
category
array of
string
photoUrls
Required
photoUrls
array of
object
tags
Optional
tags
string
status
Optional
pet status in the store
Possible values are :
available,
pending,
sold,
400
Invalid ID supplied
Operation doesn't return any data structure
404
Pet not found
Operation doesn't return any data structure
default
Unexpected error
Returns
Error
of type(s)
application/json
"Error Object"
string
code
Required
code
string
message
Required
message
Code Samples
COPY
curl -H 'Authorization: <value>' https://{api_host}/pet/{petId}