This page describes planned API endpoints for the Syngenta Warehouse Management System. The application is currently in early development. No API endpoints are currently implemented.
Overview
The Inventory API will provide endpoints for managing product inventory across warehouses, including stock levels, locations, and movements.
List Inventory Items
Retrieve a paginated list of inventory items with optional filtering.
Endpoint
Query Parameters
Page number for pagination
Number of items per page (max: 100)
Filter by warehouse code (e.g., “WH001”)
Filter by status: active, low_stock, out_of_stock, discontinued
Filter by product category (e.g., “seeds”, “fertilizers”, “pesticides”)
Search by product name, SKU, or barcode
sort
string
default:"-updatedAt"
Sort field (prefix with - for descending). Options: name, sku, quantity, createdAt, updatedAt
Request Example
curl -X GET "https://api.syngenta-wms.com/api/v1/inventory?warehouse=WH001&status=active&page=1&limit=20" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
Array of inventory itemsReserved quantity (allocated to orders)
Total quantity (available + reserved)
Storage location within warehouse (e.g., “A-12-3”)
Unit of measurement (e.g., “kg”, “liters”, “units”)
Minimum quantity before reorder
Quantity to order when restocking
Inventory status: active, low_stock, out_of_stock, discontinued
Product expiration date (ISO 8601)
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
{
"success": true,
"data": [
{
"id": "inv_123456",
"sku": "SYN-SEED-001",
"barcode": "8901234567890",
"name": "NK603 Corn Seed",
"description": "Genetically modified corn seed resistant to glyphosate",
"category": "seeds",
"warehouse": {
"code": "WH001",
"name": "Central Distribution Center",
"location": "Des Moines, IA"
},
"quantity": {
"available": 15000,
"reserved": 2000,
"total": 17000
},
"location": "A-12-3",
"unit": "kg",
"reorderPoint": 5000,
"reorderQuantity": 10000,
"status": "active",
"expirationDate": "2027-12-31T00:00:00Z",
"createdAt": "2025-06-15T08:00:00Z",
"updatedAt": "2026-03-12T09:15:00Z"
},
{
"id": "inv_123457",
"sku": "SYN-FERT-002",
"barcode": "8901234567891",
"name": "Atrazine 4L Herbicide",
"description": "Pre and post-emergence herbicide for broadleaf control",
"category": "pesticides",
"warehouse": {
"code": "WH001",
"name": "Central Distribution Center",
"location": "Des Moines, IA"
},
"quantity": {
"available": 3500,
"reserved": 500,
"total": 4000
},
"location": "B-08-1",
"unit": "liters",
"reorderPoint": 2000,
"reorderQuantity": 5000,
"status": "low_stock",
"expirationDate": "2028-06-30T00:00:00Z",
"createdAt": "2025-03-20T10:30:00Z",
"updatedAt": "2026-03-11T14:22:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1247,
"totalPages": 63
},
"metadata": {
"timestamp": "2026-03-12T10:30:00Z",
"requestId": "req_abc123"
}
}
Get Inventory Item
Retrieve detailed information about a specific inventory item.
Endpoint
GET /api/v1/inventory/{id}
Path Parameters
Request Example
curl -X GET https://api.syngenta-wms.com/api/v1/inventory/inv_123456 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
Returns a single inventory item object with the same structure as the list endpoint.
Create Inventory Item
Add a new product to the inventory system.
Endpoint
Request Body
Stock Keeping Unit (must be unique)
Storage location within warehouse
Minimum quantity before reorder
Quantity to order when restocking
Product expiration date (ISO 8601)
Request Example
curl -X POST https://api.syngenta-wms.com/api/v1/inventory \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sku": "SYN-PEST-003",
"barcode": "8901234567892",
"name": "Force 3G Insecticide",
"description": "Soil insecticide for corn rootworm control",
"category": "pesticides",
"warehouse": "WH001",
"quantity": 8000,
"location": "C-15-2",
"unit": "kg",
"reorderPoint": 3000,
"reorderQuantity": 6000,
"expirationDate": "2029-12-31T00:00:00Z"
}'
Response
Returns the created inventory item object with status code 201.
Creating an inventory item automatically generates an initial stock movement record for auditing purposes.
Update Inventory Item
Update an existing inventory item’s information.
Endpoint
PUT /api/v1/inventory/{id}
Path Parameters
Request Body
All fields are optional. Only include fields you want to update.
Storage location within warehouse
Minimum quantity before reorder
Quantity to order when restocking
Inventory status: active, discontinued
Quantity cannot be updated directly. Use the adjustment endpoint to modify stock levels.
Request Example
curl -X PUT https://api.syngenta-wms.com/api/v1/inventory/inv_123456 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"location": "A-15-4",
"reorderPoint": 6000,
"reorderQuantity": 12000
}'
Response
Returns the updated inventory item object.
Adjust Inventory Quantity
Adjust the quantity of an inventory item (increase or decrease stock).
Endpoint
POST /api/v1/inventory/{id}/adjust
Path Parameters
Request Body
Adjustment type: add, remove, set
Quantity to adjust (positive number)
Reason for adjustment: received, damaged, expired, theft, correction, return, other
Additional notes about the adjustment
Reference number (e.g., PO number, return authorization)
Request Example
curl -X POST https://api.syngenta-wms.com/api/v1/inventory/inv_123456/adjust \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "add",
"quantity": 5000,
"reason": "received",
"notes": "New shipment received from supplier",
"reference": "PO-2026-001234"
}'
Response
{
"success": true,
"data": {
"id": "adj_789012",
"inventoryId": "inv_123456",
"type": "add",
"quantity": 5000,
"previousQuantity": 17000,
"newQuantity": 22000,
"reason": "received",
"notes": "New shipment received from supplier",
"reference": "PO-2026-001234",
"performedBy": {
"id": "usr_123456",
"name": "John Doe"
},
"createdAt": "2026-03-12T10:45:00Z"
},
"metadata": {
"timestamp": "2026-03-12T10:45:00Z",
"requestId": "req_xyz789"
}
}
All quantity adjustments are logged in the inventory movement history for complete audit trails.
Get Inventory Movement History
Retrieve the movement history for an inventory item.
Endpoint
GET /api/v1/inventory/{id}/movements
Path Parameters
Query Parameters
Filter movements from this date (ISO 8601)
Filter movements until this date (ISO 8601)
Request Example
curl -X GET "https://api.syngenta-wms.com/api/v1/inventory/inv_123456/movements?page=1&limit=10" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
Returns a paginated list of inventory movements with details about each adjustment.
Delete Inventory Item
Delete an inventory item from the system.
Endpoint
DELETE /api/v1/inventory/{id}
Path Parameters
Deleting an inventory item is permanent and cannot be undone. Consider setting status to discontinued instead.
Request Example
curl -X DELETE https://api.syngenta-wms.com/api/v1/inventory/inv_123456 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
"success": true,
"data": {
"message": "Inventory item deleted successfully",
"id": "inv_123456"
},
"metadata": {
"timestamp": "2026-03-12T11:00:00Z",
"requestId": "req_delete1"
}
}
Error Responses
Insufficient Stock
{
"success": false,
"error": {
"code": "INSUFFICIENT_STOCK",
"message": "Cannot remove 10000 units. Only 5000 available.",
"details": {
"requested": 10000,
"available": 5000
}
},
"metadata": {
"timestamp": "2026-03-12T10:30:00Z",
"requestId": "req_error1"
}
}
Duplicate SKU
{
"success": false,
"error": {
"code": "DUPLICATE_RESOURCE",
"message": "An inventory item with SKU 'SYN-SEED-001' already exists"
},
"metadata": {
"timestamp": "2026-03-12T10:30:00Z",
"requestId": "req_error2"
}
}