Skip to main content

PUT /api/v1/inventory/

Update an existing inventory record with new stock information.

Path Parameters

id
integer
required
The unique identifier of the inventory record to update

Request Body

productId
integer
required
ID of the product associated with this inventory record
quantityAvailable
integer
required
Updated quantity of the product available in stock
minimumStockLevel
integer
required
Updated minimum stock level threshold for low stock alerts

Request

curl -X PUT https://api.example.com/api/v1/inventory/1 \
  -H "Content-Type: application/json" \
  -d '{
    "productId": 101,
    "quantityAvailable": 75,
    "minimumStockLevel": 15
  }'

Response

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

Response Example

{
  "id": 1,
  "productId": 101,
  "quantityAvailable": 75,
  "minimumStockLevel": 15,
  "lastRestockedDate": "2026-03-03T10:45:00"
}

Status Codes

  • 200 - Inventory record updated successfully
  • 404 - Inventory record not found

Build docs developers (and LLMs) love