Skip to main content

Sample API Responses for Inventory Management Lab

This document contains fabricated API responses for testing the Inventory Management Lab tools. These responses are designed to work together to simulate realistic inventory management scenarios.

Tool 1: Query Inventory Levels

Request 1: Query specific warehouse

GET /ws/rest/inventory/query?warehouse_id=W-001

Response 1:

{
"status": "success",
"timestamp": "2025-11-14T10:35:22Z",
"warehouse_id": "W-001",
"warehouse_name": "Northeast Distribution Center",
"location": "Boston, MA",
"total_items": 3,
"inventory": [
{
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"product_category": "Electronics",
"quantity_on_hand": 12,
"reorder_point": 50,
"max_quantity": 200,
"unit_cost": 145.00,
"total_value": 1740.00,
"status": "critical_low",
"last_counted": "2025-11-13T08:00:00Z",
"bin_location": "A-12-C"
},
{
"product_id": "PROD-6291",
"product_name": "Heavy Duty Cable Assembly",
"product_category": "Cables",
"quantity_on_hand": 85,
"reorder_point": 75,
"max_quantity": 300,
"unit_cost": 32.50,
"total_value": 2762.50,
"status": "ok",
"last_counted": "2025-11-13T08:00:00Z",
"bin_location": "B-05-A"
},
{
"product_id": "PROD-3358",
"product_name": "Power Distribution Unit",
"product_category": "Electronics",
"quantity_on_hand": 22,
"reorder_point": 30,
"max_quantity": 100,
"unit_cost": 289.99,
"total_value": 6379.78,
"status": "low",
"last_counted": "2025-11-13T08:00:00Z",
"bin_location": "A-08-D"
}
],
"summary": {
"total_value": 10882.28,
"critical_items": 1,
"low_items": 1,
"ok_items": 1,
"overstock_items": 0
}
}

Request 2: Query specific product across all warehouses

GET /ws/rest/inventory/query?product_id=PROD-8472

Response 2:

{
"status": "success",
"timestamp": "2025-11-14T10:36:15Z",
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"product_category": "Electronics",
"total_warehouses": 4,
"global_quantity": 156,
"inventory_by_warehouse": [
{
"warehouse_id": "W-001",
"warehouse_name": "Northeast Distribution Center",
"location": "Boston, MA",
"quantity_on_hand": 12,
"reorder_point": 50,
"status": "critical_low",
"bin_location": "A-12-C"
},
{
"warehouse_id": "W-002",
"warehouse_name": "Southeast Distribution Center",
"location": "Atlanta, GA",
"quantity_on_hand": 67,
"reorder_point": 50,
"status": "ok",
"bin_location": "C-15-B"
},
{
"warehouse_id": "W-003",
"warehouse_name": "Midwest Distribution Center",
"location": "Chicago, IL",
"quantity_on_hand": 43,
"reorder_point": 50,
"status": "low",
"bin_location": "B-22-A"
},
{
"warehouse_id": "W-004",
"warehouse_name": "West Coast Distribution Center",
"location": "Los Angeles, CA",
"quantity_on_hand": 34,
"reorder_point": 50,
"status": "low",
"bin_location": "D-09-C"
}
],
"summary": {
"total_quantity": 156,
"average_quantity_per_warehouse": 39,
"warehouses_below_reorder": 3,
"recommended_action": "Urgent reorder recommended for W-001. Consider redistributing stock from W-002 to other locations."
}
}

Request 3: Query by product category

GET /ws/rest/inventory/query?product_category=Electronics

Response 3:

{
"status": "success",
"timestamp": "2025-11-14T10:37:08Z",
"product_category": "Electronics",
"total_products": 12,
"warehouse_filter": "all",
"inventory": [
{
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"global_quantity": 156,
"reorder_point_avg": 50,
"status": "needs_attention",
"warehouses_below_reorder": 3
},
{
"product_id": "PROD-3358",
"product_name": "Power Distribution Unit",
"global_quantity": 245,
"reorder_point_avg": 30,
"status": "ok",
"warehouses_below_reorder": 0
},
{
"product_id": "PROD-7821",
"product_name": "Programmable Logic Controller",
"global_quantity": 89,
"reorder_point_avg": 40,
"status": "ok",
"warehouses_below_reorder": 0
},
{
"product_id": "PROD-9154",
"product_name": "Digital Display Module",
"global_quantity": 312,
"reorder_point_avg": 100,
"status": "ok",
"warehouses_below_reorder": 0
},
{
"product_id": "PROD-2847",
"product_name": "Voltage Regulator",
"global_quantity": 523,
"reorder_point_avg": 200,
"status": "ok",
"warehouses_below_reorder": 0
}
],
"summary": {
"total_value": 487652.45,
"products_needing_attention": 1,
"total_items_in_category": 1325
}
}

