younifyd
Menu

Get Product Images

Returns product image data for a single product.

GET/organizations/{organizationId}/products/{productId}/images

Use it in a workflow

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

productIdstringrequired

The ID of the product whose images to retrieve.

Query parameters

imgTypesstring

Comma-separated list of view types to include in the response, with optional per-type image limits. Each item is either viewType or viewType:count. If omitted, all catalog view types are returned, up to 200 images per view type. If present, only the listed view types are included. The image count defaults to 200 per view type when no limit is specified.

allImagesboolean

When true, returns all variation-specific image groups rather than only the best-matching group for the product's variation attribute values. Default: false.

Default false

variationAttributearray<string>

Variation attribute values used to filter image groups when allImages=true. Format: <attributeId>=<value>. This parameter can be repeated for multiple attributes. Example: color=red&variationAttribute=size=L

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.

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.

Response

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

idstring

The id (SKU) of the product.

imageGroupsarray<object>

Array of image groups for this product. Each group corresponds to a view type and optionally to specific variation attribute values.

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.

json
{
  "id": "apple-ipod-classic",
  "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
            }
          ]
        }
      ]
    }
  ]
}

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

Was this page helpful?