This operation retrieves pets profiles that match the specified filter criteria.
GET /pets?{query_parameters}
This operation doesn’t require path parameters.
This operation accepts the following optional query parameters to filter results:
| Parameter | Type | Description |
|---|---|---|
species |
string | Filter pets by species, cat |
status |
string | Filter pets by adoption status, available |
breed |
string | Filter pets by breed |
size |
string | Filter pets by size category, small |
gender |
string | Filter pets by gender |
shelter_id |
integer | Filter pets by shelter ID |
| Header | Value | Required |
|---|---|---|
Content-Type |
application/json |
No |
This operation doesn’t require a request body.
curl -X GET {base_url}/pets?species=cat&status=available
Response: 200 OK - with a match
[
{
"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 : 200 OK - without any matches
{
[]
}
Response : 400 Bad Request - malformed query parameters
{
"error": "Bad Request",
"message": "Invalid query parameter format",
"status": 400
}
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