CommerceWishlist Class

Get, create, and delete wishlists. Add wishlists to carts. Get wishlist items, add items to wishlists, and delete wishlist items.

Namespace

ConnectApi

CommerceWishlist Methods

These methods are for CommerceWishlist. All methods are static.

addItemToWishlist(webstoreId, wishlistId, wishlistItemInput)

Add an item to a wishlist for the context user.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistItem addItemToWishlist(String webstoreId, String wishlistId, ConnectApi.WishlistItemInput wishlistItemInput)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistId
Type: String
ID of the wishlist.
wishlistItemInput
Type: ConnectApi.WishlistItemInput
A ConnectApi.WishlistItemInput body with the item to add to the wishlist.

Return Value

Type: ConnectApi.WishlistItem

addItemToWishlist(webstoreId, effectiveAccountId, wishlistId, wishlistItemInput)

Add an item to a wishlist.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistItem addItemToWishlist(String webstoreId, String effectiveAccountId, String wishlistId, ConnectApi.WishlistItemInput wishlistItemInput)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistId
Type: String
ID of the wishlist.
wishlistItemInput
Type: ConnectApi.WishlistItemInput
A ConnectApi.WishlistItemInput body with the item to add to the wishlist.

Return Value

Type: ConnectApi.WishlistItem

addWishlistToCart(webstoreId, wishlistId)

Add a wishlist to the active cart for the context user.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistToCartResult addWishlistToCart(String webstoreId, String wishlistId)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistId
Type: String
ID of the wishlist.

Return Value

Type: ConnectApi.WishlistToCartResult

addWishlistToCart(webstoreId, wishlistId, effectiveAccountId)

Add a wishlist to the active cart.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistToCartResult addWishlistToCart(String webstoreId, String wishlistId, String effectiveAccountId)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistId
Type: String
ID of the wishlist.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.

Return Value

Type: ConnectApi.WishlistToCartResult

addWishlistToCartWithCartId(webstoreId, wishlistId, cartId)

Add a wishlist to a cart.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistToCartResult addWishlistToCartWithCartId(String webstoreId, String wishlistId, String cartId)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistId
Type: String
ID of the wishlist.
cartId
Type: String
ID of the cart. If null, wishlist items are added to the active cart.

Return Value

Type: ConnectApi.WishlistToCartResult

addWishlistToCartWithCartId(webstoreId, wishlistId, cartId, effectiveAccountId)

Add a wishlist to a cart.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistToCartResult addWishlistToCartWithCartId(String webstoreId, String wishlistId, String cartId, String effectiveAccountId)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistId
Type: String
ID of the wishlist.
cartId
Type: String
ID of the cart. If null, wishlist items are added to the active cart.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.

Return Value

Type: ConnectApi.WishlistToCartResult

createWishlist(webstoreId, wishlistInput)

Create a wishlist for the context user.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.Wishlist createWishlist(String webstoreId, ConnectApi.WishlistInput wishlistInput)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistInput
Type: ConnectApi.WishlistInput
A ConnectApi.WishlistInput body that includes the wishlist name and items.

Return Value

Type: ConnectApi.Wishlist

createWishlist(webstoreId, effectiveAccountId, wishlistInput)

Create a wishlist.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.Wishlist createWishlist(String webstoreId, String effectiveAccountId, ConnectApi.WishlistInput wishlistInput)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistInput
Type: ConnectApi.WishlistInput
A ConnectApi.WishlistInput body that includes the wishlist name and items.

Return Value

Type: ConnectApi.Wishlist

deleteWishlist(webstoreId, wishlistId)

Delete a wishlist.

API Version

49.0

Requires Chatter

No

Signature

public static Void deleteWishlist(String webstoreId, String wishlistId)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistId
Type: String
ID of the wishlist.

Return Value

Type: Void

getWishlist(webstoreId, wishlistId)

Get a wishlist for the context user.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.Wishlist getWishlist(String webstoreId, String wishlistId)

Parameters

webstoreId
Type: String
ID of the webstore.
wishlistId
Type: String
ID of the wishlist.

Return Value

Type: ConnectApi.Wishlist

getWishlist(webstoreId, effectiveAccountId, wishlistId)

Get a wishlist.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.Wishlist getWishlist(String webstoreId, String effectiveAccountId, String wishlistId)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistId
Type: String
ID of the wishlist.

Return Value

Type: ConnectApi.Wishlist

getWishlistItems(webstoreId, effectiveAccountId, wishlistId)

Get wishlist items.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistItemCollection getWishlistItems(String webstoreId, String effectiveAccountId, String wishlistId)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistId
Type: String
ID of the wishlist.

getWishlistItems(webstoreId, effectiveAccountId, wishlistId, pageParam)

Get a page of wishlist items.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistItemCollection getWishlistItems(String webstoreId, String effectiveAccountId, String wishlistId, String pageParam)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistId
Type: String
ID of the wishlist.
pageParam
Type: String
Specifies the page token to be used to view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.

getWishlistItems(webstoreId, effectiveAccountId, wishlistId, pageParam, pageSize)

Get a page of specified size of wishlist items.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistItemCollection getWishlistItems(String webstoreId, String effectiveAccountId, String wishlistId, String pageParam, Integer pageSize)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistId
Type: String
ID of the wishlist.
pageParam
Type: String
Specifies the page token to be used to view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.
pageSize
Type: Integer
Specifies the number of items per page. Valid values are from 1 through 200. If you pass in null, the default size is 25.

getWishlistSummaries(webstoreId)

Get wishlist summaries for the context user.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistsSummary getWishlistSummaries(String webstoreId)

Parameters

webstoreId
Type: String
ID of the webstore.

Return Value

Type: ConnectApi.WishlistsSummary

getWishlistSummaries(webstoreId, effectiveAccountId, wishlistId, includeDisplayedList)

Get wishlist summaries or get a specific wishlist summary.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistsSummary getWishlistSummaries(String webstoreId, String effectiveAccountId, String wishlistId, Boolean includeDisplayedList)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistId
Type: String
ID of the wishlist. If null, all the wishlist summaries are returned.
includeDisplayedList
Type: Boolean
Specifies whether to include the displayed list (true) or not (false). If null, defaults to false.

Return Value

Type: ConnectApi.WishlistsSummary

getWishlistSummaries(webstoreId, effectiveAccountId, includeDisplayedList)

Get wishlist summaries.

API Version

49.0

Requires Chatter

No

Signature

public static ConnectApi.WishlistsSummary getWishlistSummaries(String webstoreId, String effectiveAccountId, Boolean includeDisplayedList)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
includeDisplayedList
Type: Boolean
Specifies whether to include the displayed list (true) or not (false). If null, defaults to false.

Return Value

Type: ConnectApi.WishlistsSummary

removeWishlistItem(webstoreId, effectiveAccountId, wishlistId, wishlistItemId)

Remove an item from a wishlist.

API Version

49.0

Requires Chatter

No

Signature

public static Void removeWishlistItem(String webstoreId, String effectiveAccountId, String wishlistId, String wishlistItemId)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the account for which the request is made. If null, defaults to the account ID for the context user.
wishlistId
Type: String
ID of the wishlist.
wishlistItemId
Type: String
ID of the wishlist item to remove.

Return Value

Type: Void