curl -X POST https://api.stateset.com/api/v1/inventory/planning \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"planning_type": "demand_forecast",
"time_horizon": {
"value": 3,
"unit": "months"
},
"parameters": {
"service_level": 0.95,
"include_seasonality": true
}
}'
{
"planning_id": "plan_1a2b3c4d5e",
"planning_type": "demand_forecast",
"generated_at": "2024-11-15T10:30:00Z",
"items": [
{
"sku": "WIDGET-001",
"item_name": "Premium Widget",
"current_stock": 150,
"forecast": {
"predicted_demand": 450,
"confidence_interval": {
"lower": 380,
"upper": 520
},
"trend": "increasing",
"seasonality_factor": 1.2
},
"recommendations": {
"reorder_point": 200,
"safety_stock": 50,
"economic_order_quantity": 300,
"max_stock_level": 500,
"next_order_date": "2024-11-20",
"next_order_quantity": 300
},
"metrics": {
"turnover_rate": 12.5,
"stockout_risk": 0.02,
"carrying_cost": 1250.00,
"abc_category": "A"
}
},
{
"sku": "GADGET-002",
"item_name": "Standard Gadget",
"current_stock": 75,
"forecast": {
"predicted_demand": 180,
"confidence_interval": {
"lower": 150,
"upper": 210
},
"trend": "stable",
"seasonality_factor": 1.0
},
"recommendations": {
"reorder_point": 80,
"safety_stock": 20,
"economic_order_quantity": 150,
"max_stock_level": 250,
"next_order_date": "2024-11-18",
"next_order_quantity": 150
},
"metrics": {
"turnover_rate": 8.0,
"stockout_risk": 0.05,
"carrying_cost": 450.00,
"abc_category": "B"
}
}
],
"summary": {
"total_items": 2,
"total_value": 15750.00,
"items_below_reorder": 1,
"urgent_orders": ["GADGET-002"],
"optimization_savings": 2500.00
}
}
Generate intelligent inventory planning recommendations based on demand forecasting and optimization algorithms
curl -X POST https://api.stateset.com/api/v1/inventory/planning \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"planning_type": "demand_forecast",
"time_horizon": {
"value": 3,
"unit": "months"
},
"parameters": {
"service_level": 0.95,
"include_seasonality": true
}
}'
{
"planning_id": "plan_1a2b3c4d5e",
"planning_type": "demand_forecast",
"generated_at": "2024-11-15T10:30:00Z",
"items": [
{
"sku": "WIDGET-001",
"item_name": "Premium Widget",
"current_stock": 150,
"forecast": {
"predicted_demand": 450,
"confidence_interval": {
"lower": 380,
"upper": 520
},
"trend": "increasing",
"seasonality_factor": 1.2
},
"recommendations": {
"reorder_point": 200,
"safety_stock": 50,
"economic_order_quantity": 300,
"max_stock_level": 500,
"next_order_date": "2024-11-20",
"next_order_quantity": 300
},
"metrics": {
"turnover_rate": 12.5,
"stockout_risk": 0.02,
"carrying_cost": 1250.00,
"abc_category": "A"
}
},
{
"sku": "GADGET-002",
"item_name": "Standard Gadget",
"current_stock": 75,
"forecast": {
"predicted_demand": 180,
"confidence_interval": {
"lower": 150,
"upper": 210
},
"trend": "stable",
"seasonality_factor": 1.0
},
"recommendations": {
"reorder_point": 80,
"safety_stock": 20,
"economic_order_quantity": 150,
"max_stock_level": 250,
"next_order_date": "2024-11-18",
"next_order_quantity": 150
},
"metrics": {
"turnover_rate": 8.0,
"stockout_risk": 0.05,
"carrying_cost": 450.00,
"abc_category": "B"
}
}
],
"summary": {
"total_items": 2,
"total_value": 15750.00,
"items_below_reorder": 1,
"urgent_orders": ["GADGET-002"],
"optimization_savings": 2500.00
}
}
demand_forecast - Predict future demandreorder_optimization - Calculate optimal reorder pointsseasonal_planning - Plan for seasonal variationsabc_analysis - Categorize inventory by value/velocityShow properties
Show properties
Show properties
increasing, decreasing, stableShow properties
curl -X POST https://api.stateset.com/api/v1/inventory/planning \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"planning_type": "demand_forecast",
"time_horizon": {
"value": 3,
"unit": "months"
},
"parameters": {
"service_level": 0.95,
"include_seasonality": true
}
}'
{
"planning_id": "plan_1a2b3c4d5e",
"planning_type": "demand_forecast",
"generated_at": "2024-11-15T10:30:00Z",
"items": [
{
"sku": "WIDGET-001",
"item_name": "Premium Widget",
"current_stock": 150,
"forecast": {
"predicted_demand": 450,
"confidence_interval": {
"lower": 380,
"upper": 520
},
"trend": "increasing",
"seasonality_factor": 1.2
},
"recommendations": {
"reorder_point": 200,
"safety_stock": 50,
"economic_order_quantity": 300,
"max_stock_level": 500,
"next_order_date": "2024-11-20",
"next_order_quantity": 300
},
"metrics": {
"turnover_rate": 12.5,
"stockout_risk": 0.02,
"carrying_cost": 1250.00,
"abc_category": "A"
}
},
{
"sku": "GADGET-002",
"item_name": "Standard Gadget",
"current_stock": 75,
"forecast": {
"predicted_demand": 180,
"confidence_interval": {
"lower": 150,
"upper": 210
},
"trend": "stable",
"seasonality_factor": 1.0
},
"recommendations": {
"reorder_point": 80,
"safety_stock": 20,
"economic_order_quantity": 150,
"max_stock_level": 250,
"next_order_date": "2024-11-18",
"next_order_quantity": 150
},
"metrics": {
"turnover_rate": 8.0,
"stockout_risk": 0.05,
"carrying_cost": 450.00,
"abc_category": "B"
}
}
],
"summary": {
"total_items": 2,
"total_value": 15750.00,
"items_below_reorder": 1,
"urgent_orders": ["GADGET-002"],
"optimization_savings": 2500.00
}
}
const forecast = await stateset.inventory.planning.create({
planning_type: 'demand_forecast',
sku: 'WIDGET-001',
time_horizon: { value: 6, unit: 'months' },
parameters: {
include_seasonality: true,
service_level: 0.98
}
});
const reorderPlan = await stateset.inventory.planning.create({
planning_type: 'reorder_optimization',
parameters: {
holding_cost_rate: 0.25,
ordering_cost: 50,
lead_time_days: 14
}
});
const seasonalPlan = await stateset.inventory.planning.create({
planning_type: 'seasonal_planning',
time_horizon: { value: 1, unit: 'quarters' },
parameters: {
service_level: 0.95
}
});
const abcAnalysis = await stateset.inventory.planning.create({
planning_type: 'abc_analysis',
location_id: 'loc_warehouse_001'
});
try {
const planning = await stateset.inventory.planning.create({
planning_type: 'demand_forecast',
sku: 'INVALID-SKU'
});
} catch (error) {
if (error.code === 'sku_not_found') {
console.error('SKU does not exist');
} else if (error.code === 'insufficient_data') {
console.error('Not enough historical data for forecast');
}
}
inventory.planning.completed - Planning run completedinventory.reorder.required - Item below reorder pointinventory.stockout.predicted - Stockout risk detected