Skip to main content
The Inventory Data Model provides comprehensive stock tracking across your e-commerce operations. V4 introduces enhanced inventory management with support for multiple warehouse locations, reserved quantities, and automated reorder thresholds.
  • Real-time stock tracking: Monitor physical, reserved, and available quantities for each item variant.
  • Multi-location support: Track inventory across multiple warehouse locations with embedded address information.
  • Automated reordering: Set reorder levels and quantities to trigger alerts when stock runs low.
  • Expandable relationships: Use the expand parameter to include full Item, Variant, and Address details.

Attributes

FieldTypeDescriptionRequiredExpandable
rootfi_idintegerUnique identifier for this inventory recordYesNo
rootfi_created_atdatetimeWhen this inventory record was created in Commenda’s systemYesNo
rootfi_updated_atdatetimeWhen this inventory record was last updatedYesNo
rootfi_company_idintegerCompany identifier this inventory belongs toYesNo
platform_idstringPlatform-specific inventory identifierYesNo
item_idstringReference to the Item being trackedYesYes
variant_idstringReference to the specific Variant being trackedNoYes
skustringStock Keeping Unit for this inventory itemYesNo
quantityintegerTotal physical quantity in stockYesNo
reserved_quantityintegerQuantity allocated to pending orders but not yet shippedYesNo
available_quantityintegerQuantity available for new orders (quantity - reserved_quantity)YesNo
statusenumCurrent inventory statusYesNo
is_trackablebooleanWhether inventory levels are actively monitored for this itemYesNo
reorder_levelintegerQuantity threshold that triggers reorder alertsNoNo
reorder_quantityintegerSuggested quantity to reorder when stock is lowNoNo
addressesarrayWarehouse locations where this inventory is storedNoYes

Status Enum Values

ValueDescription
in_stockItem is available in sufficient quantity
low_stockItem quantity is below reorder level
out_of_stockItem quantity is zero
discontinuedItem is no longer being restocked
unknownStatus cannot be determined

Expandable Attributes

  • expand=item - Includes full Item object
  • expand=variant - Includes full Variant object
  • expand=addresses - Includes warehouse location details

Warehouse Address Object

Each address in the addresses array represents a warehouse location:
FieldTypeDescriptionRequired
rootfi_idintegerUnique identifier for this addressYes
platform_idstringPlatform-specific address identifierNo
typeenumAddress type (always warehouse for inventory locations)Yes
streetstringStreet address of the warehouseYes
citystringCity where the warehouse is locatedYes
statestringState or provinceNo
postal_codestringZIP or postal codeYes
countrystringISO 3166-1 alpha-2 country codeYes

Filtering Inventory

You can filter inventory records using query parameters:
GET /v4/inventory?item_id=prod_789
GET /v4/inventory?sku=WH-2024-BLK-M
GET /v4/inventory?status=low_stock
{
  "rootfi_id": 8001,
  "rootfi_created_at": "2024-01-22T05:07:31.465Z",
  "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
  "rootfi_company_id": 1089,
  "platform_id": "inv_shopify_001",
  "item_id": "prod_789",
  "variant_id": "var_001",
  "sku": "WH-2024-BLK-M",
  "quantity": 100,
  "reserved_quantity": 10,
  "available_quantity": 90,
  "status": "in_stock",
  "is_trackable": true,
  "reorder_level": 20,
  "reorder_quantity": 50,
  "addresses": [
    {
      "rootfi_id": 9001,
      "platform_id": "loc_warehouse_001",
      "type": "warehouse",
      "street": "123 Warehouse St",
      "city": "Los Angeles",
      "state": "CA",
      "postal_code": "90001",
      "country": "US"
    }
  ]
}

Low Stock Example

Low Stock Inventory Response
{
  "rootfi_id": 8002,
  "rootfi_created_at": "2024-01-22T05:07:31.465Z",
  "rootfi_updated_at": "2024-01-25T10:30:00.000Z",
  "rootfi_company_id": 1089,
  "platform_id": "inv_shopify_002",
  "item_id": "prod_456",
  "variant_id": "var_002",
  "sku": "TS-2024-RED-L",
  "quantity": 15,
  "reserved_quantity": 5,
  "available_quantity": 10,
  "status": "low_stock",
  "is_trackable": true,
  "reorder_level": 20,
  "reorder_quantity": 100,
  "addresses": [
    {
      "rootfi_id": 9001,
      "platform_id": "loc_warehouse_001",
      "type": "warehouse",
      "street": "123 Warehouse St",
      "city": "Los Angeles",
      "state": "CA",
      "postal_code": "90001",
      "country": "US"
    }
  ]
}