Newer Version Available

This content describes an older version of this product. View Latest

CommerceStorePricing Class

Get product prices.

Namespace

ConnectApi

CommerceStorePricing Methods

These methods are for CommerceStorePricing. All methods are static.

getProductPrice(webstoreId, productId, effectiveAccountId)

Get the list and buyer price for a product.

API Version

49.0

Available to Guest Users

51.0

Requires Chatter

No

Signature

public static ConnectApi.ProductPrice getProductPrice(String webstoreId, String productId, String effectiveAccountId)

Parameters

webstoreId
Type: String
ID of the webstore.
productId
Type: String
ID of the product.
effectiveAccountId
Type: String
ID of the buyer account or guest buyer profile for which the request is made.

Return Value

Type: ConnectApi.ProductPrice

Usage

This method respects buyer entitlements and only users entitled to view product and price data can access it.

To get price information, the context store and account must have 25 or fewer price books associated with them. To reduce the number of active price books for the account within the store, you can change the active status, modify valid dates, or remove assignments of price books.

getProductPrice(webstoreId, productId, effectiveAccountId, productSellingModelIds)

Get a product’s list and buyer price for specified product selling models.

API Version

56.0

Available to Guest Users

56.0

Requires Chatter

No

Signature

public static ConnectApi.ProductPrice getProductPrice(String webstoreId, String productId, String effectiveAccountId, List<String> productSellingModelIds)

Parameters

webstoreId
Type: String
ID of the webstore.
productId
Type: String
ID of the product.
effectiveAccountId
Type: String
ID of the buyer account or guest buyer profile for which the request is made.
productSellingModelIds
Type: List<String>
List of product selling model IDs for the product.

Return Value

Type: ConnectApi.ProductPrice

getProductPrices(webstoreId, effectiveAccountId, pricingInput)

Get the prices for multiple products.

API Version

49.0

Available to Guest Users

51.0

Requires Chatter

No

Signature

public static ConnectApi.PricingResult getProductPrices(String webstoreId, String effectiveAccountId, ConnectApi.PricingInput pricingInput)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the buyer account or guest buyer profile for which the request is made. If null, the default value is determined from context.
pricingInput
Type: ConnectApi.PricingInput
A ConnectApi.PricingInput body with the list of line items to price.

Return Value

Type: ConnectApi.PricingResult

Usage

This method respects buyer entitlements and only users entitled to view product and price data can access it.

To get price information, the context store and account must have 25 or fewer price books associated with them. To reduce the number of active price books for the account within the store, you can change the active status, modify valid dates, or remove assignments of price books.

getProductPrices(webstoreId, effectiveAccountId, productIds)

Get the prices for multiple products.

API Version

54.0

Available to Guest Users

54.0

Requires Chatter

No

Signature

public static ConnectApi.PricingResult getProductPrices(String webstoreId, String effectiveAccountId, List<String> productIds)

Parameters

webstoreId
Type: String
ID of the webstore.
effectiveAccountId
Type: String
ID of the buyer account or guest buyer profile for which the request is made. If null, the default value is determined from context.
productIds
Type: List<String>
List of product IDs for which you want to get prices.

Return Value

Type: ConnectApi.PricingResult

Usage

This method respects buyer entitlements and only users entitled to view product and price data can access it.

To get price information, the context store and account must have 25 or fewer price books associated with them. To reduce the number of active price books for the account within the store, you can change the active status, modify valid dates, or remove assignments of price books.