The SKU object and the allowed CRUD operations on the related resource endpoint
image_urlare best suited for internal usage (Commerce Layer is not a CMS).
By marking an SKU with the
do_not_trackcombinable flags, is possible to manage different scenarios, such as intangible products which generate no shipments, or products with a virtually infinite stock.
For performance reasons the
inventoryattribute is returned when retrieving a single SKU only.
You can fetch via API a list of SKUs and include the
stock_items.reserved_stockrelationships, but in order to get the real-time stock availability you need to perform some additional computation on your side, based on the response payload:
- 1.Cycle the
includedpayload for each SKU to get the sums of
- 2.Subtract the latter from the former to get the cross-stock availability for each SKU (you can also do distinct subtractions to get the per-stock SKU availability).