Get Contains Products API

This API retrieves offers for the specified product code. This API is a variation of the Get Offers by Catalog API. The response includes orderable offers (promotions and products) that contain the specified product. A cart ID is not required.

A promotion includes all the products associated with the promotion, including the root-level product.

This API support a flag called isloggedin to indicate whether a user is logged in or anonymous. If the isloggedin parameter is true, it indicates a logged-in user, and an accountId must be specified in the context parameter of the API call. If the isloggedin flag is false, it indicates that the user is anonymous.

See Get Offer Details API for more information and examples. See Digital Commerce REST API.

  • Catalog should have CatalogCodec populated and no space is allowed in CatalogCodec.

  • Products should have ProductCode populated and no space is allowed in ProductCode.

  • Promotions should have Codec populated and no space is allowed in Codec.

  • Catalog should be present with products and promotions attached to it as records under CatalogProductRelationship__c object.

  • The catalog should be attached to a default price list through DefaultPriceListc field on Catalogc object.

  • Price list entries should exist for all products attached to the catalog.

  • The Product Hierarchy Maintenance job should be run before executing this API.

For API parameter names and descriptions, see Digital Commerce REST API.

A response code of 201 indicates a successful call while 400 indicates a failed response.

For detailed API response descriptions, see Digital Commerce REST API.

Example: Retrieve an offer with a specific product code for an anonymous user:

Example: Retrieve an offer with a specific product code for a logged-in user: