Animals
Browse and manage individual animals available for adoption.
Returns a paginated list of all animals in the store. Use limit to control page size and status to filter by availability.
Pass your API key as a Bearer token in the Authorization header.
Maximum number of animals to return. Defaults to 20, max 100.
20Filter by availability status.
A paginated list of animals.
The animal's name.
FluffyThe ID of the category this animal belongs to.
1Unique identifier assigned on creation.
1Missing or invalid API key.
curl -L https://petstore.example.com/v1/pets \
-H 'Authorization: Bearer YOUR_API_KEY'
[
{
"id": 1,
"name": "Fluffy",
"categoryId": 1,
"status": "available"
},
{
"id": 2,
"name": "Whiskers",
"categoryId": 2,
"status": "pending"
}
]Adds a new animal to the store. The name and categoryId fields are required.
Pass your API key as a Bearer token in the Authorization header.
The animal's name.
FluffyThe ID of the category this animal belongs to.
1Animal added successfully.
The animal's name.
FluffyThe ID of the category this animal belongs to.
1Unique identifier assigned on creation.
1The request body is missing required fields or contains invalid values.
Missing or invalid API key.
curl -L -X POST https://petstore.example.com/v1/pets \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name": "Goldie", "categoryId": 3, "status": "available"}'
{
"name": "Fluffy",
"categoryId": 1,
"status": "available",
"id": 1
}Returns details for a single animal by ID.
This endpoint is deprecated and will be removed on 5 December 2030. Use GET /pets with a status filter instead.
Pass your API key as a Bearer token in the Authorization header.
The ID of the animal to retrieve.
The requested animal.
The animal's name.
FluffyThe ID of the category this animal belongs to.
1Unique identifier assigned on creation.
1Missing or invalid API key.
The requested resource could not be found.
curl -L https://petstore.example.com/v1/pets/1 \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"name": "Fluffy",
"categoryId": 1,
"status": "available",
"id": 1
}Last updated