Inventory Module
Track stock levels across multiple locations with transfers, alerts, and movement history.
Base URL: https://app.proign.com/[tenant]/inventory/api
Overview
The Inventory module provides comprehensive stock management:
- Multi-location stock tracking
- Stock adjustments and movements
- Transfer orders between locations
- Low stock alerts and reorder points
- Movement history and audit trail
Key Features
Locations
Define multiple inventory locations:
- Warehouse - Main storage facility
- Service Center - Repair and service location
- Consignment - Third-party held inventory
- Transit - In-transit between locations
- Dealer - Dealer-held inventory
- Returns - Returned items staging
Stock Movements
Track all inventory changes with movement types:
| Type | Effect |
|---|---|
| inbound_purchase | +quantity (new stock) |
| outbound_sale | -quantity (sold) |
| inbound_transfer | +quantity (from another location) |
| outbound_transfer | -quantity (to another location) |
| adjustment_count | +/- quantity (physical count) |
| reserve | Reserve for pending order |
Transfer Orders
Move inventory between locations:
- Create transfer order (select from/to locations)
- Add items to transfer
- Mark as in-transit when shipped
- Complete transfer when received
- Stock automatically updates at both locations
Alerts
Get notified about inventory issues:
- Low Stock - Quantity below reorder point
- Out of Stock - Zero quantity
- Reorder Needed - Time to replenish
- Overstock - Above maximum threshold
API Endpoints
Stock
GET /api/[tenant]/stock # List stock by location
POST /api/[tenant]/stock # Adjust stock quantity
Locations
GET /api/[tenant]/locations # List all locations
POST /api/[tenant]/locations # Create location (admin)
Transfers
GET /api/[tenant]/transfers # List transfer orders
POST /api/[tenant]/transfers # Create transfer order
PATCH /api/[tenant]/transfers # Update transfer status
Movement History
GET /api/[tenant]/movements # Get movement history
Alerts
GET /api/[tenant]/alerts # List alerts
POST /api/[tenant]/alerts # Create alert
PATCH /api/[tenant]/alerts # Acknowledge/resolve alert
Stock Levels
Each product at each location tracks multiple quantity dimensions:
| Field | Description |
|---|---|
on_hand | Total physical quantity at the location |
reserved | Quantity reserved for pending orders |
available | on_hand - reserved (what can be sold) |
reorder_point | Threshold that triggers low-stock alert |
reorder_qty | Suggested quantity to reorder |
Transfer Order Lifecycle
Transfer orders between locations follow a managed lifecycle:
draft → approved → in_transit → received → completed| Status | Stock Effect |
|---|---|
draft | No stock changes yet |
approved | Source quantity reserved for transfer |
in_transit | Deducted from source, tracked as in-transit |
received | Added to destination location |
completed | Transfer finalized, movement history recorded |
Request Examples
Query Stock Levels
GET /api/[tenant]/stock?location=warehouse-main&sku=FRM-001
// Response
{
"data": [
{
"sku": "FRM-001",
"product_name": "9mm Pistol",
"location": "warehouse-main",
"on_hand": 150,
"reserved": 12,
"available": 138,
"reorder_point": 50,
"reorder_qty": 100,
"last_movement_at": "2026-02-20T14:30:00Z"
}
]
}Adjust Stock
POST /api/[tenant]/stock
Content-Type: application/json
{
"sku": "FRM-001",
"location": "warehouse-main",
"type": "adjustment_count",
"quantity": -3,
"reason": "Physical count discrepancy",
"reference": "COUNT-2026-02-21"
}
// Response (200 OK)
{
"data": {
"movement_id": "mv_abc123",
"sku": "FRM-001",
"previous_on_hand": 150,
"new_on_hand": 147,
"type": "adjustment_count",
"recorded_at": "2026-02-21T10:00:00Z"
}
}Create Transfer
POST /api/[tenant]/transfers
Content-Type: application/json
{
"from_location": "warehouse-main",
"to_location": "service-center",
"items": [
{ "sku": "FRM-001", "quantity": 10 },
{ "sku": "ACC-MAG-9MM", "quantity": 25 }
],
"notes": "Restock service center for Q1"
}
// Response (201 Created)
{
"data": {
"id": "tfr_xyz789",
"status": "draft",
"from_location": "warehouse-main",
"to_location": "service-center",
"items": 2,
"total_quantity": 35,
"created_at": "2026-02-21T10:00:00Z"
}
}Alert Configuration
Configure alerts per product and location:
POST /api/[tenant]/alerts
Content-Type: application/json
{
"sku": "FRM-001",
"location": "warehouse-main",
"type": "low_stock",
"threshold": 50,
"notify": ["email", "events"],
"recipients": ["warehouse@company.com"]
}Alerts can notify via email or publish events to the Events module for cross-module automation. The stock.low event type is available for webhook subscriptions.
Integration
Inventory integrates with other modules:
- Fulfillment - Auto-deduct on shipment, reserve on order creation
- Aftersale - RMA returns automatically add stock back to the returns location
- Events - Publishes
stock.lowandstock.adjustedevents - Catalog - Syncs product data (SKU, name) from the catalog registry