-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTEST
151 lines (129 loc) · 2.92 KB
/
TEST
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
http://localhost:8080/thewalking/API/products/all
http://localhost:8080/thewalking/API/products/categories
//post
http://localhost:8080/thewalking/API/products/create
{
"id":1,
"name": "Very nice lady's shoe",
"category":{"id":1}
}
{
"id":2,
"name": "awesome girl's shoe",
"category":{"id":2}
}
http://localhost:8080/thewalking/API/products/delete/0
http://localhost:8080/thewalking/API/products/update
{
"id": 1,
"name": "prod1",
"category_id": 2
}
///////category get
http://localhost:8080/thewalking/API/categories/all
//category post
{
"id": 1,
"name": "Lady's shoes"
}
{
"id": 2,
"name": "Girl's shoes"
}
{
"id": 3,
"name": "Accessories"
}
//category put
http://localhost:8080/thewalking/API/categories/update
{
"id": 3,
"name": "Accessories"
}
http://localhost:8080/thewalking/API/categories/delete
//products
http://localhost:8080/thewalking/API/products/create
{
"name": "Running shoe",
"category":{"id":1}
}
{
"name": "Necklace",
"category":{"id":2}
}
//put
http://localhost:8080/thewalking/API/products/update
{
"id":1,
"name": "Very nice lady's shoe",
"category":{"id":1}
}
{
"id":2,
"name": "Awesome girl's shoe",
"category":{"id":2}
}
{
"id":3,
"name": "very good necklace",
"category":{"id":3}
}
{
"id":4,
"name": "deletedfdf",
"category":{"id":3}
}
//delete product
http://localhost:8080/thewalking/API/products/delete/4
//prod details
http://localhost:8080/thewalking/API/products/prod_details/1
{
"id":1,
"name": "Very nice lady's shoe",
"category":{"id":1}
}
//findbycategory
http://localhost:8080/thewalking/API/products/findByCategoryId/1
//cart
http://localhost:8080/thewalking/API/cart/submitOrder
{
"orderItems": [
{
"product": {
"id":1,
"name": "Very nice lady's shoe",
"category":{"id":1}
},
"quantity": 2
},
{
"product": {
"id":2,
"name": "awesome girl's shoe",
"category":{"id":2}
},
"quantity": 3
}
]
,
"payment":
{
"paymentAddress":"address",
"paymentName":"Daniel",
"paymentZipcode":"12345",
"cardno":"123445678901234"
},
"shippingAddress": "address",
"shippingZipcode": "12345",
"shippingName": "Daniel"
}
//delete order
http://localhost:8080/thewalking/API/orders/delete
//cancel order
put
http://localhost:8080/thewalking/API/orders/cancelOrder/49
//set order as delivered
http://localhost:8080/thewalking/API/orders/setOrderDelivered/49
//feedback
post
http://localhost:8080/thewalking/API/orders/feedback