Swagger – Get Store Inventory

Get Store Inventory

This wiki page covers the API interaction for the Swagger Petstore API when requesting the store inventory.

Model

The GET /store/inventory request is a simple call to the API which returns the status labels and associated count of records. Therefore, there is no data model for this call.

 

Parameters

There are no Parameters for the GET /store/inventory call to the Petstore API.

 

Sample Request

A sample Curl request is shown below, with most of the Parameters included.

curl -X GET "http://petstore.swagger.io/v2/store/inventory" -H "accept: application/json"

This should be removed.

 

Sample Response and Schema

The following figure displays a model response to the curl request shown in the previous section.

Get Inventory Response Model

Get Inventory Response Model

This response is broken down in the table that follows.

GET /store/inventory Response Schema
Response Item Data Type Description
additionalProp1 string This is replaced by the status label as provided. e.g., available, pending, or sold
 0 integer This is a simple count which returns the number of records with the associated status.

A sample response may look like the following table.

GET /store/inventory Sample Response
available: 300
pending: 2
sold: 1215

 

Other Topics