XM
Members
Add Item to Wishlist
This documentation is now outdated, please find the latest docs for this endpoint here
Path:
1
POST https://{baseurl}/api-cart/wishlist/user
Copied!
Through this API, your customers can easily add a desired item to their Wishlist, for a future purchase. Wishlist helps saves time from searching all the product again, when they are ready to buy.
The item ID can be specified in the request body, and the API returns a userId and the newly added item ID. For an existing Wishlist, along with the userId, all the items in the Wishlist are returned in the response.

Headers

Content-Type : application/json
Authorization: The JWT Authorization toke from the Login API.
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox"

Parameters

Type: Body
Name: The ID of the item to be added to the Wishlist.
Required: true
Path:
1
https://{baseURL}/api-cart/wishlist/user
Copied!
Request Body:
1
{
2
"itemId": "1000000013"
3
}
Copied!

Response

Response Code: 200
Message: OK
Description: You will see this message when an item is successfully added to the Wishlist.
1
{
2
"userId": "5f988dadc3346713da73c1e5",
3
"items": [
4
1000000014,
5
1000000013
6
]
7
}
Copied!
Response Code: 400
Message: Bad Request
Description: You will see this error when the requested item is already in the Wishlist.
1
{
2
"code": "ITEM_ALREADY_EXISTS",
3
"message": "Item already in wishlist."
4
}
Copied!
Error Code: 403
Message: Forbidden
Description: You will see this error when the user is not authorized to add items to Wishlist.
1
{
2
"code": "UNAUTHORIZED_USER",
3
"message": "Unauthorized User"
4
}
Copied!
Error Code: 500
Message: Internal Server Error
Description: You will see this error when the account number is incorrect in the x-site-context (for a multi-tenent client).

Change Log

  • June - 2021
  • July - 2020 First updated
Last modified 1mo ago
Copy link
Contents
Change Log