Animals
Browse and manage individual animals available for adoption.
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"
}
]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
}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
Was this helpful?