webapi.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. <!-- Managing shipping guest information -->
  11. <route url="/V1/guest-carts/:cartId/shipping-information" method="POST">
  12. <service class="Magento\Checkout\Api\GuestShippingInformationManagementInterface" method="saveAddressInformation"/>
  13. <resources>
  14. <resource ref="anonymous" />
  15. </resources>
  16. </route>
  17. <!-- Managing My shipping information -->
  18. <route url="/V1/carts/mine/shipping-information" method="POST">
  19. <service class="Magento\Checkout\Api\ShippingInformationManagementInterface" method="saveAddressInformation"/>
  20. <resources>
  21. <resource ref="self" />
  22. </resources>
  23. <data>
  24. <parameter name="cartId" force="true">%cart_id%</parameter>
  25. </data>
  26. </route>
  27. <!-- Managing shipping information-->
  28. <route url="/V1/carts/:cartId/shipping-information" method="POST">
  29. <service class="Magento\Checkout\Api\ShippingInformationManagementInterface" method="saveAddressInformation"/>
  30. <resources>
  31. <resource ref="Magento_Cart::manage" />
  32. </resources>
  33. </route>
  34. <!-- Managing totals information -->
  35. <route url="/V1/carts/:cartId/totals-information" method="POST">
  36. <service class="Magento\Checkout\Api\TotalsInformationManagementInterface" method="calculate"/>
  37. <resources>
  38. <resource ref="Magento_Cart::manage" />
  39. </resources>
  40. </route>
  41. <!-- Managing guest totals information -->
  42. <route url="/V1/guest-carts/:cartId/totals-information" method="POST">
  43. <service class="Magento\Checkout\Api\GuestTotalsInformationManagementInterface" method="calculate"/>
  44. <resources>
  45. <resource ref="anonymous" />
  46. </resources>
  47. </route>
  48. <!-- Managing My totals information -->
  49. <route url="/V1/carts/mine/totals-information" method="POST">
  50. <service class="Magento\Checkout\Api\TotalsInformationManagementInterface" method="calculate"/>
  51. <resources>
  52. <resource ref="self" />
  53. </resources>
  54. <data>
  55. <parameter name="cartId" force="true">%cart_id%</parameter>
  56. </data>
  57. </route>
  58. <!-- Guest place order with payment information saving -->
  59. <route url="/V1/guest-carts/:cartId/payment-information" method="POST">
  60. <service class="Magento\Checkout\Api\GuestPaymentInformationManagementInterface" method="savePaymentInformationAndPlaceOrder"/>
  61. <resources>
  62. <resource ref="anonymous" />
  63. </resources>
  64. </route>
  65. <!-- Guest place order with payment information saving -->
  66. <route url="/V1/guest-carts/:cartId/payment-information" method="GET">
  67. <service class="Magento\Checkout\Api\GuestPaymentInformationManagementInterface" method="getPaymentInformation"/>
  68. <resources>
  69. <resource ref="anonymous" />
  70. </resources>
  71. </route>
  72. <!-- My place order with payment information saving -->
  73. <route url="/V1/carts/mine/payment-information" method="POST">
  74. <service class="Magento\Checkout\Api\PaymentInformationManagementInterface" method="savePaymentInformationAndPlaceOrder"/>
  75. <resources>
  76. <resource ref="self" />
  77. </resources>
  78. <data>
  79. <parameter name="cartId" force="true">%cart_id%</parameter>
  80. </data>
  81. </route>
  82. <!-- Get payment information -->
  83. <route url="/V1/carts/mine/payment-information" method="GET">
  84. <service class="Magento\Checkout\Api\PaymentInformationManagementInterface" method="getPaymentInformation"/>
  85. <resources>
  86. <resource ref="self" />
  87. </resources>
  88. <data>
  89. <parameter name="cartId" force="true">%cart_id%</parameter>
  90. </data>
  91. </route>
  92. <!-- Managing payment guest information -->
  93. <route url="/V1/guest-carts/:cartId/set-payment-information" method="POST">
  94. <service class="Magento\Checkout\Api\GuestPaymentInformationManagementInterface" method="savePaymentInformation"/>
  95. <resources>
  96. <resource ref="anonymous" />
  97. </resources>
  98. </route>
  99. <!-- Managing My payment information -->
  100. <route url="/V1/carts/mine/set-payment-information" method="POST">
  101. <service class="Magento\Checkout\Api\PaymentInformationManagementInterface" method="savePaymentInformation"/>
  102. <resources>
  103. <resource ref="self" />
  104. </resources>
  105. <data>
  106. <parameter name="cartId" force="true">%cart_id%</parameter>
  107. </data>
  108. </route>
  109. </routes>