获取宠物库存
按状态分类返回宠物库存数量。
GET https://petstore3.swagger.io/api/v3/store/inventory
示例
- API Key
- OAuth 2.0
cURL
GET "https://petstore3.swagger.io/api/v3/store/inventory" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"
cURL
GET "https://petstore3.swagger.io/api/v3/store/inventory" \
-H "accept: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>"
响应
| 状态码 | 描述 |
|---|---|
| 200 | 操作成功 |
| default | 意外错误 |
响应示例
200: 操作成功
Response
{
"sold": 0,
"available": 0,
"pending": 0
}
参数
无