webapi.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
  10. <route url="/V1/stockItems/:productSku" method="GET">
  11. <service class="Magento\CatalogInventory\Api\StockRegistryInterface" method="getStockItemBySku"/>
  12. <resources>
  13. <resource ref="Magento_CatalogInventory::cataloginventory"/>
  14. </resources>
  15. </route>
  16. <route url="/V1/products/:productSku/stockItems/:itemId" method="PUT">
  17. <service class="Magento\CatalogInventory\Api\StockRegistryInterface" method="updateStockItemBySku"/>
  18. <resources>
  19. <resource ref="Magento_CatalogInventory::cataloginventory"/>
  20. </resources>
  21. </route>
  22. <route url="/V1/stockItems/lowStock/" method="GET">
  23. <service class="Magento\CatalogInventory\Api\StockRegistryInterface" method="getLowStockItems"/>
  24. <resources>
  25. <resource ref="Magento_CatalogInventory::cataloginventory"/>
  26. </resources>
  27. </route>
  28. <route url="/V1/stockStatuses/:productSku" method="GET">
  29. <service class="Magento\CatalogInventory\Api\StockRegistryInterface" method="getStockStatusBySku"/>
  30. <resources>
  31. <resource ref="Magento_CatalogInventory::cataloginventory"/>
  32. </resources>
  33. </route>
  34. </routes>