Get pet profiles by id

This operation retrieves a pet’s profile by their ID.

Endpoint structure

GET /pets/{id}

Path parameters

Parameter Type Required Description
id integer Yes Pet’s unique identifier

Request headers

Header Value Required
Content-Type application/json No

Request body

This operation doesn’t require a request body.

cURL request

curl -X GET {base_url}/pets/1

Example responses

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: