Get all products
Retrieve all active products in the system.Response
Returns an array of product objects ordered by name.Unique product identifier
Product barcode (max 50 characters)
Product name (max 200 characters)
Product description (max 500 characters)
Selling price
Cost per unit
Current stock level
Minimum stock threshold for low stock alerts
Product variant (e.g., size, color)
Product brand
Product category
Unit of measurement (pcs, kg, liter, etc.)
Whether the product is active
Example request
Get product by ID
Retrieve details of a specific product.Path parameters
Product ID
Get product by barcode
Lookup a product using its barcode (useful for scanning operations).Path parameters
Product barcode
Example request
Get low stock products
Retrieve products that are at or below their minimum stock level.Response
Returns products wherestockQuantity <= minStockLevel, ordered by stock quantity (lowest first).
Example request
Get expiring products
Retrieve product batches that are expiring within a specified timeframe.Query parameters
Number of days to look ahead for expiring products
Response
Returns an array of product batch objects with expiration dates within the specified window.Example request
Create product
Add a new product to the catalog.Request body
Unique product barcode
Product name
Product description
Selling price (must be greater than zero)
Cost per unit (cannot be negative)
Initial stock quantity (cannot be negative)
Minimum stock threshold
Product variant
Product brand
Product category
Unit of measurement
Example request
Update product
Update an existing product’s details.Path parameters
Product ID to update
Request body
Same as create product. The system logs price changes and flags major price adjustments (>20% change) for review.Example request
Update stock quantity
Adjust a product’s stock quantity directly.Path parameters
Product ID
Request body
New stock quantity (cannot be negative)
Reason for stock adjustment
Example request
Response
Delete product
Permanently remove a product from the system.Path parameters
Product ID to delete
Example request
Batch management
Get product batches
Retrieve all batches for a specific product.Path parameters
Product ID
Example request
Create product batch
Add a new batch of products with tracking information.Path parameters
Product ID
Request body
Unique batch identifier
Number of units in batch (must be greater than zero)
Cost per unit in this batch (cannot be negative)
Date batch was received (ISO 8601 format)
Expiration date (ISO 8601 format)
Manufacturing date (ISO 8601 format)
Supplier name
Lot number from manufacturer