Tool 2: Validate Purchase Order

Request 1: Basic validation

POST /ws/rest/inventory/validatePO?po_number=PO-2025-1847

Response 1:

{
"status": "success",
"timestamp": "2025-11-14T10:38:45Z",
"validation_result": "passed",
"po_number": "PO-2025-1847",
"po_details": {
"created_date": "2025-11-10T14:22:00Z",
"created_by": "Sarah Johnson",
"supplier_id": "SUP-0456",
"supplier_name": "TechComponents Inc.",
"delivery_warehouse": "W-001",
"expected_delivery": "2025-11-20T00:00:00Z",
"status": "approved",
"approval_date": "2025-11-11T09:15:00Z",
"approved_by": "Michael Chen",
"total_amount": 8700.00,
"currency": "USD"
},
"line_items": [
{
"line_number": 1,
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"quantity_ordered": 60,
"unit_price": 145.00,
"line_total": 8700.00,
"delivery_status": "in_transit"
}
],
"validation_checks": {
"po_exists": {
"passed": true,
"message": "Purchase order found in system"
},
"supplier_approved": {
"passed": true,
"message": "Supplier TechComponents Inc. is on approved vendor list"
},
"pricing_within_range": {
"passed": true,
"message": "Unit price $145.00 is within approved range ($140.00-$150.00)"
},
"quantities_valid": {
"passed": true,
"message": "Quantities are within acceptable limits"
},
"delivery_location_valid": {
"passed": true,
"message": "Warehouse W-001 is valid delivery location"
},
"po_status": {
"passed": true,
"message": "PO is approved and active"
}
},
"warnings": [
"Delivery date is 6 days out but inventory is critically low at destination warehouse"
],
"recommendations": [
"Consider expedited shipping to address critical stock level at W-001",
"Consider stock transfer from W-002 (67 units available) as interim solution"
]
}

Request 2: Validation with budget check (high-value order)

POST /ws/rest/inventory/validatePO?po_number=PO-2025-1891&check_budget=true

Response 2:

{
"status": "success",
"timestamp": "2025-11-14T10:39:22Z",
"validation_result": "failed",
"po_number": "PO-2025-1891",
"po_details": {
"created_date": "2025-11-12T16:45:00Z",
"created_by": "David Martinez",
"supplier_id": "SUP-0723",
"supplier_name": "Global Electronics Supply",
"delivery_warehouse": "W-003",
"expected_delivery": "2025-11-25T00:00:00Z",
"status": "pending_approval",
"approval_date": null,
"approved_by": null,
"total_amount": 45600.00,
"currency": "USD"
},
"line_items": [
{
"line_number": 1,
"product_id": "PROD-7821",
"product_name": "Programmable Logic Controller",
"quantity_ordered": 120,
"unit_price": 380.00,
"line_total": 45600.00,
"delivery_status": "awaiting_approval"
}
],
"validation_checks": {
"po_exists": {
"passed": true,
"message": "Purchase order found in system"
},
"supplier_approved": {
"passed": true,
"message": "Supplier Global Electronics Supply is on approved vendor list"
},
"pricing_within_range": {
"passed": true,
"message": "Unit price $380.00 is within approved range ($375.00-$395.00)"
},
"quantities_valid": {
"passed": true,
"message": "Quantities are within acceptable limits"
},
"delivery_location_valid": {
"passed": true,
"message": "Warehouse W-003 is valid delivery location"
},
"po_status": {
"passed": false,
"message": "PO requires approval before processing"
},
"budget_approval": {
"passed": false,
"message": "Orders over $25,000 require CFO approval - not yet obtained"
}
},
"budget_check": {
"order_total": 45600.00,
"approval_threshold": 25000.00,
"requires_cfo_approval": true,
"current_month_spending": 284500.00,
"monthly_budget": 350000.00,
"remaining_budget": 65500.00,
"budget_available": true
},
"errors": [
"PO exceeds $25,000 threshold and requires CFO approval",
"PO status is 'pending_approval' - cannot proceed with procurement"
],
"recommendations": [
"Escalate to CFO for budget approval",
"Consider splitting order across multiple months if budget is constraint"
]
}

