Share via link and mark list public read-only

Share a list can be achieved through generating a link to the default shared wishlist page. A list can also be made read-only for public access to support custom shared wishlist landing pages.

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)

❗️

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.

swat.markListPublic

The markListPublic API allows read access to the list id for anyone. Once marked, this list id can be fetched using fetchListDetails API on a shared page.

Definition

swat.markListPublic(lid, onSuccess, onError)

❗️

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 = (response) => {
	console.log("Successfully Marked List Public ", response.lid);
}
let onError = (error) => {
  // Error is an xhrObject
	console.log("Error while marking the list public", error)
}

swat.markListPublic(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 marked public.
onSuccessfunctionCalled if the lst id is marked public successfully.
onErrorfunctionCalled if the action fails. Error message is passed as argument.