Open API v2 / Custom Modules / Module Item Inventory

Module Item Inventory

Every request needs a bearer token: Authorization: Bearer <token>. Base URL https://your-site.webinone.com. New to field types? See the type reference.

DELETE/api/v2/admin/module-items/{moduleItemId}/discard-variations#

Discards existing module item inventory variations

Parameters
moduleItemIdinteger · pathrequired
Module item id.
curl -X DELETE "https://your-site.webinone.com/api/v2/admin/module-items/1/discard-variations" \
  -H "Authorization: Bearer <token>"
PUT/api/v2/admin/module-items/{moduleItemId}/generate-variations#

Generates module item inventory variations

Parameters
moduleItemIdinteger · pathrequired
Module item id.
Response
Enabledboolean
Whether enabled is on.
LowStockNotificationinteger
Stock threshold at or below which a low-stock notification is triggered.
HasAttributesboolean
Indicates whether the item has product attributes (such as size or color) that split its inventory into variants.
WhenOutOfStockenum
Behavior applied to the product once its stock reaches zero. Possible values: HideProduct, EnablePreOrdering, ShowButNotAcceptOrders.Possible values: HideProductEnablePreOrderingShowButNotAcceptOrders
HasGeneratedInventoryProductsboolean
Indicates whether variant inventory records have been generated from the item's attribute combinations.
InventoryProductsarray of objects
Per-variant inventory records, each tracking its own stock, SKU, and pre-order allowance.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/module-items/1/generate-variations" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Enabled": false,
  "LowStockNotification": 0,
  "HasAttributes": false,
  "WhenOutOfStock": "HideProduct",
  "HasGeneratedInventoryProducts": false,
  "InventoryProducts": [
    {
      "Id": 1,
      "SKUCode": "string",
      "InStock": 0,
      "Enabled": false,
      "Title": "string",
      "PreOrder": 0
    }
  ]
}
GET/api/v2/admin/module-items/{moduleItemId}/inventory#

Retrieves a module item inventory

Parameters
moduleItemIdinteger · pathrequired
Module item id.
Response
Enabledboolean
Whether enabled is on.
LowStockNotificationinteger
Stock threshold at or below which a low-stock notification is triggered.
HasAttributesboolean
Indicates whether the item has product attributes (such as size or color) that split its inventory into variants.
WhenOutOfStockenum
Behavior applied to the product once its stock reaches zero. Possible values: HideProduct, EnablePreOrdering, ShowButNotAcceptOrders.Possible values: HideProductEnablePreOrderingShowButNotAcceptOrders
HasGeneratedInventoryProductsboolean
Indicates whether variant inventory records have been generated from the item's attribute combinations.
InventoryProductsarray of objects
Per-variant inventory records, each tracking its own stock, SKU, and pre-order allowance.
curl "https://your-site.webinone.com/api/v2/admin/module-items/1/inventory" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Enabled": false,
  "LowStockNotification": 0,
  "HasAttributes": false,
  "WhenOutOfStock": "HideProduct",
  "HasGeneratedInventoryProducts": false,
  "InventoryProducts": [
    {
      "Id": 1,
      "SKUCode": "string",
      "InStock": 0,
      "Enabled": false,
      "Title": "string",
      "PreOrder": 0
    }
  ]
}
PUT/api/v2/admin/module-items/{moduleItemId}/inventory#

Updates an existing module item inventory

Parameters
moduleItemIdinteger · pathrequired
Module item id.
Body parameters
Enabledboolean
Whether enabled is on.
LowStockNotificationinteger
Stock threshold at or below which a low-stock notification is triggered.
WhenOutOfStockenum
Behavior applied to the product once its stock reaches zero. Possible values: HideProduct, EnablePreOrdering, ShowButNotAcceptOrders.Possible values: HideProductEnablePreOrderingShowButNotAcceptOrders
InventoryProductsarray of objects
Per-variant inventory records to set, each with its own stock, SKU, and pre-order allowance.
Response
Enabledboolean
Whether enabled is on.
LowStockNotificationinteger
Stock threshold at or below which a low-stock notification is triggered.
HasAttributesboolean
Indicates whether the item has product attributes (such as size or color) that split its inventory into variants.
WhenOutOfStockenum
Behavior applied to the product once its stock reaches zero. Possible values: HideProduct, EnablePreOrdering, ShowButNotAcceptOrders.Possible values: HideProductEnablePreOrderingShowButNotAcceptOrders
HasGeneratedInventoryProductsboolean
Indicates whether variant inventory records have been generated from the item's attribute combinations.
InventoryProductsarray of objects
Per-variant inventory records, each tracking its own stock, SKU, and pre-order allowance.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/module-items/1/inventory" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"Enabled":false,"LowStockNotification":0,"WhenOutOfStock":"HideProduct","InventoryProducts":[{"Id":1,"SKUCode":"string","InStock":0,"Enabled":false,"Title":"string","PreOrder":0}]}'
Response · 200
{
  "Enabled": false,
  "LowStockNotification": 0,
  "HasAttributes": false,
  "WhenOutOfStock": "HideProduct",
  "HasGeneratedInventoryProducts": false,
  "InventoryProducts": [
    {
      "Id": 1,
      "SKUCode": "string",
      "InStock": 0,
      "Enabled": false,
      "Title": "string",
      "PreOrder": 0
    }
  ]
}