webapi.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  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. <!-- Product Service -->
  11. <route url="/V1/products" method="POST">
  12. <service class="Magento\Catalog\Api\ProductRepositoryInterface" method="save"/>
  13. <resources>
  14. <resource ref="Magento_Catalog::products" />
  15. </resources>
  16. </route>
  17. <route url="/V1/products/:sku" method="PUT">
  18. <service class="Magento\Catalog\Api\ProductRepositoryInterface" method="save" />
  19. <resources>
  20. <resource ref="Magento_Catalog::products" />
  21. </resources>
  22. </route>
  23. <route url="/V1/products/:sku" method="DELETE">
  24. <service class="Magento\Catalog\Api\ProductRepositoryInterface" method="deleteById"/>
  25. <resources>
  26. <resource ref="Magento_Catalog::products" />
  27. </resources>
  28. </route>
  29. <route url="/V1/products" method="GET">
  30. <service class="Magento\Catalog\Api\ProductRepositoryInterface" method="getList"/>
  31. <resources>
  32. <resource ref="Magento_Catalog::products" />
  33. </resources>
  34. </route>
  35. <route url="/V1/products/:sku" method="GET">
  36. <service class="Magento\Catalog\Api\ProductRepositoryInterface" method="get"/>
  37. <resources>
  38. <resource ref="Magento_Catalog::products" />
  39. </resources>
  40. </route>
  41. <route url="/V1/products/attributes/types" method="GET">
  42. <service class="Magento\Catalog\Api\ProductAttributeTypesListInterface" method="getItems"/>
  43. <resources>
  44. <resource ref="Magento_Catalog::attributes_attributes" />
  45. </resources>
  46. </route>
  47. <route url="/V1/products/attributes/:attributeCode" method="GET">
  48. <service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="get"/>
  49. <resources>
  50. <resource ref="Magento_Catalog::attributes_attributes" />
  51. </resources>
  52. </route>
  53. <route url="/V1/products/attributes" method="GET">
  54. <service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="getList" />
  55. <resources>
  56. <resource ref="Magento_Catalog::attributes_attributes" />
  57. </resources>
  58. </route>
  59. <route url="/V1/categories/attributes/:attributeCode" method="GET">
  60. <service class="Magento\Catalog\Api\CategoryAttributeRepositoryInterface" method="get" />
  61. <resources>
  62. <resource ref="Magento_Catalog::attributes_attributes" />
  63. </resources>
  64. </route>
  65. <route url="/V1/categories/attributes" method="GET">
  66. <service class="Magento\Catalog\Api\CategoryAttributeRepositoryInterface" method="getList" />
  67. <resources>
  68. <resource ref="Magento_Catalog::attributes_attributes" />
  69. </resources>
  70. </route>
  71. <route url="/V1/categories/attributes/:attributeCode/options" method="GET">
  72. <service class="Magento\Catalog\Api\CategoryAttributeOptionManagementInterface" method="getItems" />
  73. <resources>
  74. <resource ref="Magento_Catalog::attributes_attributes" />
  75. </resources>
  76. </route>
  77. <route url="/V1/products/attributes" method="POST">
  78. <service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="save"/>
  79. <resources>
  80. <resource ref="Magento_Catalog::attributes_attributes" />
  81. </resources>
  82. </route>
  83. <route url="/V1/products/attributes/:attributeCode" method="PUT">
  84. <service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="save"/>
  85. <resources>
  86. <resource ref="Magento_Catalog::attributes_attributes" />
  87. </resources>
  88. </route>
  89. <route url="/V1/products/attributes/:attributeCode" method="DELETE">
  90. <service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="deleteById"/>
  91. <resources>
  92. <resource ref="Magento_Catalog::attributes_attributes" />
  93. </resources>
  94. </route>
  95. <route url="/V1/products/types" method="GET">
  96. <service class="Magento\Catalog\Api\ProductTypeListInterface" method="getProductTypes"/>
  97. <resources>
  98. <resource ref="Magento_Catalog::products"/>
  99. </resources>
  100. </route>
  101. <route url="/V1/products/attribute-sets/sets/list" method="GET">
  102. <service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="getList"/>
  103. <resources>
  104. <resource ref="Magento_Catalog::sets"/>
  105. </resources>
  106. </route>
  107. <route url="/V1/products/attribute-sets/:attributeSetId" method="GET">
  108. <service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="get"/>
  109. <resources>
  110. <resource ref="Magento_Catalog::sets"/>
  111. </resources>
  112. </route>
  113. <route url="/V1/products/attribute-sets/:attributeSetId" method="DELETE">
  114. <service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="deleteById"/>
  115. <resources>
  116. <resource ref="Magento_Catalog::sets"/>
  117. </resources>
  118. </route>
  119. <route url="/V1/products/attribute-sets" method="POST">
  120. <service class="Magento\Catalog\Api\AttributeSetManagementInterface" method="create"/>
  121. <resources>
  122. <resource ref="Magento_Catalog::sets"/>
  123. </resources>
  124. </route>
  125. <route url="/V1/products/attribute-sets/:attributeSetId" method="PUT">
  126. <service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="save"/>
  127. <resources>
  128. <resource ref="Magento_Catalog::sets"/>
  129. </resources>
  130. </route>
  131. <route url="/V1/products/attribute-sets/:attributeSetId/attributes" method="GET">
  132. <service class="Magento\Catalog\Api\ProductAttributeManagementInterface" method="getAttributes"/>
  133. <resources>
  134. <resource ref="Magento_Catalog::sets"/>
  135. </resources>
  136. </route>
  137. <route url="/V1/products/attribute-sets/attributes" method="POST">
  138. <service class="Magento\Catalog\Api\ProductAttributeManagementInterface" method="assign"/>
  139. <resources>
  140. <resource ref="Magento_Catalog::sets"/>
  141. </resources>
  142. </route>
  143. <route url="/V1/products/attribute-sets/:attributeSetId/attributes/:attributeCode" method="DELETE">
  144. <service class="Magento\Catalog\Api\ProductAttributeManagementInterface" method="unassign"/>
  145. <resources>
  146. <resource ref="Magento_Catalog::sets"/>
  147. </resources>
  148. </route>
  149. <route url="/V1/products/attribute-sets/groups/list" method="GET">
  150. <service class="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" method="getList"/>
  151. <resources>
  152. <resource ref="Magento_Catalog::sets"/>
  153. </resources>
  154. </route>
  155. <route url="/V1/products/attribute-sets/groups" method="POST">
  156. <service class="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" method="save"/>
  157. <resources>
  158. <resource ref="Magento_Catalog::sets"/>
  159. </resources>
  160. </route>
  161. <route url="/V1/products/attribute-sets/:attributeSetId/groups" method="PUT">
  162. <service class="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" method="save"/>
  163. <resources>
  164. <resource ref="Magento_Catalog::sets"/>
  165. </resources>
  166. </route>
  167. <route url="/V1/products/attribute-sets/groups/:groupId" method="DELETE">
  168. <service class="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" method="deleteById"/>
  169. <resources>
  170. <resource ref="Magento_Catalog::sets"/>
  171. </resources>
  172. </route>
  173. <route url="/V1/products/attributes/:attributeCode/options" method="GET">
  174. <service class="Magento\Catalog\Api\ProductAttributeOptionManagementInterface" method="getItems"/>
  175. <resources>
  176. <resource ref="Magento_Catalog::attributes_attributes" />
  177. </resources>
  178. </route>
  179. <route url="/V1/products/attributes/:attributeCode/options" method="POST">
  180. <service class="Magento\Catalog\Api\ProductAttributeOptionManagementInterface" method="add" />
  181. <resources>
  182. <resource ref="Magento_Catalog::attributes_attributes" />
  183. </resources>
  184. </route>
  185. <route url="/V1/products/attributes/:attributeCode/options/:optionId" method="DELETE">
  186. <service class="Magento\Catalog\Api\ProductAttributeOptionManagementInterface" method="delete" />
  187. <resources>
  188. <resource ref="Magento_Catalog::attributes_attributes" />
  189. </resources>
  190. </route>
  191. <route url="/V1/products/media/types/:attributeSetName" method="GET">
  192. <service class="Magento\Catalog\Api\ProductMediaAttributeManagementInterface" method="getList"/>
  193. <resources>
  194. <resource ref="Magento_Catalog::attributes_attributes"/>
  195. </resources>
  196. </route>
  197. <route url="/V1/products/:sku/media/:entryId" method="GET">
  198. <service class="Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface" method="get"/>
  199. <resources>
  200. <resource ref="Magento_Catalog::attributes_attributes"/>
  201. </resources>
  202. </route>
  203. <route url="/V1/products/:sku/media" method="POST">
  204. <service class="Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface" method="create"/>
  205. <resources>
  206. <resource ref="Magento_Catalog::catalog"/>
  207. </resources>
  208. </route>
  209. <route url="/V1/products/:sku/media/:entryId" method="PUT">
  210. <service class="Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface" method="update"/>
  211. <resources>
  212. <resource ref="Magento_Catalog::catalog"/>
  213. </resources>
  214. </route>
  215. <route url="/V1/products/:sku/media/:entryId" method="DELETE">
  216. <service class="Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface" method="remove"/>
  217. <resources>
  218. <resource ref="Magento_Catalog::catalog"/>
  219. </resources>
  220. </route>
  221. <route url="/V1/products/:sku/media" method="GET">
  222. <service class="Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface" method="getList"/>
  223. <resources>
  224. <resource ref="Magento_Catalog::catalog"/>
  225. </resources>
  226. </route>
  227. <!-- Tier Price -->
  228. <route url="/V1/products/:sku/group-prices/:customerGroupId/tiers" method="GET">
  229. <service class="Magento\Catalog\Api\ProductTierPriceManagementInterface" method="getList"/>
  230. <resources>
  231. <resource ref="Magento_Catalog::catalog"/>
  232. </resources>
  233. </route>
  234. <route url="/V1/products/:sku/group-prices/:customerGroupId/tiers/:qty/price/:price" method="POST">
  235. <service class="Magento\Catalog\Api\ProductTierPriceManagementInterface" method="add"/>
  236. <resources>
  237. <resource ref="Magento_Catalog::catalog"/>
  238. </resources>
  239. </route>
  240. <route url="/V1/products/:sku/group-prices/:customerGroupId/tiers/:qty" method="DELETE">
  241. <service class="Magento\Catalog\Api\ProductTierPriceManagementInterface" method="remove"/>
  242. <resources>
  243. <resource ref="Magento_Catalog::catalog"/>
  244. </resources>
  245. </route>
  246. <route url="/V1/products/tier-prices-information" method="POST">
  247. <service class="Magento\Catalog\Api\TierPriceStorageInterface" method="get"/>
  248. <resources>
  249. <resource ref="Magento_Catalog::catalog"/>
  250. </resources>
  251. </route>
  252. <route url="/V1/products/tier-prices" method="POST">
  253. <service class="Magento\Catalog\Api\TierPriceStorageInterface" method="update"/>
  254. <resources>
  255. <resource ref="Magento_Catalog::catalog"/>
  256. </resources>
  257. </route>
  258. <route url="/V1/products/tier-prices" method="PUT">
  259. <service class="Magento\Catalog\Api\TierPriceStorageInterface" method="replace"/>
  260. <resources>
  261. <resource ref="Magento_Catalog::catalog"/>
  262. </resources>
  263. </route>
  264. <route url="/V1/products/tier-prices-delete" method="POST">
  265. <service class="Magento\Catalog\Api\TierPriceStorageInterface" method="delete"/>
  266. <resources>
  267. <resource ref="Magento_Catalog::catalog"/>
  268. </resources>
  269. </route>
  270. <route url="/V1/products/base-prices-information" method="POST">
  271. <service class="Magento\Catalog\Api\BasePriceStorageInterface" method="get"/>
  272. <resources>
  273. <resource ref="Magento_Catalog::catalog"/>
  274. </resources>
  275. </route>
  276. <route url="/V1/products/base-prices" method="POST">
  277. <service class="Magento\Catalog\Api\BasePriceStorageInterface" method="update"/>
  278. <resources>
  279. <resource ref="Magento_Catalog::catalog"/>
  280. </resources>
  281. </route>
  282. <route url="/V1/products/cost-information" method="POST">
  283. <service class="Magento\Catalog\Api\CostStorageInterface" method="get"/>
  284. <resources>
  285. <resource ref="Magento_Catalog::catalog"/>
  286. </resources>
  287. </route>
  288. <route url="/V1/products/cost" method="POST">
  289. <service class="Magento\Catalog\Api\CostStorageInterface" method="update"/>
  290. <resources>
  291. <resource ref="Magento_Catalog::catalog"/>
  292. </resources>
  293. </route>
  294. <route url="/V1/products/cost-delete" method="POST">
  295. <service class="Magento\Catalog\Api\CostStorageInterface" method="delete"/>
  296. <resources>
  297. <resource ref="Magento_Catalog::catalog"/>
  298. </resources>
  299. </route>
  300. <route url="/V1/products/special-price-information" method="POST">
  301. <service class="Magento\Catalog\Api\SpecialPriceStorageInterface" method="get"/>
  302. <resources>
  303. <resource ref="Magento_Catalog::catalog"/>
  304. </resources>
  305. </route>
  306. <route url="/V1/products/special-price" method="POST">
  307. <service class="Magento\Catalog\Api\SpecialPriceStorageInterface" method="update"/>
  308. <resources>
  309. <resource ref="Magento_Catalog::catalog"/>
  310. </resources>
  311. </route>
  312. <route url="/V1/products/special-price-delete" method="POST">
  313. <service class="Magento\Catalog\Api\SpecialPriceStorageInterface" method="delete"/>
  314. <resources>
  315. <resource ref="Magento_Catalog::catalog"/>
  316. </resources>
  317. </route>
  318. <route url="/V1/categories/:categoryId" method="DELETE">
  319. <service class="Magento\Catalog\Api\CategoryRepositoryInterface" method="deleteByIdentifier" />
  320. <resources>
  321. <resource ref="Magento_Catalog::categories" />
  322. </resources>
  323. </route>
  324. <route url="/V1/categories/:categoryId" method="GET">
  325. <service class="Magento\Catalog\Api\CategoryRepositoryInterface" method="get" />
  326. <resources>
  327. <resource ref="Magento_Catalog::categories" />
  328. </resources>
  329. </route>
  330. <route url="/V1/categories" method="POST">
  331. <service class="Magento\Catalog\Api\CategoryRepositoryInterface" method="save" />
  332. <resources>
  333. <resource ref="Magento_Catalog::categories" />
  334. </resources>
  335. </route>
  336. <route url="/V1/categories" method="GET">
  337. <service class="Magento\Catalog\Api\CategoryManagementInterface" method="getTree" />
  338. <resources>
  339. <resource ref="Magento_Catalog::categories" />
  340. </resources>
  341. </route>
  342. <route url="/V1/categories/:id" method="PUT">
  343. <service class="Magento\Catalog\Api\CategoryRepositoryInterface" method="save" />
  344. <resources>
  345. <resource ref="Magento_Catalog::categories" />
  346. </resources>
  347. </route>
  348. <route url="/V1/categories/:categoryId/move" method="PUT">
  349. <service class="Magento\Catalog\Api\CategoryManagementInterface" method="move" />
  350. <resources>
  351. <resource ref="Magento_Catalog::categories" />
  352. </resources>
  353. </route>
  354. <route url="/V1/categories/list" method="GET">
  355. <service class="Magento\Catalog\Api\CategoryListInterface" method="getList" />
  356. <resources>
  357. <resource ref="Magento_Catalog::categories" />
  358. </resources>
  359. </route>
  360. <!-- Product Custom Options -->
  361. <route url="/V1/products/options/types" method="GET">
  362. <service class="Magento\Catalog\Api\ProductCustomOptionTypeListInterface" method="getItems"/>
  363. <resources>
  364. <resource ref="Magento_Catalog::catalog"/>
  365. </resources>
  366. </route>
  367. <route url="/V1/products/:sku/options" method="GET">
  368. <service class="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" method="getList"/>
  369. <resources>
  370. <resource ref="Magento_Catalog::catalog"/>
  371. </resources>
  372. </route>
  373. <route url="/V1/products/:sku/options/:optionId" method="GET">
  374. <service class="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" method="get"/>
  375. <resources>
  376. <resource ref="Magento_Catalog::catalog"/>
  377. </resources>
  378. </route>
  379. <route url="/V1/products/options" method="POST">
  380. <service class="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" method="save"/>
  381. <resources>
  382. <resource ref="Magento_Catalog::catalog"/>
  383. </resources>
  384. </route>
  385. <route url="/V1/products/options/:optionId" method="PUT">
  386. <service class="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" method="save"/>
  387. <resources>
  388. <resource ref="Magento_Catalog::catalog"/>
  389. </resources>
  390. </route>
  391. <route url="/V1/products/:sku/options/:optionId" method="DELETE">
  392. <service class="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" method="deleteByIdentifier"/>
  393. <resources>
  394. <resource ref="Magento_Catalog::catalog"/>
  395. </resources>
  396. </route>
  397. <!-- Product Links -->
  398. <route url="/V1/products/links/types" method="GET">
  399. <service class="Magento\Catalog\Api\ProductLinkTypeListInterface" method="getItems"/>
  400. <resources>
  401. <resource ref="Magento_Catalog::catalog"/>
  402. </resources>
  403. </route>
  404. <route url="/V1/products/links/:type/attributes" method="GET">
  405. <service class="Magento\Catalog\Api\ProductLinkTypeListInterface" method="getItemAttributes"/>
  406. <resources>
  407. <resource ref="Magento_Catalog::catalog"/>
  408. </resources>
  409. </route>
  410. <route url="/V1/products/:sku/links/:type" method="GET">
  411. <service class="Magento\Catalog\Api\ProductLinkManagementInterface" method="getLinkedItemsByType"/>
  412. <resources>
  413. <resource ref="Magento_Catalog::catalog"/>
  414. </resources>
  415. </route>
  416. <route url="/V1/products/:sku/links" method="POST">
  417. <service class="Magento\Catalog\Api\ProductLinkManagementInterface" method="setProductLinks"/>
  418. <resources>
  419. <resource ref="Magento_Catalog::catalog"/>
  420. </resources>
  421. </route>
  422. <route url="/V1/products/:sku/links/:type/:linkedProductSku" method="DELETE">
  423. <service class="Magento\Catalog\Api\ProductLinkRepositoryInterface" method="deleteById"/>
  424. <resources>
  425. <resource ref="Magento_Catalog::catalog"/>
  426. </resources>
  427. </route>
  428. <route url="/V1/products/:sku/links" method="PUT">
  429. <service class="Magento\Catalog\Api\ProductLinkRepositoryInterface" method="save"/>
  430. <resources>
  431. <resource ref="Magento_Catalog::catalog"/>
  432. </resources>
  433. </route>
  434. <!-- Category Product Links -->
  435. <route url="/V1/categories/:categoryId/products" method="GET">
  436. <service class="Magento\Catalog\Api\CategoryLinkManagementInterface" method="getAssignedProducts" />
  437. <resources>
  438. <resource ref="Magento_Catalog::categories" />
  439. </resources>
  440. </route>
  441. <route url="/V1/categories/:categoryId/products" method="POST">
  442. <service class="Magento\Catalog\Api\CategoryLinkRepositoryInterface" method="save" />
  443. <resources>
  444. <resource ref="Magento_Catalog::categories" />
  445. </resources>
  446. </route>
  447. <route url="/V1/categories/:categoryId/products" method="PUT">
  448. <service class="Magento\Catalog\Api\CategoryLinkRepositoryInterface" method="save" />
  449. <resources>
  450. <resource ref="Magento_Catalog::categories" />
  451. </resources>
  452. </route>
  453. <route url="/V1/categories/:categoryId/products/:sku" method="DELETE">
  454. <service class="Magento\Catalog\Api\CategoryLinkRepositoryInterface" method="deleteByIds" />
  455. <resources>
  456. <resource ref="Magento_Catalog::categories" />
  457. </resources>
  458. </route>
  459. <!-- Product Website Links -->
  460. <route url="/V1/products/:sku/websites" method="POST">
  461. <service class="Magento\Catalog\Api\ProductWebsiteLinkRepositoryInterface" method="save" />
  462. <resources>
  463. <resource ref="Magento_Catalog::products" />
  464. </resources>
  465. </route>
  466. <route url="/V1/products/:sku/websites" method="PUT">
  467. <service class="Magento\Catalog\Api\ProductWebsiteLinkRepositoryInterface" method="save" />
  468. <resources>
  469. <resource ref="Magento_Catalog::products" />
  470. </resources>
  471. </route>
  472. <route url="/V1/products/:sku/websites/:websiteId" method="DELETE">
  473. <service class="Magento\Catalog\Api\ProductWebsiteLinkRepositoryInterface" method="deleteById" />
  474. <resources>
  475. <resource ref="Magento_Catalog::products" />
  476. </resources>
  477. </route>
  478. <route url="/V1/products-render-info" method="GET">
  479. <service class="Magento\Catalog\Api\ProductRenderListInterface" method="getList"/>
  480. <resources>
  481. <resource ref="anonymous" />
  482. </resources>
  483. </route>
  484. </routes>