Overview
The Inventory Service API provides comprehensive endpoints for managing products and their stock levels within the StreamLine Logistics platform. This service handles product creation, retrieval, and sophisticated stock management operations including reservations, releases, and consumption tracking.Base URL
Key Features
Product Management
Create and retrieve product information including SKU, name, description, and pricing
Stock Operations
Add, reserve, release, and consume stock with atomic operations
Real-time Availability
Track available stock quantities across all products
Validation
Built-in validation ensures data integrity for all operations
API Capabilities
The Inventory Service provides two main categories of functionality:Product Operations
- List Products: Retrieve all products with their current stock levels
- Get Product Details: Fetch detailed information for a specific product by ID
- Create Product: Add new products to the inventory with initial stock
Stock Management Operations
- Add Stock: Increase available stock quantity for a product
- Reserve Stock: Reserve stock for pending orders (reduces available stock)
- Release Stock: Release previously reserved stock back to available inventory
- Consume Stock: Permanently reduce stock when orders are fulfilled
Data Models
Product Response
All product endpoints return data in the following format:Stock Quantity
Stock operations accept a simple quantity object:Authentication
The Inventory Service is an internal microservice. Authentication is handled at the API Gateway level. Direct service-to-service communication may use internal authentication tokens.Error Responses
The API returns standard HTTP status codes:| Status Code | Description |
|---|---|
| 200 | Success |
| 201 | Resource created successfully |
| 204 | Success with no content |
| 400 | Invalid request data |
| 404 | Resource not found |
| 500 | Internal server error |
Next Steps
Product Endpoints
Learn about product management endpoints
Stock Management
Explore stock operation endpoints