Request 3: Invalid PO

POST /ws/rest/inventory/validatePO?po_number=PO-2025-9999

Response 3:

{
"status": "error",
"timestamp": "2025-11-14T10:40:05Z",
"validation_result": "failed",
"po_number": "PO-2025-9999",
"validation_checks": {
"po_exists": {
"passed": false,
"message": "Purchase order not found in system"
}
},
"errors": [
"PO-2025-9999 does not exist in the system",
"Unable to proceed with validation"
],
"recommendations": [
"Verify PO number is correct",
"Check if PO was created in different system or time period"
]
}

Tool 3: Track Shipment Status

Request 1: Track by shipment number (in transit)

GET /ws/rest/inventory/trackShipment?tracking_number=TRK-9847561234

Response 1:

{
"status": "success",
"timestamp": "2025-11-14T10:41:18Z",
"shipment_details": {
"tracking_number": "TRK-9847561234",
"carrier": "FedEx Freight",
"carrier_service": "Ground",
"po_number": "PO-2025-1847",
"supplier_id": "SUP-0456",
"supplier_name": "TechComponents Inc.",
"ship_date": "2025-11-13T10:30:00Z",
"estimated_delivery": "2025-11-20T17:00:00Z",
"destination_warehouse": "W-001",
"destination_address": "125 Industrial Parkway, Boston, MA 02108",
"current_status": "in_transit",
"last_update": "2025-11-14T06:15:00Z"
},
"contents": [
{
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"quantity": 60,
"unit_price": 145.00,
"line_total": 8700.00
}
],
"tracking_events": [
{
"timestamp": "2025-11-13T10:30:00Z",
"location": "Cleveland, OH",
"status": "picked_up",
"description": "Package picked up from supplier facility"
},
{
"timestamp": "2025-11-13T18:45:00Z",
"location": "Cleveland, OH - Distribution Center",
"status": "in_transit",
"description": "Departed FedEx facility"
},
{
"timestamp": "2025-11-14T02:22:00Z",
"location": "Syracuse, NY - Hub",
"status": "in_transit",
"description": "Arrived at FedEx hub"
},
{
"timestamp": "2025-11-14T06:15:00Z",
"location": "Syracuse, NY - Hub",
"status": "in_transit",
"description": "In transit to destination"
}
],
"delivery_estimate": {
"original_estimate": "2025-11-20T17:00:00Z",
"current_estimate": "2025-11-20T17:00:00Z",
"confidence": "high",
"on_schedule": true,
"days_until_delivery": 6
},
"impact_analysis": {
"destination_warehouse_current_stock": 12,
"destination_warehouse_reorder_point": 50,
"stock_deficit": 38,
"shipment_will_cover_deficit": true,
"post_delivery_quantity": 72,
"assessment": "Shipment will resolve critical stock situation at W-001"
}
}

Request 2: Track by PO number (delayed shipment)

GET /ws/rest/inventory/trackShipment?po_number=PO-2025-1756

Response 2:

