API ReferenceGuides
Log In
API Reference

Share via link

Generate a unique shareable link to a shopper's wishlist. When someone clicks the link, they are directed to the store and shown the sharer's wishlist.

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)

📘

The shared link is only viewable by others if the list has been marked public first.

Call swat.markListPublic with the same lid before sharing the link. Recipients who open a link to a list that has not been marked public will not be able to view its contents.

❗️

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. The user must be logged in to use this functionality.

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.

API Parameters

ArgumentTypeDescription
lidguidUnique id of the List to be shared.
onSuccessfunctionCalled if the URL is generated successfully.
onErrorfunctionCalled 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.


Did this page help you?