Skip to main content
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

GET /api/v1/inventory

Query Parameters

page
integer
default:"1"
Page number for pagination
limit
integer
default:"20"
Number of items per page (max: 100)
warehouse
string
Filter by warehouse code (e.g., “WH001”)
status
string
Filter by status: active, low_stock, out_of_stock, discontinued
category
string
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

success
boolean
Request success status
data
array
Array of inventory items
id
string
Unique inventory item ID
sku
string
Stock Keeping Unit (SKU)
barcode
string
Product barcode
name
string
Product name
description
string
Product description
category
string
Product category
warehouse
object
code
string
Warehouse code
name
string
Warehouse name
location
string
Warehouse location
quantity
object
available
number
Available quantity
reserved
number
Reserved quantity (allocated to orders)
total
number
Total quantity (available + reserved)
location
string
Storage location within warehouse (e.g., “A-12-3”)
unit
string
Unit of measurement (e.g., “kg”, “liters”, “units”)
reorderPoint
number
Minimum quantity before reorder
reorderQuantity
number
Quantity to order when restocking
status
string
Inventory status: active, low_stock, out_of_stock, discontinued
expirationDate
string
Product expiration date (ISO 8601)
createdAt
string
Creation timestamp (ISO 8601)
updatedAt
string
Last update timestamp (ISO 8601)
pagination
object
Pagination information
page
number
Current page
limit
number
Items per page
total
number
Total number of items
totalPages
number
Total number of pages
Response Example
{
  "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

id
string
required
Inventory item ID

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

POST /api/v1/inventory

Request Body

sku
string
required
Stock Keeping Unit (must be unique)
barcode
string
Product barcode
name
string
required
Product name
description
string
Product description
category
string
required
Product category
warehouse
string
required
Warehouse code
quantity
number
required
Initial quantity
location
string
Storage location within warehouse
unit
string
required
Unit of measurement
reorderPoint
number
Minimum quantity before reorder
reorderQuantity
number
Quantity to order when restocking
expirationDate
string
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

id
string
required
Inventory item ID

Request Body

All fields are optional. Only include fields you want to update.
name
string
Product name
description
string
Product description
category
string
Product category
location
string
Storage location within warehouse
reorderPoint
number
Minimum quantity before reorder
reorderQuantity
number
Quantity to order when restocking
status
string
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

id
string
required
Inventory item ID

Request Body

type
string
required
Adjustment type: add, remove, set
quantity
number
required
Quantity to adjust (positive number)
reason
string
required
Reason for adjustment: received, damaged, expired, theft, correction, return, other
notes
string
Additional notes about the adjustment
reference
string
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

id
string
required
Inventory item ID

Query Parameters

page
integer
default:"1"
Page number
limit
integer
default:"20"
Items per page
startDate
string
Filter movements from this date (ISO 8601)
endDate
string
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

id
string
required
Inventory item ID
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"
  }
}

Build docs developers (and LLMs) love