{
"status": "success",
"timestamp": "2025-11-14T10:42:33Z",
"po_number": "PO-2025-1756",
"total_shipments": 1,
"shipments": [
{
"tracking_number": "TRK-8823445612",
"carrier": "UPS Freight",
"carrier_service": "Standard Ground",
"supplier_id": "SUP-0891",
"supplier_name": "Industrial Parts Direct",
"ship_date": "2025-11-05T09:15:00Z",
"original_estimated_delivery": "2025-11-12T17:00:00Z",
"current_estimated_delivery": "2025-11-18T17:00:00Z",
"destination_warehouse": "W-003",
"destination_address": "4850 Commerce Drive, Chicago, IL 60607",
"current_status": "delayed",
"delay_reason": "Weather delay - severe storms in transit area",
"last_update": "2025-11-13T14:20:00Z",
"days_delayed": 6
}
],
"contents": [
{
"product_id": "PROD-6291",
"product_name": "Heavy Duty Cable Assembly",
"quantity": 150,
"unit_price": 32.50,
"line_total": 4875.00
}
],
"tracking_events": [
{
"timestamp": "2025-11-05T09:15:00Z",
"location": "Phoenix, AZ",
"status": "picked_up",
"description": "Package picked up from supplier"
},
{
"timestamp": "2025-11-06T22:30:00Z",
"location": "Albuquerque, NM - Hub",
"status": "in_transit",
"description": "Arrived at UPS hub"
},
{
"timestamp": "2025-11-08T08:45:00Z",
"location": "Oklahoma City, OK - Hub",
"status": "delayed",
"description": "Delay due to severe weather in region"
},
{
"timestamp": "2025-11-11T16:30:00Z",
"location": "Oklahoma City, OK - Hub",
"status": "in_transit",
"description": "Weather cleared - shipment resuming transit"
},
{
"timestamp": "2025-11-13T14:20:00Z",
"location": "Kansas City, MO - Hub",
"status": "in_transit",
"description": "In transit to destination"
}
],
"delivery_estimate": {
"original_estimate": "2025-11-12T17:00:00Z",
"current_estimate": "2025-11-18T17:00:00Z",
"confidence": "medium",
"on_schedule": false,
"days_delayed": 6,
"delay_reason": "Weather-related delays in Oklahoma/Kansas region"
},
"impact_analysis": {
"destination_warehouse_current_stock": 85,
"destination_warehouse_reorder_point": 75,
"stock_deficit": 0,
"urgency": "low",
"assessment": "Delay is not critical - destination warehouse still has adequate stock levels"
},
"recommendations": [
"Monitor shipment progress daily",
"No immediate action required due to adequate stock at destination",
"Consider alternate suppliers if weather delays persist"
]
}

Request 3: Track all active shipments (no parameters)

GET /ws/rest/inventory/trackShipment

Response 3:

{
"status": "success",
"timestamp": "2025-11-14T10:43:15Z",
"total_active_shipments": 7,
"shipments_summary": {
"on_schedule": 5,
"delayed": 1,
"at_risk": 1,
"delivered_today": 0
},
"shipments": [
{
"tracking_number": "TRK-9847561234",
"po_number": "PO-2025-1847",
"product_summary": "Industrial Sensor Module (60 units)",
"destination": "W-001 (Boston, MA)",
"estimated_delivery": "2025-11-20T17:00:00Z",
"status": "on_schedule",
"priority": "critical"
},
{
"tracking_number": "TRK-8823445612",
"po_number": "PO-2025-1756",
"product_summary": "Heavy Duty Cable Assembly (150 units)",
"destination": "W-003 (Chicago, IL)",
"estimated_delivery": "2025-11-18T17:00:00Z",
"status": "delayed",
"days_delayed": 6,
"priority": "low"
},
{
"tracking_number": "TRK-7734229801",
"po_number": "PO-2025-1823",
"product_summary": "Digital Display Module (200 units)",
"destination": "W-002 (Atlanta, GA)",
"estimated_delivery": "2025-11-16T17:00:00Z",
"status": "on_schedule",
"priority": "medium"
},
{
"tracking_number": "TRK-6621138475",
"po_number": "PO-2025-1834",
"product_summary": "Voltage Regulator (300 units)",
"destination": "W-004 (Los Angeles, CA)",
"estimated_delivery": "2025-11-17T17:00:00Z",
"status": "on_schedule",
"priority": "medium"
},
{
"tracking_number": "TRK-5512047321",
"po_number": "PO-2025-1866",
"product_summary": "Power Distribution Unit (45 units)",
"destination": "W-001 (Boston, MA)",
"estimated_delivery": "2025-11-15T17:00:00Z",
"status": "on_schedule",
"priority": "low"
},
{
"tracking_number": "TRK-4489936214",
"po_number": "PO-2025-1872",
"product_summary": "Programmable Logic Controller (80 units)",
"destination": "W-003 (Chicago, IL)",
"estimated_delivery": "2025-11-21T17:00:00Z",
"status": "at_risk",
"risk_reason": "Carrier experiencing high volume delays",
"priority": "medium"
},
{
"tracking_number": "TRK-3378825109",
"po_number": "PO-2025-1889",
"product_summary": "Industrial Sensor Module (40 units)",
"destination": "W-004 (Los Angeles, CA)",
"estimated_delivery": "2025-11-22T17:00:00Z",
"status": "on_schedule",
"priority": "medium"
}
],
"critical_attention_required": [
{
"tracking_number": "TRK-9847561234",
"reason": "Destination warehouse W-001 has critical low stock (12 units, reorder point 50)",
"recommendation": "Monitor closely - this shipment resolves critical stock situation"
}
]
}

