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:
pagesizeandoffsetSizework together to navigate large catalogs efficiently, whilelastRecordIdenables cursor-based pagination for better performance. - Filtering Options:
query,attributes,filters, andcategoryallow for precise product selection based on text search, attribute values, field values, and product categories. - Response Customization:
includeIneligible,includeAttachments,includeAttributes, andfieldslet you control what data is included in the response. - Performance Optimization:
maxRecordsandeaCacheKeyenable efficient caching for faster repeated queries. - Business Rules:
eaCheckandfilterByPriceListOnlyapply eligibility rules and price list restrictions to the returned products.
Caching Enhancement:
- Optimized caching is available using
maxRecords(max 1000) andeaCacheKeyparameters, 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.
cartIdcan 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