Skip to main content

List All Inventory

GET /api/v1/inventory

Retrieve a list of all inventory records in the system.
curl -X GET https://api.example.com/api/v1/inventory

Response

data
array
Array of inventory records
id
integer
Unique identifier for the inventory record
productId
integer
ID of the associated product
quantityAvailable
integer
Current quantity of the product available in stock
minimumStockLevel
integer
Minimum stock level threshold for low stock alerts
lastRestockedDate
string
Timestamp of when the inventory was last restocked (ISO 8601 format)

Get Inventory by Product

GET /api/v1/inventory/product/

Retrieve the inventory record for a specific product.
productId
integer
required
The unique identifier of the product
curl -X GET https://api.example.com/api/v1/inventory/product/101

Get Low Stock Items

GET /api/v1/inventory/low-stock

Retrieve all inventory records where quantity is at or below the minimum stock level.
curl -X GET https://api.example.com/api/v1/inventory/low-stock
This endpoint returns items where quantityAvailable <= minimumStockLevel

Get Out of Stock Items

GET /api/v1/inventory/out-of-stock

Retrieve all inventory records where quantity is zero.
curl -X GET https://api.example.com/api/v1/inventory/out-of-stock

Get Available Stock

GET /api/v1/inventory/available

Retrieve all inventory records with available stock (quantity > 0).
curl -X GET https://api.example.com/api/v1/inventory/available

List with Pagination

GET /api/v1/inventory/pagination

Retrieve inventory records with pagination support.
page
integer
default:"0"
The page number to retrieve (zero-based)
pageSize
integer
default:"10"
The number of records per page
curl -X GET "https://api.example.com/api/v1/inventory/pagination?page=0&pageSize=20"

Response Example

All list endpoints return an array of inventory records:
[
  {
    "id": 1,
    "productId": 101,
    "quantityAvailable": 50,
    "minimumStockLevel": 10,
    "lastRestockedDate": "2026-03-01T10:30:00"
  },
  {
    "id": 2,
    "productId": 102,
    "quantityAvailable": 5,
    "minimumStockLevel": 15,
    "lastRestockedDate": "2026-02-28T14:20:00"
  }
]

Status Codes

  • 200 - Success
  • 404 - Inventory record not found (for product-specific queries)

Build docs developers (and LLMs) love