/pet/{petId}This endpoint returns a single pet by its numeric ID. The ID must be a valid integer.
You can use this endpoint to check if a pet exists before performing updates:
const pet = await fetch("/v2/pet/123").then(r => r.json());
if (pet.status === "available") {
// Safe to update
}| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| petId | path | integer(int64) | required | ID of pet to return |
Schema: Pet
pet status in the store
curl -X GET "https://petstore.swagger.io/v2/pet/{petId}"