Tool 4: Update Inventory Record

Request 1: Increase inventory (receiving shipment)

POST /ws/rest/inventory/update
Query Parameters:
product_id=PROD-8472
warehouse_id=W-001
quantity_change=60
reason=Received shipment TRK-9847561234 for PO-2025-1847

Response 1:

{
"status": "success",
"timestamp": "2025-11-20T14:22:35Z",
"operation": "inventory_increase",
"inventory_record": {
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"warehouse_id": "W-001",
"warehouse_name": "Northeast Distribution Center",
"previous_quantity": 12,
"quantity_change": 60,
"new_quantity": 72,
"reorder_point": 50,
"max_quantity": 200,
"unit_cost": 145.00,
"previous_value": 1740.00,
"new_value": 10440.00
},
"audit_trail": {
"transaction_id": "INV-TXN-892374",
"performed_by": "system_agent",
"reason": "Received shipment TRK-9847561234 for PO-2025-1847",
"source_document": "PO-2025-1847",
"tracking_number": "TRK-9847561234"
},
"status_change": {
"previous_status": "critical_low",
"new_status": "ok",
"alert_level_changed": true
},
"notifications": {
"alerts_cleared": [
"Critical low stock alert for PROD-8472 at W-001 has been cleared"
],
"stakeholders_notified": [
"warehouse_manager_w001@techsupply.com",
"procurement_team@techsupply.com"
]
},
"recommendations": [
"Current stock level (72) is adequate for normal operations",
"Monitor usage patterns over next 2 weeks to adjust reorder points if needed"
]
}

Request 2: Decrease inventory (cycle count adjustment)

POST /ws/rest/inventory/update
Query Parameters:
product_id=PROD-3358
warehouse_id=W-001
quantity_change=-5
reason=Cycle count adjustment - physical count discrepancy

Response 2:

{
"status": "success",
"timestamp": "2025-11-14T11:15:42Z",
"operation": "inventory_decrease",
"inventory_record": {
"product_id": "PROD-3358",
"product_name": "Power Distribution Unit",
"warehouse_id": "W-001",
"warehouse_name": "Northeast Distribution Center",
"previous_quantity": 22,
"quantity_change": -5,
"new_quantity": 17,
"reorder_point": 30,
"max_quantity": 100,
"unit_cost": 289.99,
"previous_value": 6379.78,
"new_value": 4929.83,
"variance_amount": -1449.95
},
"audit_trail": {
"transaction_id": "INV-TXN-892401",
"performed_by": "system_agent",
"reason": "Cycle count adjustment - physical count discrepancy",
"adjustment_type": "cycle_count",
"requires_investigation": true
},
"status_change": {
"previous_status": "low",
"new_status": "critical_low",
"alert_level_changed": true
},
"notifications": {
"new_alerts": [
"Inventory adjustment of -5 units detected for PROD-3358 at W-001",
"Stock level now critical_low (17 units, reorder point 30)"
],
"stakeholders_notified": [
"warehouse_manager_w001@techsupply.com",
"inventory_control@techsupply.com",
"procurement_team@techsupply.com"
]
},
"warnings": [
"Negative adjustment exceeds 20% of previous quantity - investigation recommended",
"Stock level now below reorder point"
],
"recommendations": [
"Investigate cause of 5-unit discrepancy",
"Initiate reorder process for PROD-3358 at W-001",
"Review bin location A-08-D for potential shrinkage or misplacement"
]
}

Request 3: Large adjustment requiring approval (blocked)

POST /ws/rest/inventory/update
Query Parameters:
product_id=PROD-8472
warehouse_id=W-002
quantity_change=-50
reason=Customer return processing

Response 3:

