curl -X GET "https://api.stateset.com/api/v1/inventory/analytics?metric_type=overview&include_trends=true" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"metric_type": "overview",
"period": {
"from": "2024-01-01T00:00:00Z",
"to": "2024-11-15T23:59:59Z"
},
"metrics": {
"total_value": 485750.00,
"total_units": 12500,
"unique_skus": 256,
"average_turnover": 8.5,
"stockout_rate": 0.03,
"overstock_rate": 0.12,
"dead_stock_value": 15000.00,
"carrying_cost": 121437.50
},
"breakdown": [
{
"group": "Electronics",
"name": "Electronics Category",
"metrics": {
"units": 3500,
"value": 175000.00,
"turnover_rate": 12.5,
"days_of_supply": 29.2,
"velocity": "fast"
}
},
{
"group": "Accessories",
"name": "Accessories Category",
"metrics": {
"units": 5000,
"value": 75000.00,
"turnover_rate": 6.0,
"days_of_supply": 60.8,
"velocity": "medium"
}
}
],
"trends": {
"inventory_value": [
{ "date": "2024-01-01", "value": 450000 },
{ "date": "2024-02-01", "value": 465000 },
{ "date": "2024-03-01", "value": 478000 }
],
"turnover_rate": [
{ "date": "2024-01-01", "rate": 7.5 },
{ "date": "2024-02-01", "rate": 8.0 },
{ "date": "2024-03-01", "rate": 8.5 }
]
},
"insights": [
{
"type": "opportunity",
"severity": "high",
"message": "15 SKUs have been non-moving for 180+ days",
"affected_items": ["OLD-001", "OLD-002", "OLD-003"],
"potential_savings": 15000.00
},
{
"type": "warning",
"severity": "medium",
"message": "Electronics category showing 25% increase in stockouts",
"affected_items": ["ELEC-101", "ELEC-102"],
"potential_savings": 5000.00
},
{
"type": "recommendation",
"severity": "low",
"message": "Consider implementing ABC classification for better control",
"affected_items": [],
"potential_savings": 8000.00
}
]
}
Retrieve comprehensive analytics and insights about your inventory performance
curl -X GET "https://api.stateset.com/api/v1/inventory/analytics?metric_type=overview&include_trends=true" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"metric_type": "overview",
"period": {
"from": "2024-01-01T00:00:00Z",
"to": "2024-11-15T23:59:59Z"
},
"metrics": {
"total_value": 485750.00,
"total_units": 12500,
"unique_skus": 256,
"average_turnover": 8.5,
"stockout_rate": 0.03,
"overstock_rate": 0.12,
"dead_stock_value": 15000.00,
"carrying_cost": 121437.50
},
"breakdown": [
{
"group": "Electronics",
"name": "Electronics Category",
"metrics": {
"units": 3500,
"value": 175000.00,
"turnover_rate": 12.5,
"days_of_supply": 29.2,
"velocity": "fast"
}
},
{
"group": "Accessories",
"name": "Accessories Category",
"metrics": {
"units": 5000,
"value": 75000.00,
"turnover_rate": 6.0,
"days_of_supply": 60.8,
"velocity": "medium"
}
}
],
"trends": {
"inventory_value": [
{ "date": "2024-01-01", "value": 450000 },
{ "date": "2024-02-01", "value": 465000 },
{ "date": "2024-03-01", "value": 478000 }
],
"turnover_rate": [
{ "date": "2024-01-01", "rate": 7.5 },
{ "date": "2024-02-01", "rate": 8.0 },
{ "date": "2024-03-01", "rate": 8.5 }
]
},
"insights": [
{
"type": "opportunity",
"severity": "high",
"message": "15 SKUs have been non-moving for 180+ days",
"affected_items": ["OLD-001", "OLD-002", "OLD-003"],
"potential_savings": 15000.00
},
{
"type": "warning",
"severity": "medium",
"message": "Electronics category showing 25% increase in stockouts",
"affected_items": ["ELEC-101", "ELEC-102"],
"potential_savings": 5000.00
},
{
"type": "recommendation",
"severity": "low",
"message": "Consider implementing ABC classification for better control",
"affected_items": [],
"potential_savings": 8000.00
}
]
}
overview - General inventory metricsturnover - Inventory turnover analysisaging - Stock aging reportperformance - SKU performance metricsforecast_accuracy - Forecast vs actual comparisonsku, category, location, supplierShow properties
Show properties
curl -X GET "https://api.stateset.com/api/v1/inventory/analytics?metric_type=overview&include_trends=true" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"metric_type": "overview",
"period": {
"from": "2024-01-01T00:00:00Z",
"to": "2024-11-15T23:59:59Z"
},
"metrics": {
"total_value": 485750.00,
"total_units": 12500,
"unique_skus": 256,
"average_turnover": 8.5,
"stockout_rate": 0.03,
"overstock_rate": 0.12,
"dead_stock_value": 15000.00,
"carrying_cost": 121437.50
},
"breakdown": [
{
"group": "Electronics",
"name": "Electronics Category",
"metrics": {
"units": 3500,
"value": 175000.00,
"turnover_rate": 12.5,
"days_of_supply": 29.2,
"velocity": "fast"
}
},
{
"group": "Accessories",
"name": "Accessories Category",
"metrics": {
"units": 5000,
"value": 75000.00,
"turnover_rate": 6.0,
"days_of_supply": 60.8,
"velocity": "medium"
}
}
],
"trends": {
"inventory_value": [
{ "date": "2024-01-01", "value": 450000 },
{ "date": "2024-02-01", "value": 465000 },
{ "date": "2024-03-01", "value": 478000 }
],
"turnover_rate": [
{ "date": "2024-01-01", "rate": 7.5 },
{ "date": "2024-02-01", "rate": 8.0 },
{ "date": "2024-03-01", "rate": 8.5 }
]
},
"insights": [
{
"type": "opportunity",
"severity": "high",
"message": "15 SKUs have been non-moving for 180+ days",
"affected_items": ["OLD-001", "OLD-002", "OLD-003"],
"potential_savings": 15000.00
},
{
"type": "warning",
"severity": "medium",
"message": "Electronics category showing 25% increase in stockouts",
"affected_items": ["ELEC-101", "ELEC-102"],
"potential_savings": 5000.00
},
{
"type": "recommendation",
"severity": "low",
"message": "Consider implementing ABC classification for better control",
"affected_items": [],
"potential_savings": 8000.00
}
]
}
const overview = await stateset.inventory.analytics.get({
metric_type: 'overview',
group_by: 'category'
});
const turnover = await stateset.inventory.analytics.get({
metric_type: 'turnover',
group_by: 'sku',
date_from: '2024-01-01'
});
const aging = await stateset.inventory.analytics.get({
metric_type: 'aging',
location_id: 'loc_warehouse_001'
});
const performance = await stateset.inventory.analytics.get({
metric_type: 'performance',
sku: 'WIDGET-001',
include_trends: true
});
const accuracy = await stateset.inventory.analytics.get({
metric_type: 'forecast_accuracy',
date_from: '2024-06-01',
date_to: '2024-11-01'
});
// Export as CSV
const csvExport = await stateset.inventory.analytics.export({
metric_type: 'overview',
format: 'csv'
});
// Export as PDF report
const pdfReport = await stateset.inventory.analytics.export({
metric_type: 'performance',
format: 'pdf',
include_charts: true
});
const schedule = await stateset.inventory.analytics.schedule({
name: 'Weekly Inventory Report',
metric_type: 'overview',
frequency: 'weekly',
recipients: ['[email protected]'],
format: 'pdf'
});