This operation retrieves a pet’s profile by their ID.
GET /pets/{id}
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Pet’s unique identifier |
| Header | Value | Required |
|---|---|---|
Content-Type |
application/json |
No |
This operation doesn’t require a request body.
curl -X GET {base_url}/pets/1
Response: 200 OK
{
"name": "Luna",
"species": "cat",
"breed": "Domestic Shorthair",
"age_months": 18,
"gender": "female",
"size": "small",
"temperament": "playful, affectionate",
"medical": {
"spayed_neutered": true,
"vaccinations": ["fvrcp", "rabies"]
},
"description": "Luna is a playful tabby who loves interactive
toys and sunny windows.",
"shelter_id": 1,
"status": "available",
"intake_date": "2025-09-01",
"id": 1
}
Response: 400 Bad Request - invalid id, either non-numeric or negative integer
{
"error": "Bad Request",
"message": "Invalid pet ID. Must be a positive integer",
"status": 400
}
Response: 404 Not Found - no matching id
{
"error": "Not Found",
"message": "Pet with ID 999 not found",
"status": 404
}
Successful responses includes a list of pets with the following:
name : Pet’s namespecies : Pet’s speciesbreed : Pet’s breed if knownage_months : Pet’s age in monthsgender : Pet’s gender if knownsize : Pet’s size categorytemperament : Pet’s personality traits and behavioral characteristicsmedical : Pet’s medical informationdescription : Pet’s personality, needs, backgroundshelter_id : ID of pet’s current shelterstatus : Pet’s adoption statusintake_date : When the pet entered the shelterid : Pet’s unique record ID