younifyd
Menu

Get Products

Returns product details for multiple products.

GET/organizations/{organizationId}/products

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Products action (under Shopper Products).
  3. Fill in the fields below, then reference the result from later steps as {{getProducts.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Query parameters

idsarray<any>required

The IDs of the requested products (comma-separated, max 24 IDs).

inventoryIdsarray<any>

The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).

expandarray<string>

All expand parameters except page_meta_tags are used for the request when no expand parameter is provided. The value "none" may be used to turn off all expand options. The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2. The availability expand is deprecated. Use the Shopper Availability API instead for better caching performance. The primary_category expand returns the full breadcrumb path (root to leaf) for each product's primary category.

allImagesboolean

The flag that indicates whether to retrieve the whole image model for the requested product.

imgTypesstring

Filters product images by viewType with optional count limits per type. This parameter requires the images expand parameter. When used, the response includes the imageGroups property filtered by the specified image types. The format is a comma-separated list of image types with optional counts: <viewType>:<count>,<viewType>:<count>. If the count is omitted, all images of that type are returned. If specified, the count limits the number of images returned for that type. For example, imgTypes=large:2,small:1 returns up to 2 large images and 1 small image per product in the imageGroups. If imgTypes is used without expand=images, it is ignored and imageGroups aren't included in the response.

perPricebookboolean

The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

selectstring

The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. For more information, please read the documentation about property selectors [here](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-property-selection.html).

localeoneOf

A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.

currencystring

A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.

Response

Returns 200 with an object. Read it in later steps with {{getProducts.response.data.<field>}}.

limitinteger (int32)

The number of returned documents.

dataarray<object>

The array of product documents.

brandstring

The product's brand.

bundledProductsarray<object>3 fields

The array of all bundled products of this product.

currencystring

A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.

eanstring

The European Article Number of the product.

fetchDateinteger (int32)
idstringrequired

The id (SKU) of the product.

imageGroupsarray<object>3 fields

The array of product image groups.

inventoriesarray<object>7 fields

The array of product inventories explicitly requested via the 'inventory_ids' query parameter. This property is only returned in context of the 'availability' expansion.

inventoryany

The site default inventory information. This property is only returned in context of the 'availability' expansion.

longDescriptionstring

The localized product's long description.

manufacturerNamestring

The product's manufacturer name.

manufacturerSkustring

The product's manufacturer SKU.

masterany

The master product information, only for types: master, variation group, and variant.

minOrderQuantitynumber (double)

The minimum order quantity for this product.

namestring

The localized product name.

optionsarray<object>5 fields

The array of product options, only for type option. This array can be empty.

pageDescriptionstring

The localized product's page description.

pageKeywordsstring

The localized product's page description.

pageTitlestring

The localized product's page title.

pageMetaTagsarray<object>3 fields

Page Meta tags associated with the given product.

pricenumber (double)

The sales price of the product. In case of complex products, like master or set, this is the minimum price of related child products.

pricePerUnitnumber (double)

The price per unit if defined for the product

pricePerUnitMaxnumber (double)

The max price per unit typically for a master product's variant.

priceMaxnumber (double)

The maximum sales of related child products in complex products like master or set.

priceRangesarray<object>3 fields

Array of one or more price range objects representing one or more Pricebooks in context for the site.

pricesobject

The prices map with pricebook IDs and their values.

primaryCategoryIdstring

The ID of the products primary category.

primaryCategoryobject3 fields

The primary category of the product, including its full ancestor breadcrumb path (root to leaf, root category node excluded). Only present when the primary_category expand is requested.

productLinksarray<object>5 fields

The array of source and target product links information.

productPromotionsarray<object>3 fields

An array of active customer product promotions for this product, sorted by promotion priority using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → best discount → ID). This array can be empty. Coupon promotions are not returned in this array. See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details.

recommendationsarray<object>7 fields

Returns a list of recommendations.

setProductsarray<object>

The array of set products of this product.

shortDescriptionstring

The localized product short description.

slugUrlstring

The complete link to this product's storefront page.

stepQuantitynumber (double)

The steps in which the order amount of the product can be increased.

tieredPricesarray<object>3 fields

The document represents list of tiered prices if the product is a variant

typeany

The product type information. Can be one or more of the following values: item, master, variation_group, variant, bundle, and set.

unitstring

The sales unit of the product.

upcstring

The Universal Product Code (UPC).

validFromstring (date-time)

The time a product is valid from.

totalinteger (int32)

The total number of documents.

json
{
  "limit": 12,
  "data": [
    {
      "id": "apple-ipod-classic",
      "brand": "Apple",
      "bundledProducts": [
        {
          "id": "823476",
          "product": null,
          "quantity": 5
        }
      ],
      "currency": "USD",
      "ean": "8essdf9w3",
      "fetchDate": 5,
      "imageGroups": [
        {
          "images": [
            {
              "link": null,
              "alt": null,
              "disBaseLink": null,
              "title": null
            }
          ],
          "viewType": "hi-res",
          "variationAttributes": [
            {
              "id": null,
              "name": null,
              "values": null
            }
          ]
        }
      ],
      "inventories": [
        {
          "id": "Site1InventoryList",
          "ats": 15,
          "backorderable": true,
          "inStockDate": "9999-12-31T00:00:00.0Z",
          "orderable": true,
          "preorderable": false,
          "stockLevel": 10
        }
      ],
      "inventory": null,
      "longDescription": "Awesome long description of product",
      "manufacturerName": "Apple",
      "manufacturerSku": "2ND8834"
    }
  ],
  "total": 12
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Get Products — Salesforce Commerce Cloud — Documentation