List bundle inventories
Get the number of available bundles, calculated from their components.
POST
/ bigblue.storeapi.v1.PublicAPI/ ListBundleInventoriesReturns one row per bundle and warehouse. Bundles have no stock of their own, so the counts are calculated from the components:
available = min(floor(component.available / component.quantity))
in_warehouse = min(floor(component.in_warehouse / component.quantity))Only these two counts are returned. For damaged, expired and backordered units,
check the components with
ListInventories.
Request body
warehousestringOnly return this warehouse.
Pattern
^([A-Za-z]{2}-[A-Za-z]{3}-[0-9]{3}|)$page_sizeintegerdefault 1000Rows per page.
page_tokenstringThe
next_page_token from the previous response.You can't filter by bundle.
Responses
bundle_inventoriesBundleInventory[]One row per bundle and warehouse.
next_page_tokenstringToken for the next page. Missing on the last page.
BundleInventory
bundlestringBundle ID.
Pattern
^[A-Za-z0-9]{4}BU-[A-Za-z0-9]{6}-[A-Za-z0-9]{4}$warehousestringWarehouse ID.
Pattern
^[A-Za-z]{2}-[A-Za-z]{3}-[0-9]{3}$availableintegerBundles you can sell now.
in_warehouseintegerBundles that could be made from good stock, including reserved units.
POST
/ bigblue.storeapi.v1.PublicAPI/ ListBundleInventories{ "warehouse": "FR-CDG-001", "page_size": 100 }{
"bundle_inventories": [
{
"bundle": "BGBLBU-KITSTA-2024",
"warehouse": "FR-CDG-001",
"available": 3,
"in_warehouse": 5
}
]
}const { bundle } = await call('GetBundle', { id: 'BGBLBU-KITSTA-2024' });
const rows = await Promise.all(
bundle.components.map(async (c) => {
const inv = await call('ListInventories', {
product: c.product,
warehouse: 'FR-CDG-001',
});
const available = inv.inventories?.[0]?.available ?? 0;
return { product: c.product, bundles: Math.floor(available / c.quantity) };
}),
);
rows.sort((a, b) => a.bundles - b.bundles);
// rows[0] is the component that limits the bundle.