Pets
Get a pet
Retrieve one pet by its numeric identifier.
Returns one pet. The operation accepts either the api_key scheme or OAuth 2.0 with both pet scopes.
Return a single pet by ID.
GET
/pet/{petId}API key. Supply this header or the OAuth 2.0 bearer credential.
OAuth 2.0 bearer token with `write:pets` and `read:pets` scopes. Supply this header or `api_key`.
ID of the pet to return.
Response
{200}Successful operation
{400}Invalid ID supplied
{404}Pet not found
cURL
curl --request GET \ --url https://petstore3.swagger.io/api/v3/pet/10 \ --header 'api_key: example_api_key' \ --header 'Authorization: Bearer example_access_token'
{
"id": 10,
"name": "doggie",
"category": { "id": 1, "name": "Dogs" },
"photoUrls": ["https://example.com/images/doggie.jpg"],
"tags": [{ "id": 1, "name": "friendly" }],
"status": "available"
}The contract also defines a default Unexpected error response without a fixed status or body schema.