Products List (POST)

Retrieve products. You can also search, filter, or sort the products.

Resource

1/connect/pcm/products

Resource Example

1https://{yourInstance}.salesforce.com/services/data/v68.0/connect/pcm/products?productClassificationId=11BT10000004C9SMAU

Available Version: 60.0

Requires Chatter: No

HTTP Methods: POST

Note: POST methods typically create an item, but for this resource POST is used to retrieve information.

Request Body for POST

JSON Example

This example is a search request for products that contain Bundle Product in the product name.

1{
2  "catalogIds": [
3    "0ZST10000004D03OAE"
4  ],
5  "language": "spanish",
6  "filter": {
7    "criteria": [
8      {
9        "property": "name",
10        "operator": "contains",
11        "value": "Bundle Product"
12      }
13    ]
14  },
15  "relatedObjectFilters": [
16    {
17      "objectName": "ProductSpecificationRecType",
18      "criteria": [
19        {
20          "property": "IsCommercial",
21          "operator": "eq",
22          "value": false
23        }
24      ],
25      "additionalFields": {
26        "Product2": {
27          "fields": [
28            "code__c"
29          ]
30        }
31      }
32    }
33  ]
34}

This example is a search request for products that contain the specified search term in the product name and are part of a catalog.

1{
2  "catalogIds": [
3    "0ZSDU0000002Og54AE"
4  ],
5  "searchTerm": "Slack"
6}

Query Parameters

NameTypeDescriptionRequired or OptionalAvailable Version
product​Classification​IdStringID of the product classification template that contains a collection of dynamic attributes and can be reused to create multiple products. Products that are based on a product classification inherit all the attributes of the product classification. Specify either the product classification ID, list of category IDs, or list of catalog IDs to retrieve products.Optional60.0

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
additional​FieldsMap<String, Additional Fields Input>Map of the object and the list of standard and custom fields to be queried along with the standard response. The supported object is Product2.Optional61.0
catalog​IdsList<String>List of comma-separated catalog IDs. The API returns the list of product records that are associated with the specified catalog IDs. Specify either the product classification ID, list of category IDs, or list of catalog IDs to retrieve products.Optional60.0
category​IdsList<String>List of comma-separated category IDs. The API returns the list of product records that are associated with the specified category IDs. If unspecified, then returns all products that are added to at least one category. Specify either the product classification ID, list of category IDs, or list of catalog IDs to retrieve products.Optional60.0
correlation​IdStringUnique token to track and associate related events or transactions across different components of the application. If unspecified, a Universally Unique Identifier (UUID) is generated.Optional60.0
filterCriteria InputCriteria to filter the records. Filters are applicable to the fields of Product2 object. The supported operators are eq, in, contains—This value isn’t applicable if the Use Indexed Data For Product Listing and Search toggle from the Product Discovery Settings page from Setup is enabled; gt—Specifies a greater than criteria. Available from API version 63.0 and later for Number, Date, and Datetime data types only; lt—Specifies a less than criteria. Available from API version 63.0 and later for Number, Date, and Datetime data types only; gte—Specifies a greater than or equal to criteria. Available from API version 63.0 and later for Number, Date, and Datetime data types only; or lte—Specifies a less than or equal to criteria. Available from API version 63.0 and later for Number, Date, and Datetime data types only. If multiple criteria are specified, then the criteria are combined by using the and operator. The supported properties are name, description, and isActive. If the Use Indexed Data For Product Listing and Search toggle from the Product Discovery Settings page from Setup is enabled, then the supported property is name only.Optional60.0
languageStringCustom language that you can specify to get translated data for the fields of an object that’s enabled for translation. See Translate Product and Product Category Data.Optional64.0
offsetIntegerNumber of records to skip. The default value is 0.Optional60.0
pageSizeIntegerSpecifies the number of records per page. Valid values are from 1 through 200. If the value is unspecified, it defaults to 100.Optional60.0
related​Object​FiltersRelated Object Filter[]Criteria for the related objects to filter the records. The supported operator is eq. The supported object is ProductSpecificationRecType. The supported values are true and false. The supported property is IsCommercial.Optional60.0
searchTermStringString used to get products with the product name containing the search term. See Search Considerations When Using Indexed Data.Optional62.0
sortSortSort order for the products. If the Use Indexed Data For Product Listing and Search toggle from the Product Discovery Settings page from Setup is enabled, then you can sort products by using name only.Optional60.0

Response Body for POST: Products Output