You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

287 line
12 KiB

  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. <!-- Customer Group -->
  11. <route url="/V1/customerGroups/:id" method="GET">
  12. <service class="Magento\Customer\Api\GroupRepositoryInterface" method="getById"/>
  13. <resources>
  14. <resource ref="Magento_Customer::group"/>
  15. </resources>
  16. </route>
  17. <route url="/V1/customerGroups/default/:storeId" method="GET">
  18. <service class="Magento\Customer\Api\GroupManagementInterface" method="getDefaultGroup"/>
  19. <resources>
  20. <resource ref="Magento_Customer::group"/>
  21. </resources>
  22. </route>
  23. <route url="/V1/customerGroups/default" method="GET">
  24. <service class="Magento\Customer\Api\GroupManagementInterface" method="getDefaultGroup"/>
  25. <resources>
  26. <resource ref="Magento_Customer::group"/>
  27. </resources>
  28. </route>
  29. <route url="/V1/customerGroups/default/:id" method="PUT">
  30. <service class="Magento\Customer\Api\CustomerGroupConfigInterface" method="setDefaultCustomerGroup"/>
  31. <resources>
  32. <resource ref="Magento_Customer::group"/>
  33. </resources>
  34. </route>
  35. <route url="/V1/customerGroups/:id/permissions" method="GET">
  36. <service class="Magento\Customer\Api\GroupManagementInterface" method="isReadonly"/>
  37. <resources>
  38. <resource ref="Magento_Customer::group"/>
  39. </resources>
  40. </route>
  41. <route url="/V1/customerGroups/search" method="GET">
  42. <service class="Magento\Customer\Api\GroupRepositoryInterface" method="getList"/>
  43. <resources>
  44. <resource ref="Magento_Customer::group"/>
  45. </resources>
  46. </route>
  47. <route url="/V1/customerGroups" method="POST">
  48. <service class="Magento\Customer\Api\GroupRepositoryInterface" method="save"/>
  49. <resources>
  50. <resource ref="Magento_Customer::group"/>
  51. </resources>
  52. </route>
  53. <route url="/V1/customerGroups/:id" method="PUT">
  54. <service class="Magento\Customer\Api\GroupRepositoryInterface" method="save"/>
  55. <resources>
  56. <resource ref="Magento_Customer::group"/>
  57. </resources>
  58. </route>
  59. <route url="/V1/customerGroups/:id" method="DELETE">
  60. <service class="Magento\Customer\Api\GroupRepositoryInterface" method="deleteById"/>
  61. <resources>
  62. <resource ref="Magento_Customer::group"/>
  63. </resources>
  64. </route>
  65. <!-- Customer Metadata -->
  66. <route url="/V1/attributeMetadata/customer/attribute/:attributeCode" method="GET">
  67. <service class="Magento\Customer\Api\CustomerMetadataInterface" method="getAttributeMetadata"/>
  68. <resources>
  69. <resource ref="Magento_Customer::customer"/>
  70. </resources>
  71. </route>
  72. <route url="/V1/attributeMetadata/customer/form/:formCode" method="GET">
  73. <service class="Magento\Customer\Api\CustomerMetadataInterface" method="getAttributes"/>
  74. <resources>
  75. <resource ref="Magento_Customer::customer"/>
  76. </resources>
  77. </route>
  78. <route url="/V1/attributeMetadata/customer" method="GET">
  79. <service class="Magento\Customer\Api\CustomerMetadataInterface" method="getAllAttributesMetadata"/>
  80. <resources>
  81. <resource ref="Magento_Customer::customer"/>
  82. </resources>
  83. </route>
  84. <route url="/V1/attributeMetadata/customer/custom" method="GET">
  85. <service class="Magento\Customer\Api\CustomerMetadataInterface" method="getCustomAttributesMetadata"/>
  86. <resources>
  87. <resource ref="Magento_Customer::customer"/>
  88. </resources>
  89. </route>
  90. <!-- Customer Address Metadata -->
  91. <route url="/V1/attributeMetadata/customerAddress/attribute/:attributeCode" method="GET">
  92. <service class="Magento\Customer\Api\AddressMetadataInterface" method="getAttributeMetadata"/>
  93. <resources>
  94. <resource ref="Magento_Customer::customer"/>
  95. </resources>
  96. </route>
  97. <route url="/V1/attributeMetadata/customerAddress/form/:formCode" method="GET">
  98. <service class="Magento\Customer\Api\AddressMetadataInterface" method="getAttributes"/>
  99. <resources>
  100. <resource ref="Magento_Customer::customer"/>
  101. </resources>
  102. </route>
  103. <route url="/V1/attributeMetadata/customerAddress" method="GET">
  104. <service class="Magento\Customer\Api\AddressMetadataInterface" method="getAllAttributesMetadata"/>
  105. <resources>
  106. <resource ref="Magento_Customer::customer"/>
  107. </resources>
  108. </route>
  109. <route url="/V1/attributeMetadata/customerAddress/custom" method="GET">
  110. <service class="Magento\Customer\Api\AddressMetadataInterface" method="getCustomAttributesMetadata"/>
  111. <resources>
  112. <resource ref="Magento_Customer::customer"/>
  113. </resources>
  114. </route>
  115. <!-- Customer Account -->
  116. <route url="/V1/customers/:customerId" method="GET">
  117. <service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getById"/>
  118. <resources>
  119. <resource ref="Magento_Customer::customer"/>
  120. </resources>
  121. </route>
  122. <route url="/V1/customers" method="POST">
  123. <service class="Magento\Customer\Api\AccountManagementInterface" method="createAccount"/>
  124. <resources>
  125. <resource ref="anonymous"/>
  126. </resources>
  127. </route>
  128. <route url="/V1/customers/:customerId" method="PUT">
  129. <service class="Magento\Customer\Api\CustomerRepositoryInterface" method="save"/>
  130. <resources>
  131. <resource ref="Magento_Customer::manage"/>
  132. </resources>
  133. </route>
  134. <route url="/V1/customers/me" method="PUT" soapOperation="saveSelf">
  135. <service class="Magento\Customer\Api\CustomerRepositoryInterface" method="save"/>
  136. <resources>
  137. <resource ref="self"/>
  138. </resources>
  139. <data>
  140. <parameter name="customer.id" force="true">%customer_id%</parameter>
  141. <parameter name="customer.group_id" force="true">%customer_group_id%</parameter>
  142. <parameter name="customer.website_id" force="true">%customer_website_id%</parameter>
  143. <parameter name="customer.store_id" force="true">%customer_store_id%</parameter>
  144. </data>
  145. </route>
  146. <route url="/V1/customers/me" method="GET" soapOperation="getSelf">
  147. <service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getById"/>
  148. <resources>
  149. <resource ref="self"/>
  150. </resources>
  151. <data>
  152. <parameter name="customerId" force="true">%customer_id%</parameter>
  153. </data>
  154. </route>
  155. <route url="/V1/customers/me/activate" method="PUT">
  156. <service class="Magento\Customer\Api\AccountManagementInterface" method="activateById"/>
  157. <resources>
  158. <resource ref="self"/>
  159. </resources>
  160. <data>
  161. <parameter name="customerId" force="true">%customer_id%</parameter>
  162. </data>
  163. </route>
  164. <route url="/V1/customers/search" method="GET">
  165. <service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getList"/>
  166. <resources>
  167. <resource ref="Magento_Customer::customer"/>
  168. </resources>
  169. </route>
  170. <route url="/V1/customers/:email/activate" method="PUT">
  171. <service class="Magento\Customer\Api\AccountManagementInterface" method="activate"/>
  172. <resources>
  173. <resource ref="Magento_Customer::manage"/>
  174. </resources>
  175. </route>
  176. <route url="/V1/customers/me/password" method="PUT">
  177. <service class="Magento\Customer\Api\AccountManagementInterface" method="changePasswordById"/>
  178. <resources>
  179. <resource ref="self"/>
  180. </resources>
  181. <data>
  182. <parameter name="customerId" force="true">%customer_id%</parameter>
  183. </data>
  184. </route>
  185. <route url="/V1/customers/:customerId/password/resetLinkToken/:resetPasswordLinkToken" method="GET">
  186. <service class="Magento\Customer\Api\AccountManagementInterface" method="validateResetPasswordLinkToken"/>
  187. <resources>
  188. <resource ref="anonymous"/>
  189. </resources>
  190. </route>
  191. <route url="/V1/customers/password" method="PUT">
  192. <service class="Magento\Customer\Api\AccountManagementInterface" method="initiatePasswordReset"/>
  193. <resources>
  194. <resource ref="anonymous"/>
  195. </resources>
  196. </route>
  197. <route url="/V1/customers/resetPassword" method="POST">
  198. <service class="Magento\Customer\Api\AccountManagementInterface" method="resetPassword"/>
  199. <resources>
  200. <resource ref="anonymous"/>
  201. </resources>
  202. </route>
  203. <route url="/V1/customers/:customerId/confirm" method="GET">
  204. <service class="Magento\Customer\Api\AccountManagementInterface" method="getConfirmationStatus"/>
  205. <resources>
  206. <resource ref="Magento_Customer::manage"/>
  207. </resources>
  208. </route>
  209. <route url="/V1/customers/confirm" method="POST">
  210. <service class="Magento\Customer\Api\AccountManagementInterface" method="resendConfirmation"/>
  211. <resources>
  212. <resource ref="Magento_Customer::manage"/>
  213. </resources>
  214. </route>
  215. <route url="/V1/customers/validate" method="PUT">
  216. <service class="Magento\Customer\Api\AccountManagementInterface" method="validate"/>
  217. <resources>
  218. <resource ref="Magento_Customer::manage"/>
  219. </resources>
  220. </route>
  221. <route url="/V1/customers/:customerId/permissions/readonly" method="GET">
  222. <service class="Magento\Customer\Api\AccountManagementInterface" method="isReadonly"/>
  223. <resources>
  224. <resource ref="Magento_Customer::customer"/>
  225. </resources>
  226. </route>
  227. <route url="/V1/customers/:customerId" method="DELETE">
  228. <service class="Magento\Customer\Api\CustomerRepositoryInterface" method="deleteById"/>
  229. <resources>
  230. <resource ref="Magento_Customer::delete"/>
  231. </resources>
  232. </route>
  233. <route url="/V1/customers/isEmailAvailable" method="POST">
  234. <service class="Magento\Customer\Api\AccountManagementInterface" method="isEmailAvailable"/>
  235. <resources>
  236. <resource ref="anonymous"/>
  237. </resources>
  238. </route>
  239. <!-- Customer Addresses -->
  240. <route url="/V1/customers/addresses/:addressId" method="GET">
  241. <service class="Magento\Customer\Api\AddressRepositoryInterface" method="getById"/>
  242. <resources>
  243. <resource ref="Magento_Customer::manage"/>
  244. </resources>
  245. </route>
  246. <route url="/V1/customers/me/billingAddress" method="GET" soapOperation="getMyDefaultBillingAddress">
  247. <service class="Magento\Customer\Api\AccountManagementInterface" method="getDefaultBillingAddress"/>
  248. <resources>
  249. <resource ref="self"/>
  250. </resources>
  251. <data>
  252. <parameter name="customerId" force="true">%customer_id%</parameter>
  253. </data>
  254. </route>
  255. <route url="/V1/customers/:customerId/billingAddress" method="GET">
  256. <service class="Magento\Customer\Api\AccountManagementInterface" method="getDefaultBillingAddress"/>
  257. <resources>
  258. <resource ref="Magento_Customer::manage"/>
  259. </resources>
  260. </route>
  261. <route url="/V1/customers/me/shippingAddress" method="GET" soapOperation="getMyDefaultShippingAddress">
  262. <service class="Magento\Customer\Api\AccountManagementInterface" method="getDefaultShippingAddress"/>
  263. <resources>
  264. <resource ref="self"/>
  265. </resources>
  266. <data>
  267. <parameter name="customerId" force="true">%customer_id%</parameter>
  268. </data>
  269. </route>
  270. <route url="/V1/customers/:customerId/shippingAddress" method="GET">
  271. <service class="Magento\Customer\Api\AccountManagementInterface" method="getDefaultShippingAddress"/>
  272. <resources>
  273. <resource ref="Magento_Customer::manage"/>
  274. </resources>
  275. </route>
  276. <route url="/V1/addresses/:addressId" method="DELETE">
  277. <service class="Magento\Customer\Api\AddressRepositoryInterface" method="deleteById"/>
  278. <resources>
  279. <resource ref="Magento_Customer::manage"/>
  280. </resources>
  281. </route>
  282. </routes>