Inventory
Track and update stock levels for pets in the store.
Returns current stock levels for all pets in the store.
Pass your API key as a Bearer token in the Authorization header.
An array of inventory entries.
The ID of the animal this entry tracks.
1Current stock count.
3Missing or invalid API key.
curl -L https://petstore.example.com/v1/inventory \
-H 'Authorization: Bearer YOUR_API_KEY'
[
{
"petId": 1,
"quantity": 3,
"status": "available"
},
{
"petId": 2,
"quantity": 0,
"status": "sold"
}
]Updates the stock quantity for a specific pet. Use this to record new arrivals, returns, or manual adjustments.
This endpoint is experimental — the request shape may change before it reaches stable.
Pass your API key as a Bearer token in the Authorization header.
The ID of the pet to update stock for.
The new stock count.
5Updated inventory entry.
The ID of the animal this entry tracks.
1Current stock count.
3The request body is missing required fields or contains invalid values.
Missing or invalid API key.
The requested resource could not be found.
curl -L -X PATCH https://petstore.example.com/v1/inventory/1 \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"quantity": 5}'
{
"petId": 1,
"quantity": 3,
"status": "available"
}Last updated