This operation retrieves a shelter’s profile by their ID.
GET /shelter/{id}
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Shelter’s unique identifier |
| Header | Value | Required |
|---|---|---|
Content-Type |
application/json |
No |
This operation doesn’t require a request body.
curl -X GET {base_url}/shelters/1
Response: 200 OK
{
"name": "Dallas Animal Services",
"address": "1818 N Westmoreland Rd, Dallas, TX 75212",
"phone": "+1-214-671-0249",
"email": "info@dallasanimalservices.org",
"hours": "Mon-Sat 11:00-18:00",
"available_pet_count": 22,
"adoption_fee_range": "75-200",
"id": 1
}
Response: 400 Bad Request - invalid id, either non-numeric or negative integer
{
"error": "Bad Request",
"message": "Invalid shelter ID. Must be a positive integer.",
"status": 400
}
Response: 404 Not Found - no matching id
{
"error": "Not Found",
"message": "Shelter with ID 999 not found",
"status": 404
}
Successful responses includes a list of shelters with the following:
name : Shelter’s nameaddress : Shelter’s location informationphone : Shelter’s phone numberemail : Shelter’s email addresshours : Shelter’s hours of operationavailable_pet_count : Amount of shelter’s available petsadoption_fee_range : Shelter’s fee range in United States Dollarid : Shelter’s unique record ID