webapi.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. <!-- Source -->
  11. <route url="/V1/inventory/sources" method="GET">
  12. <service class="Magento\InventoryApi\Api\SourceRepositoryInterface" method="getList"/>
  13. <resources>
  14. <resource ref="Magento_InventoryApi::source"/>
  15. </resources>
  16. </route>
  17. <route url="/V1/inventory/sources/:sourceCode" method="GET">
  18. <service class="Magento\InventoryApi\Api\SourceRepositoryInterface" method="get"/>
  19. <resources>
  20. <resource ref="Magento_InventoryApi::source"/>
  21. </resources>
  22. </route>
  23. <route url="/V1/inventory/sources" method="POST">
  24. <service class="Magento\InventoryApi\Api\SourceRepositoryInterface" method="save"/>
  25. <resources>
  26. <resource ref="Magento_InventoryApi::source_edit"/>
  27. </resources>
  28. </route>
  29. <route url="/V1/inventory/sources/:sourceCode" method="PUT">
  30. <service class="Magento\InventoryApi\Api\SourceRepositoryInterface" method="save"/>
  31. <resources>
  32. <resource ref="Magento_InventoryApi::source_edit"/>
  33. </resources>
  34. </route>
  35. <route url="/V1/inventory/get-sources-assigned-to-stock-ordered-by-priority/:stockId" method="GET">
  36. <service class="Magento\InventoryApi\Api\GetSourcesAssignedToStockOrderedByPriorityInterface" method="execute"/>
  37. <resources>
  38. <resource ref="Magento_InventoryApi::source"/>
  39. </resources>
  40. </route>
  41. <!-- Stock -->
  42. <route url="/V1/inventory/stocks" method="GET">
  43. <service class="Magento\InventoryApi\Api\StockRepositoryInterface" method="getList"/>
  44. <resources>
  45. <resource ref="Magento_InventoryApi::stock"/>
  46. </resources>
  47. </route>
  48. <route url="/V1/inventory/stocks/:stockId" method="GET">
  49. <service class="Magento\InventoryApi\Api\StockRepositoryInterface" method="get"/>
  50. <resources>
  51. <resource ref="Magento_InventoryApi::stock"/>
  52. </resources>
  53. </route>
  54. <route url="/V1/inventory/stocks" method="POST">
  55. <service class="Magento\InventoryApi\Api\StockRepositoryInterface" method="save"/>
  56. <resources>
  57. <resource ref="Magento_InventoryApi::stock_edit"/>
  58. </resources>
  59. </route>
  60. <route url="/V1/inventory/stocks/:stockId" method="DELETE">
  61. <service class="Magento\InventoryApi\Api\StockRepositoryInterface" method="deleteById"/>
  62. <resources>
  63. <resource ref="Magento_InventoryApi::stock_delete"/>
  64. </resources>
  65. </route>
  66. <route url="/V1/inventory/stocks/:stockId" method="PUT">
  67. <service class="Magento\InventoryApi\Api\StockRepositoryInterface" method="save"/>
  68. <resources>
  69. <resource ref="Magento_InventoryApi::stock_edit"/>
  70. </resources>
  71. </route>
  72. <!-- StockSourceLink -->
  73. <route url="/V1/inventory/stock-source-links" method="GET">
  74. <service class="Magento\InventoryApi\Api\GetStockSourceLinksInterface" method="execute"/>
  75. <resources>
  76. <resource ref="Magento_InventoryApi::stock_source_link"/>
  77. </resources>
  78. </route>
  79. <route url="/V1/inventory/stock-source-links" method="POST">
  80. <service class="Magento\InventoryApi\Api\StockSourceLinksSaveInterface" method="execute"/>
  81. <resources>
  82. <resource ref="Magento_InventoryApi::stock_source_link"/>
  83. </resources>
  84. </route>
  85. <route url="/V1/inventory/stock-source-links-delete" method="POST">
  86. <service class="Magento\InventoryApi\Api\StockSourceLinksDeleteInterface" method="execute"/>
  87. <resources>
  88. <resource ref="Magento_InventoryApi::stock_source_link"/>
  89. </resources>
  90. </route>
  91. <!-- SourceItem -->
  92. <route url="/V1/inventory/source-items" method="GET">
  93. <service class="Magento\InventoryApi\Api\SourceItemRepositoryInterface" method="getList"/>
  94. <resources>
  95. <resource ref="Magento_InventoryApi::source"/>
  96. </resources>
  97. </route>
  98. <route url="/V1/inventory/source-items" method="POST">
  99. <service class="Magento\InventoryApi\Api\SourceItemsSaveInterface" method="execute"/>
  100. <resources>
  101. <resource ref="Magento_InventoryApi::source"/>
  102. </resources>
  103. </route>
  104. <route url="/V1/inventory/source-items-delete" method="POST">
  105. <service class="Magento\InventoryApi\Api\SourceItemsDeleteInterface" method="execute"/>
  106. <resources>
  107. <resource ref="Magento_InventoryApi::source"/>
  108. </resources>
  109. </route>
  110. </routes>