{
"status": "error",
"timestamp": "2025-11-14T11:18:27Z",
"operation": "inventory_decrease",
"validation_result": "failed",
"error_code": "APPROVAL_REQUIRED",
"inventory_record": {
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"warehouse_id": "W-002",
"warehouse_name": "Southeast Distribution Center",
"current_quantity": 67,
"requested_change": -50,
"would_result_in": 17,
"reorder_point": 50,
"unit_cost": 145.00,
"adjustment_value": -7250.00
},
"validation_checks": {
"quantity_available": {
"passed": true,
"message": "Sufficient quantity available for adjustment"
},
"adjustment_threshold": {
"passed": false,
"message": "Adjustment of -50 units exceeds auto-approval threshold of 20 units"
},
"value_threshold": {
"passed": false,
"message": "Adjustment value of $7,250.00 exceeds auto-approval threshold of $5,000.00"
},
"would_breach_reorder_point": {
"passed": false,
"message": "Adjustment would result in quantity (17) below reorder point (50)"
}
},
"errors": [
"Adjustment requires manager approval due to quantity threshold exceeded",
"Adjustment requires manager approval due to value threshold exceeded",
"Adjustment would cause critical low stock condition"
],
"required_approvals": [
{
"approval_type": "warehouse_manager",
"reason": "Quantity adjustment exceeds 20-unit threshold",
"required_role": "Warehouse Manager or Inventory Control Manager"
},
{
"approval_type": "financial",
"reason": "Value adjustment exceeds $5,000 threshold",
"required_role": "Finance Manager"
}
],
"recommendations": [
"Submit adjustment request for manager approval",
"Verify customer return documentation before processing",
"Consider stock transfer to another warehouse instead of adjustment if items are still saleable",
"If approved, initiate immediate reorder to prevent stock-out"
],
"escalation": {
"ticket_id": "ESC-INV-45672",
"assigned_to": "inventory_control_manager@techsupply.com",
"priority": "high",
"details": "Large inventory adjustment requested - requires manual review and approval"
}
}

Tool 5: Get Supplier Information

Request 1: Get specific supplier

GET /ws/rest/inventory/suppliers?supplier_id=SUP-0456

Response 1:

{
"status": "success",
"timestamp": "2025-11-14T11:20:15Z",
"supplier_id": "SUP-0456",
"supplier_details": {
"name": "TechComponents Inc.",
"status": "approved",
"tier": "preferred",
"since": "2018-03-15",
"headquarters": "Cleveland, OH",
"primary_contact": {
"name": "Jennifer Williams",
"title": "Account Manager",
"email": "jwilliams@techcomponents.com",
"phone": "+1-216-555-0147"
},
"payment_terms": "Net 30",
"discount_terms": "2/10 Net 30",
"minimum_order": 1000.00,
"currency": "USD"
},
"product_categories": [
"Electronics",
"Sensors",
"Control Systems",
"Industrial Automation"
],
"products_supplied": [
{
"product_id": "PROD-8472",
"product_name": "Industrial Sensor Module",
"supplier_sku": "TC-ISM-8472-B",
"unit_price": 145.00,
"price_valid_until": "2025-12-31",
"lead_time_days": 7,
"minimum_order_quantity": 10,
"bulk_pricing": [
{
"quantity_min": 50,
"unit_price": 140.00,
"discount_percent": 3.45
},
{
"quantity_min": 100,
"unit_price": 135.00,
"discount_percent": 6.90
}
]
},
{
"product_id": "PROD-7821",
"product_name": "Programmable Logic Controller",
"supplier_sku": "TC-PLC-7821-X",
"unit_price": 380.00,
"price_valid_until": "2025-12-31",
"lead_time_days": 10,
"minimum_order_quantity": 5
},
{
"product_id": "PROD-9154",
"product_name": "Digital Display Module",
"supplier_sku": "TC-DDM-9154",
"unit_price": 67.50,
"price_valid_until": "2025-12-31",
"lead_time_days": 5,
"minimum_order_quantity": 20
}
],
"performance_metrics": {
"on_time_delivery_rate": 94.5,
"quality_rating": 4.7,
"responsiveness_rating": 4.8,
"total_orders_ytd": 47,
"total_value_ytd": 387650.00,
"last_order_date": "2025-11-10",
"average_lead_time_days": 7.2,
"defect_rate": 0.8
},
"certifications": [
"ISO 9001:2015",
"ISO 14001:2015",
"UL Listed",
"RoHS Compliant"
],
"shipping_locations": [
{
"facility": "Main Distribution Center",
"address": "4200 Industrial Boulevard, Cleveland, OH 44135",
"ships_to_warehouses": ["W-001", "W-002", "W-003", "W-004"],
"average_transit_days": {
"W-001": 2,
"W-002": 3,
"W-003": 2,
"W-004": 5
}
}
],
"notes": [
"Preferred supplier for electronic components",
"Offers 2% discount for early payment (within 10 days)",
"Can expedite orders for additional 15% fee"
]
}

