Store
This section covers store-related endpoints, such as inventory retrieval.
Base URL
All endpoints in this section are served from:
https://api.petstore.com/v1
Authentication
This API uses an API key sent via the X-API-Key header.
Header example
X-API-Key: YOUR_API_KEYFor full details, see Authentication.
Get inventory
GET /store/inventory
Get current inventory counts.
Request
Headers
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-API-Key |
header | string | Yes | API key used to authenticate requests. |
Query parameters
None.
Request body
None.
Responses
| Status | Description |
|---|---|
| 200 | Inventory counts |
200 OK (example)
The response returns inventory counts (example payload):
{
"available": 12,
"pending": 3,
"sold": 7
}Note: The OpenAPI response description is "Inventory counts". If you need the exact response schema/fields, check the API spec or contact the API provider.
Code examples
curl
curl -X GET "https://api.petstore.com/v1/store/inventory" \
-H "X-API-Key: YOUR_API_KEY"Related
- Other endpoints: Pets, Miscellaneous
- Error handling: Errors
- Data models: Schemas