Inventory API

Monitor stock levels across your warehouses in real time.

Endpoints
GET

/inventory

inventory:read

Retrieve stock levels for all products. Supports filtering by warehouse and low-stock status.

GET

/inventory/:productId

inventory:read

Retrieve stock information for a specific product across all warehouses.

Field Reference
FieldTypeRequiredDescription

id

string

No

Unique stock record ID (read-only)

productId

string

No

Product identifier

productSku

string

No

Product SKU

productName

string

No

Product name (read-only)

warehouseId

string

No

Warehouse identifier

warehouseName

string

No

Warehouse name (read-only)

quantity

integer

No

Current stock quantity

reservedQuantity

integer

No

Quantity reserved for pending orders

availableQuantity

integer

No

Available quantity (quantity minus reserved)

minThreshold

integer

No

Low stock alert threshold

updatedAt

datetime

No

Last stock update timestamp

Query Parameters (List)
FieldTypeRequiredDescription

page

integer

No

Page number (default: 1)

limit

integer

No

Items per page (default: 20, max: 100)

warehouseId

string

No

Filter by warehouse ID

lowStock

boolean

No

Only show products below low-stock threshold

Example
List inventory levels
bash
curl "https://api.mercozy.com/api/v1/external/inventory?lowStock=true" \
  -H "X-API-Key: mk_live_your_key_here"
Get stock for a specific product
bash
curl "https://api.mercozy.com/api/v1/external/inventory/prod_abc123" \
  -H "X-API-Key: mk_live_your_key_here"
Example Response
json
{
  "data": {
    "productId": "prod_abc123",
    "productName": "Premium Widget",
    "sku": "WDG-001",
    "quantity": 42,
    "lowStockThreshold": 10,
    "warehouseId": "wh_main",
    "warehouseName": "Main Warehouse",
    "updatedAt": "2025-12-15T10:30:00Z"
  }
}