/
webapi.xml
117 lines (109 loc) · 4.71 KB
/
webapi.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0"?>
<!--
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
<!-- Managing shipping guest information -->
<route url="/V1/guest-carts/:cartId/shipping-information" method="POST">
<service class="Magento\Checkout\Api\GuestShippingInformationManagementInterface" method="saveAddressInformation"/>
<resources>
<resource ref="anonymous" />
</resources>
</route>
<!-- Managing My shipping information -->
<route url="/V1/carts/mine/shipping-information" method="POST">
<service class="Magento\Checkout\Api\ShippingInformationManagementInterface" method="saveAddressInformation"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="cartId" force="true">%cart_id%</parameter>
</data>
</route>
<!-- Managing shipping information-->
<route url="/V1/carts/:cartId/shipping-information" method="POST">
<service class="Magento\Checkout\Api\ShippingInformationManagementInterface" method="saveAddressInformation"/>
<resources>
<resource ref="Magento_Cart::manage" />
</resources>
</route>
<!-- Managing totals information -->
<route url="/V1/carts/:cartId/totals-information" method="POST">
<service class="Magento\Checkout\Api\TotalsInformationManagementInterface" method="calculate"/>
<resources>
<resource ref="Magento_Cart::manage" />
</resources>
</route>
<!-- Managing guest totals information -->
<route url="/V1/guest-carts/:cartId/totals-information" method="POST">
<service class="Magento\Checkout\Api\GuestTotalsInformationManagementInterface" method="calculate"/>
<resources>
<resource ref="anonymous" />
</resources>
</route>
<!-- Managing My totals information -->
<route url="/V1/carts/mine/totals-information" method="POST">
<service class="Magento\Checkout\Api\TotalsInformationManagementInterface" method="calculate"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="cartId" force="true">%cart_id%</parameter>
</data>
</route>
<!-- Guest place order with payment information saving -->
<route url="/V1/guest-carts/:cartId/payment-information" method="POST">
<service class="Magento\Checkout\Api\GuestPaymentInformationManagementInterface" method="savePaymentInformationAndPlaceOrder"/>
<resources>
<resource ref="anonymous" />
</resources>
</route>
<!-- Guest place order with payment information saving -->
<route url="/V1/guest-carts/:cartId/payment-information" method="GET">
<service class="Magento\Checkout\Api\GuestPaymentInformationManagementInterface" method="getPaymentInformation"/>
<resources>
<resource ref="anonymous" />
</resources>
</route>
<!-- My place order with payment information saving -->
<route url="/V1/carts/mine/payment-information" method="POST">
<service class="Magento\Checkout\Api\PaymentInformationManagementInterface" method="savePaymentInformationAndPlaceOrder"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="cartId" force="true">%cart_id%</parameter>
</data>
</route>
<!-- Get payment information -->
<route url="/V1/carts/mine/payment-information" method="GET">
<service class="Magento\Checkout\Api\PaymentInformationManagementInterface" method="getPaymentInformation"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="cartId" force="true">%cart_id%</parameter>
</data>
</route>
<!-- Managing payment guest information -->
<route url="/V1/guest-carts/:cartId/set-payment-information" method="POST">
<service class="Magento\Checkout\Api\GuestPaymentInformationManagementInterface" method="savePaymentInformation"/>
<resources>
<resource ref="anonymous" />
</resources>
</route>
<!-- Managing My shipping information -->
<route url="/V1/carts/mine/set-payment-information" method="POST">
<service class="Magento\Checkout\Api\PaymentInformationManagementInterface" method="savePaymentInformation"/>
<resources>
<resource ref="self" />
</resources>
<data>
<parameter name="cartId" force="true">%cart_id%</parameter>
</data>
</route>
</routes>