younifyd
Menu

Get Product

Returns product details for a single product.

GET/organizations/{organizationId}/products/{id}

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Product action (under Shopper Products).
  3. Fill in the fields below, then reference the result from later steps as {{getProduct.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).

idstringrequired

The ID of the requested product.

Query parameters

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 the 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.

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).

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.

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.

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.

Response

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

brandstring

The product's brand.

bundledProductsarray<object>

The array of all bundled products of this product.

idstringrequired
productanyrequired

The product being bundled.

quantitynumber (double)required

For the product being bundled, the quantity added to the bundle.

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)
idstring

The id (SKU) of the product.

imageGroupsarray<object>

The array of product image groups.

imagesarray<object>required4 fields

The images of the image group.

variationAttributesarray<object>3 fields

Returns a list of variation attributes applying to this image group.

viewTypestringrequired

The image view type.

inventoriesarray<object>

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

atsnumber (double)

The Available To Sell (ATS) of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting 'product.inventory.ats.max_threshold'.

backorderableboolean

A flag indicating whether the product is backorderable.

idstringrequired

The inventory ID.

inStockDatestring (date-time)

A flag indicating the date when the product will be in stock.

orderableboolean

A flag indicating whether at least one of the products is available to sell.

preorderableboolean

A flag indicating whether the product is preorderable.

stockLevelnumber (double)

The stock level of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting 'product.inventory.stock_level.max_threshold'.

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>

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

descriptionstring

The localized description of the option.

idanyrequired

The ID of the option.

imagestring

The URL to the option image.

namestring

The localized name of the option.

valuesarray<object>4 fields

The array of option values. 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>

Page Meta tags associated with the given product.

idstring

The ID of the Page Meta Tag.

valuestring

Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID.

typestring

The kind of Page Meta Tag, indicating how the storefront should render the value. Documented values are `name`, `property`, `title`, and `jsonld`: * `name` — render as `<meta name="...">`. * `property` — render as `<meta property="...">` (e.g. Open Graph tags). * `title` — render as the HTML `<title>` element. * `jsonld` — JSON-LD structured data, intended for rendering inside `<script type="application/ld+json">`. The field may be absent when the kind cannot be determined. Clients should treat unknown values as opaque so additional kinds can be introduced without breaking the contract.

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>

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

maxPriceany

Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook)

minPriceany

Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook)

pricebookstring

The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM.

pricesobject

The prices map with pricebook IDs and their values.

primaryCategoryIdstring

The ID of the products primary category.

primaryCategoryobject

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.

idstring

The ID of the primary category.

namestring

The localized name of the primary category.

parentCategoryTreearray<object>2 fields

The list of ancestor categories from root to the primary category (root category node excluded).

productLinksarray<object>

The array of source and target product links information.

sourceProductIdanyrequired

The semantic ID of the product this product link is coming from.

sourceProductLinkstringrequired

The URL addressing the product this product link is coming from.

targetProductIdanyrequired

The semantic ID of the product this product link is pointing to.

targetProductLinkstringrequired

The URL addressing the product this product link is pointing to.

typestringrequired

The type of product link.

One ofcross_sellreplacementup_sellaccessorynewer_versionalt_orderunitspare_partother

productPromotionsarray<object>

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.

calloutMsgstringrequired

The localized call-out message of the promotion.

promotionIdstringrequired

The unique ID of the promotion.

promotionalPriceanyrequired

The promotional price for this product.

recommendationsarray<object>

Returns a list of recommendations.

calloutMsgstring

The localized callout message of the recommendation.

imageobject4 fields

Product image

longDescriptionstring

The localized long description of the recommendation.

namestring

The localized name of the recommendation.

recommendationTypeobjectrequired2 fields

Document representing a recommendation type.

recommendedItemIdstring

The recommended item ID of the recommendation.

shortDescriptionstring

The localized short description of the recommendation.

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>

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

priceany

Price for the product for the specified tier for the specified pricebook

pricebookstring

The active pricebook for which this price is defined

quantitynumber (double)

Quantity tier for which the price is defined.

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.

json
{
  "id": "apple-ipod-classic",
  "brand": "Apple",
  "bundledProducts": [
    {
      "id": "823476",
      "product": null,
      "quantity": 5
    }
  ],
  "currency": "USD",
  "ean": "8essdf9w3",
  "fetchDate": 5,
  "imageGroups": [
    {
      "images": [
        {
          "link": "https://example.com/on/demandware.static/-/Sites-electronics-catalog/default/dwc2/images/large/ipod-shuffle.jpg",
          "alt": "Apple iPod Shuffle, large",
          "disBaseLink": "https://example.com/images/large/ipod-shuffle-silver.jpg",
          "title": "Apple iPod Shuffle"
        }
      ],
      "viewType": "hi-res",
      "variationAttributes": [
        {
          "id": "color",
          "name": "Color",
          "values": [
            {
              "value": null,
              "description": null,
              "image": null,
              "imageSwatch": null,
              "name": null,
              "orderable": 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"
}

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