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