The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

Get Cart Items

Return cart items and their configurable attributes based on specified criteria.

Fieldset as a parameter for this API is not supported. If the fieldset parameter is passed, a runtime error occurs.

This API can be called either through REST or through Apex remote calls. The default value for the price parameter is true. If price=false is not specified, pricing is executed by default. Specify price=false if you do not want to execute pricing.

In ​Salesforce Industries Communications, Media, and Energy Fall '20 and later releases, the getCarts validate parameter has a default value of _True*, so the API will return validation messages. If validate=false is not specified, validation messages are returned by default. Specify validate=false in the UI if you do not want to receive validation messages.

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.

Communication (vlocity_cmt)

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

Response FormatJSON
Resource URL/services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/items?query={query}&lastRecordId=(n)&pagesize={n}&filters={filter}&fields={field1,field2}&validate={true/false}&price={true/false}

See Also