webapi.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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/bundle-products/:sku/links/:optionId" method="POST">
  11. <service class="Magento\Bundle\Api\ProductLinkManagementInterface" method="addChildByProductSku"/>
  12. <resources>
  13. <resource ref="Magento_Catalog::products"/>
  14. </resources>
  15. </route>
  16. <route url="/V1/bundle-products/:sku/links/:id" method="PUT">
  17. <service class="Magento\Bundle\Api\ProductLinkManagementInterface" method="saveChild"/>
  18. <resources>
  19. <resource ref="Magento_Catalog::products"/>
  20. </resources>
  21. </route>
  22. <route url="/V1/bundle-products/:productSku/children" method="GET">
  23. <service class="Magento\Bundle\Api\ProductLinkManagementInterface" method="getChildren"/>
  24. <resources>
  25. <resource ref="Magento_Catalog::products"/>
  26. </resources>
  27. </route>
  28. <route url="/V1/bundle-products/:sku/options/:optionId/children/:childSku" method="DELETE">
  29. <service class="Magento\Bundle\Api\ProductLinkManagementInterface" method="removeChild"/>
  30. <resources>
  31. <resource ref="Magento_Catalog::products"/>
  32. </resources>
  33. </route>
  34. <route url="/V1/bundle-products/:sku/options/all" method="GET">
  35. <service class="Magento\Bundle\Api\ProductOptionRepositoryInterface" method="getList" />
  36. <resources>
  37. <resource ref="Magento_Catalog::products" />
  38. </resources>
  39. </route>
  40. <route url="/V1/bundle-products/options/types" method="GET">
  41. <service class="Magento\Bundle\Api\ProductOptionTypeListInterface" method="getItems" />
  42. <resources>
  43. <resource ref="Magento_Catalog::products" />
  44. </resources>
  45. </route>
  46. <route url="/V1/bundle-products/:sku/options/:optionId" method="GET">
  47. <service class="Magento\Bundle\Api\ProductOptionRepositoryInterface" method="get" />
  48. <resources>
  49. <resource ref="Magento_Catalog::products" />
  50. </resources>
  51. </route>
  52. <route url="/V1/bundle-products/options/add" method="POST">
  53. <service class="Magento\Bundle\Api\ProductOptionManagementInterface" method="save" />
  54. <resources>
  55. <resource ref="Magento_Catalog::products" />
  56. </resources>
  57. </route>
  58. <route url="/V1/bundle-products/options/:optionId" method="PUT">
  59. <service class="Magento\Bundle\Api\ProductOptionManagementInterface" method="save" />
  60. <resources>
  61. <resource ref="Magento_Catalog::products" />
  62. </resources>
  63. </route>
  64. <route url="/V1/bundle-products/:sku/options/:optionId" method="DELETE">
  65. <service class="Magento\Bundle\Api\ProductOptionRepositoryInterface" method="deleteById" />
  66. <resources>
  67. <resource ref="Magento_Catalog::products" />
  68. </resources>
  69. </route>
  70. </routes>