Find pet by ID
Find a pet by its unique ID.
GET https://petstore3.swagger.io/api/v3/pet/{petId}
Examples
- API Key
- OAuth 2.0
cURL
GET "https://petstore3.swagger.io/api/v3/pet/210" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"
cURL
GET "https://petstore3.swagger.io/api/v3/pet/210" \
-H "accept: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>"
Responses
| Code | Description |
|---|---|
| 200 | Successful operation |
| 400 | Invalid ID supplied |
| 404 | Pet not found |
| default | Unexpected error |
Response example
200: Successful operation
Response
{
"id": 210,
"name": "Krypto",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
petId | integer | ID of pet to return |