Share via Link
Share list via link that can be shared.
swat.generateSharedListURL
The generateSharedListURL API creates a unique link to your "My Wishlist" page. Once generated, this link can be shared with others. When someone with access to this link clicks on it, they are directed back to the store and shown the sharer's wishlist.
Definition
swat.generateSharedListURL(lid, onSuccess, onError)
Example
let lid = "a5decd55-5bfe-4cd4-9991-ed5721ae2914";
let onSuccess = (link, lid) => {
console.log("Successfully Generated Link ", link, lid);
}
let onError = (error) => {
// Error is an xhrObject
console.log("Error while generating the link", error)
}
swat.generateSharedListURL(lid, onSuccess, onError);
When someone clicks on the link, it will take them directly to your wishlist, allowing them to see the items you have added and possibly purchase them for you as a gift.
This API is only supported for Logged in Users.
To generate a unique url, the user must have a valid source email address, which is picked up implicitly by the API. If this API is used outside of the login mechanism for a guest user. It will throw an error.
API Parameters
Argument | Type | Description |
---|---|---|
lid | guid | Unique id of the List to be shared. |
onSuccess | function | Called if the URL is generated successfully. |
onError | function | Called if the URL generation fails. Error message is passed as argument. |
If you would like to have a custom share wishlist page - kindly contact [email protected]. There may be some customization involved to get this working.
Response
A Sample link generated using this API.
Updated 20 days ago