Request 2: Get all suppliers for product category

GET /ws/rest/inventory/suppliers?product_category=Electronics

Response 2:

{
"status": "success",
"timestamp": "2025-11-14T11:21:45Z",
"product_category": "Electronics",
"total_suppliers": 8,
"suppliers": [
{
"supplier_id": "SUP-0456",
"name": "TechComponents Inc.",
"tier": "preferred",
"status": "approved",
"products_count": 28,
"average_lead_time_days": 7,
"on_time_delivery_rate": 94.5,
"quality_rating": 4.7,
"typical_price_range": "$50-$500",
"location": "Cleveland, OH"
},
{
"supplier_id": "SUP-0723",
"name": "Global Electronics Supply",
"tier": "approved",
"status": "approved",
"products_count": 45,
"average_lead_time_days": 12,
"on_time_delivery_rate": 89.2,
"quality_rating": 4.4,
"typical_price_range": "$100-$800",
"location": "San Jose, CA"
},
{
"supplier_id": "SUP-0834",
"name": "Midwest Electronic Solutions",
"tier": "approved",
"status": "approved",
"products_count": 22,
"average_lead_time_days": 5,
"on_time_delivery_rate": 91.8,
"quality_rating": 4.5,
"typical_price_range": "$30-$350",
"location": "Milwaukee, WI"
},
{
"supplier_id": "SUP-0967",
"name": "Atlantic Tech Distributors",
"tier": "approved",
"status": "approved",
"products_count": 35,
"average_lead_time_days": 8,
"on_time_delivery_rate": 92.3,
"quality_rating": 4.6,
"typical_price_range": "$75-$600",
"location": "Baltimore, MD"
},
{
"supplier_id": "SUP-1102",
"name": "Pacific Components Group",
"tier": "standard",
"status": "approved",
"products_count": 18,
"average_lead_time_days": 14,
"on_time_delivery_rate": 87.5,
"quality_rating": 4.2,
"typical_price_range": "$90-$700",
"location": "Portland, OR"
},
{
"supplier_id": "SUP-1245",
"name": "Southern Electronics Wholesale",
"tier": "standard",
"status": "approved",
"products_count": 31,
"average_lead_time_days": 10,
"on_time_delivery_rate": 88.9,
"quality_rating": 4.3,
"typical_price_range": "$40-$450",
"location": "Houston, TX"
},
{
"supplier_id": "SUP-1389",
"name": "Northeast Industrial Supply",
"tier": "standard",
"status": "approved",
"products_count": 26,
"average_lead_time_days": 6,
"on_time_delivery_rate": 90.1,
"quality_rating": 4.4,
"typical_price_range": "$55-$500",
"location": "Worcester, MA"
},
{
"supplier_id": "SUP-1467",
"name": "Central States Electronics",
"tier": "standard",
"status": "approved",
"products_count": 20,
"average_lead_time_days": 9,
"on_time_delivery_rate": 86.7,
"quality_rating": 4.1,
"typical_price_range": "$60-$550",
"location": "Kansas City, MO"
}
],
"recommendations": {
"best_for_speed": {
"supplier_id": "SUP-0834",
"name": "Midwest Electronic Solutions",
"average_lead_time_days": 5
},
"best_for_reliability": {
"supplier_id": "SUP-0456",
"name": "TechComponents Inc.",
"on_time_delivery_rate": 94.5
},
"best_for_quality": {
"supplier_id": "SUP-0456",
"name": "TechComponents Inc.",
"quality_rating": 4.7
},
"best_for_selection": {
"supplier_id": "SUP-0723",
"name": "Global Electronics Supply",
"products_count": 45
}
}
}

Request 3: Get all approved suppliers (no filter)

GET /ws/rest/inventory/suppliers

Response 3:

