You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/vaahstore-api/carts/addToWishlist.yaml
+31-25Lines changed: 31 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
post:
2
2
tags:
3
3
- Carts
4
-
summary: Add an item to the wishlist
5
-
description: Adds a specified product from the cart to the user's wishlist. If the item is already wishlisted, it will not be added again.
4
+
- Products
5
+
summary: Add or Delete item from the wishlist
6
+
description: Adds or removes a specified product to/from a user's wishlist. By default, the product is saved to the "Save For Later" wishlist. If the product is already in the wishlist, it will not be added again. If the operation is "delete", the specified product will be removed from the wishlist.
6
7
operationId: addToWishlist
7
8
requestBody:
8
9
required: true
@@ -14,13 +15,9 @@ post:
14
15
item_detail:
15
16
type: object
16
17
description: |
17
-
Contains details about the product in the cart that will be added to or removed from the wishlist.
18
-
Includes information such as the cart ID, product ID, product variation ID, quantity, vendor ID, and wishlist status.
18
+
Contains details about the product in the cart that will be added to or delete from the wishlist.
19
+
Includes information such as the product ID, product variation ID, vendor ID, and wishlist ID.
19
20
properties:
20
-
vh_st_cart_id:
21
-
type: integer
22
-
example: 3
23
-
description: The ID of the cart containing the product.
24
21
vh_st_product_id:
25
22
type: integer
26
23
example: 1
@@ -29,44 +26,50 @@ post:
29
26
type: integer
30
27
example: 2
31
28
description: The ID of the product variation.
32
-
quantity:
33
-
type: integer
34
-
example: 1
35
-
description: The quantity of the product.
36
29
vh_st_vendor_id:
37
30
type: integer
38
31
example: 1
39
32
description: The ID of the vendor for the product.
40
-
is_wishlisted:
41
-
type: integer
42
-
example: 0
43
-
description: Indicates if the product is already in the wishlist.Set to 1 for adding the product to the wishlist, and 0 if you want to remove the product from the wishlist.
33
+
vh_st_wishlist_id:
34
+
type: integer
35
+
example: 1
36
+
description: The ID of the wishlist of a user to add the product to.
37
+
44
38
required:
45
39
- vh_st_cart_id
46
40
- vh_st_product_id
47
41
- vh_st_product_variation_id
48
-
- quantity
42
+
49
43
- vh_st_vendor_id
50
-
- is_wishlisted
44
+
45
+
selected_store_id:
46
+
type: integer
47
+
example: 51
48
+
description: The ID of the selected store to which the product belongs.
49
+
50
+
type:
51
+
type: string
52
+
example: add/delete
53
+
description: The type of action to perform (e.g., "add" to add the item to the wishlist, "delete" to remove it).
54
+
51
55
user_detail:
52
56
type: object
53
57
properties:
54
58
id:
55
59
type: integer
56
60
example: 121
57
61
description: The ID of the user.
58
-
username:
59
-
type: string
60
-
example: "58a55727-2084-448c-89bd-c3146f8d52f8"
61
-
description: The username of the user, it is for the purpose making new wishlist also.
0 commit comments