Swagger Petstore - OpenAPI 3.0· docs by DocoAPI
v1.0.27
GET/pet/{petId}
operationId: getPetById

Find pet by ID.

Returns a single pet.

🔒api_keyapi_key: <your-key>
🔒petstore_auth

Parameters

Path Parameters
petIdinteger (int64)required

ID of pet to return

Responses

200 OK — successful operation
400 Bad Request — Invalid ID supplied
404 Not Found — Pet not found
default — Unexpected error

⚡ Try it out