{
"status": "success",
"timestamp": "2025-11-14T11:23:08Z",
"total_suppliers": 24,
"filter": "status=approved",
"suppliers_by_category": {
"Electronics": 8,
"Cables": 5,
"Hardware": 6,
"Tools": 3,
"Safety Equipment": 2
},
"suppliers_by_tier": {
"preferred": 6,
"approved": 15,
"standard": 3
},
"top_suppliers": [
{
"supplier_id": "SUP-0456",
"name": "TechComponents Inc.",
"tier": "preferred",
"categories": ["Electronics", "Sensors", "Control Systems"],
"ytd_order_value": 387650.00,
"on_time_delivery_rate": 94.5,
"quality_rating": 4.7
},
{
"supplier_id": "SUP-0612",
"name": "ProCable Manufacturing",
"tier": "preferred",
"categories": ["Cables", "Wire", "Connectors"],
"ytd_order_value": 412300.00,
"on_time_delivery_rate": 96.2,
"quality_rating": 4.8
},
{
"supplier_id": "SUP-0723",
"name": "Global Electronics Supply",
"tier": "approved",
"categories": ["Electronics", "Components"],
"ytd_order_value": 298450.00,
"on_time_delivery_rate": 89.2,
"quality_rating": 4.4
},
{
"supplier_id": "SUP-0891",
"name": "Industrial Parts Direct",
"tier": "preferred",
"categories": ["Hardware", "Fasteners", "Industrial"],
"ytd_order_value": 356780.00,
"on_time_delivery_rate": 93.8,
"quality_rating": 4.6
},
{
"supplier_id": "SUP-0967",
"name": "Atlantic Tech Distributors",
"tier": "approved",
"categories": ["Electronics", "Automation"],
"ytd_order_value": 267920.00,
"on_time_delivery_rate": 92.3,
"quality_rating": 4.6
}
],
"summary_statistics": {
"total_ytd_spending": 2847650.00,
"average_on_time_delivery": 91.3,
"average_quality_rating": 4.5,
"average_lead_time_days": 8.7,
"suppliers_under_review": 2,
"suppliers_with_quality_issues": 1
}
}

Complete Scenario: Low Stock Alert Resolution

Here's how all 5 tools work together when the agent receives a low stock alert:

1. Initial Alert (Input to Agent)

{
"alert_type": "low_stock",
"warehouse_id": "W-001",
"product_id": "PROD-8472",
"current_quantity": 12,
"reorder_point": 50
}

2. Agent Action Sequence

Step 1: Call Query Inventory for PROD-8472 across all warehouses

  • Discovers: 3 out of 4 warehouses are below reorder point
  • Global stock: 156 units, but unevenly distributed

Step 2: Call Track Shipment by product

  • Discovers: Shipment TRK-9847561234 is already on the way (60 units)
  • Status: On schedule, delivery in 6 days
  • Impact: Will resolve W-001 critical situation

Step 3: Call Validate Purchase Order for PO-2025-1847

  • Confirms: PO is valid and approved
  • Shipment: Associated with tracking number from Step 2

Step 4: Call Get Supplier Info for SUP-0456

  • Gathers: Lead times, bulk pricing, contact information
  • For future reorder recommendations

Step 5: Generate comprehensive report

  • Current situation: Critical at W-001 (12 units), low at 2 other warehouses
  • Inbound relief: 60 units arriving in 6 days
  • Recommendation: Monitor shipment TRK-9847561234 closely
  • Optional: Consider expedited shipping or stock transfer from W-002

Step 6: (Optional) If shipment is received, call Update Inventory

  • When TRK-9847561234 arrives, adjust W-001 stock from 12 to 72 units
  • Clears critical low alert

Error Scenarios

Network Error

{
"status": "error",
"error_code": "NETWORK_ERROR",
"message": "Unable to connect to inventory management system",
"timestamp": "2025-11-14T11:25:00Z",
"retry_recommended": true,
"retry_after_seconds": 30
}

Authentication Error

{
"status": "error",
"error_code": "AUTH_ERROR",
"message": "Invalid or expired authentication credentials",
"timestamp": "2025-11-14T11:26:00Z",
"retry_recommended": false
}

Rate Limit Error

{
"status": "error",
"error_code": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded - maximum 100 requests per minute",
"timestamp": "2025-11-14T11:27:00Z",
"retry_recommended": true,
"retry_after_seconds": 45,
"rate_limit": {
"limit": 100,
"remaining": 0,
"reset_at": "2025-11-14T11:28:00Z"
}
}