Get List of Products
The getCartsProducts
API provides a flexible and efficient way to retrieve a tailored list of products for a specific cart, based on the cart's Price List and business context. It supports advanced filtering, pagination, localization, and the inclusion of product attachments.
Key Parameters:
- Pagination Controls:
pagesize
andoffsetSize
work together to navigate large catalogs efficiently, whilelastRecordId
enables cursor-based pagination for better performance. - Filtering Options:
query
,attributes
,filters
, andcategory
allow for precise product selection based on text search, attribute values, field values, and product categories. - Response Customization:
includeIneligible
,includeAttachments
,includeAttributes
, andfields
let you control what data is included in the response. - Performance Optimization:
maxRecords
andeaCacheKey
enable efficient caching for faster repeated queries. - Business Rules:
eaCheck
andfilterByPriceListOnly
apply eligibility rules and price list restrictions to the returned products.
Caching Enhancement:
- Optimized caching is available using
maxRecords
(max 1000) andeaCacheKey
parameters, improving response times for recurring queries. - Both parameters must be present to enable caching.
This API supports the guest user enhancements that Salesforce introduced with the Winter ‘21 release. To encrypt and decrypt data for guest users, use the UserSecurity
class with this API. See Guest User Technical Details.
For additional information, see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.
cartId
can be an Order, Opportunity, or Quote ID.
Communication (vlocity_cmt)
For API parameter names and descriptions, see Cart-Based API Swagger Reference.
- Resource URL:
/services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/products
- Response Format: JSON