the API documentation says the 2nd parameter iis stockId
https://magento.redoc.ly/2.4.5-admin/tag/inventoryget-product-salable-quantityskustockId
This tutorial says it’s sourceId
https://developer.adobe.com/commerce/webapi/rest/tutorials/inventory/create-cart-add-products/
IF it’s sourceId, where do I obtain sourceIds ??
Seems like if anything would return a sourceId, it would be
https://magento.redoc.ly/2.4.5-admin/tag/inventorysources#operation/PostV1InventorySources
which seems to return everything but an id.
{ "items": [ { "source_code": "default", "name": "Default Source", "enabled": true, "description": "Default Source", "latitude": 0, "longitude": 0, "country_id": "US", "postcode": "00000", "use_default_carrier_config": true, "carrier_links": [], "extension_attributes": { "is_pickup_location_active": false, "frontend_name": "" } } ], "search_criteria": { "filter_groups": [] }, "total_count": 1 }
This is so painful
https://magento.redoc.ly/2.4.5-admin/tag/inventorystocks
Why is sku
not a field that I can use to search??
How do I get stock qty for a sku for each of my warehouses?
With Magento V!, this was /multiwhse/id/sku1,sku2,sku3…
submitted by /u/bkdotcom
[link] [comments]