Skip to main content

Store API Functions

With these API functions, you can manage your pet store's inventory and orders.

Getting pet inventoriesโ€‹

Returns pet inventories by status.

Endpoint: https://petstore3.swagger.io/api/v3/store/inventory

Operation: GET

Examplesโ€‹

GET "https://petstore3.swagger.io/api/v3/store/inventory" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

Responsesโ€‹

CodeDescription
200Successful operation
defaultUnexpected error
Response exampleโ€‹

200: Successful operation

{
"sold": 0,
"available": 0,
"pending": 0
}

Parametersโ€‹

None

Placing an orderโ€‹

Places an order for a pet.

Endpoint: https://petstore3.swagger.io/api/v3/store/order

Operation: POST

Examplesโ€‹

POST "https://petstore3.swagger.io/api/v3/store/order" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "api_key: <YOUR_API_KEY>" \
-d '{
"id": 0,
"petId": 0,
"quantity": 0,
"shipDate": "2025-08-11T15:13:06.939Z",
"status": "placed",
"complete": false
}'

Responsesโ€‹

CodeDescription
200Successful operation
400Invalid Order
defaultUnexpected error
Response exampleโ€‹

200: Successful operation

{
"id": 0,
"petId": 0,
"quantity": 0,
"shipDate": "2025-08-11T15:13:06.939Z",
"status": "placed",
"complete": false
}

Parametersโ€‹

Request bodyโ€‹
NameTypeDescription
bodyOrder object(Required) The Order object for the pet.

Finding an orderโ€‹

Finds an order by its ID.

Endpoint: https://petstore3.swagger.io/api/v3/store/order/{orderId}

Operation: GET

Examplesโ€‹

GET "https://petstore3.swagger.io/api/v3/store/order/1" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

Responsesโ€‹

CodeDescription
200Successful operation
400Invalid ID supplied
404Order not found
defaultUnexpected error
Response exampleโ€‹

200: Successful operation

{
"id": 1,
"petId": 0,
"quantity": 0,
"shipDate": "2025-08-11T15:13:06.939Z",
"status": "placed",
"complete": false
}

Parametersโ€‹

Path parametersโ€‹
NameTypeDescription
orderIdintegerID of the purchase order to fetch

Deleting an orderโ€‹

Deletes an order by its ID.

Endpoint: https://petstore3.swagger.io/api/v3/store/order/{orderId}

Operation: DELETE

Examplesโ€‹

DELETE "https://petstore3.swagger.io/api/v3/store/order/1" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

Responsesโ€‹

CodeDescription
200order deleted
400Invalid ID supplied
404Order not found
defaultUnexpected error

(A successful deletion returns a 200 code with no response body.)

Parametersโ€‹

Path parametersโ€‹
NameTypeDescription
orderIdintegerID of the order to delete