younifyd
Menu

Get Variation Attributes

Retrieve variation attributes of a product.

GET/organizations/{organizationId}/products/{productId}/variation-attributes

Use it in a workflow

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

Request

Path parameters

productIdstringrequired

The id (SKU) of the product.

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

limitinteger (int32)

Number of records to retrieve per request. Must be between 1 (minimum) and 50 (maximum). Defaults to 25.

Default 25

offsetinteger (int32)

Used to retrieve the results based on a particular resource offset.

Default 0

Response

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

dataarray<object>

The array of variation attribute objects.

attributeDefinitionIdstringrequired

The id of the requested attribute definition.

attributeDefinitionNameobject

The localized display name of the variation attribute definition.

defaultValuestring

Default variation attribute value.

idstring

The ID of the variation attribute.

nameobject

The localized display name of the variation attribute.

sharedboolean

Returns the value of attribute 'shared' if attribute is local or shared.

slicingboolean

Returns the value of attribute 'slicing'.

valuesarray<object>7 fields

The sorted array of variation values. This array can be empty.

variationAttributeTypestring

Variation attribute type.

One ofstringintunknown

json
{
  "data": [
    {
      "attributeDefinitionId": "color",
      "attributeDefinitionName": {
        "en_US": "Color"
      },
      "defaultValue": "black",
      "id": "color",
      "name": {
        "en_US": "Color"
      },
      "shared": false,
      "slicing": true,
      "values": [
        {
          "value": "red",
          "description": {
            "en_US": "Red"
          },
          "image": {
            "path": "/images/apple-ipod-classic.jpg",
            "absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
            "alt": {
              "en_US": "iPod"
            },
            "disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
            "title": {
              "en_US": "iPod"
            }
          },
          "imageSwatch": {
            "path": "/images/apple-ipod-classic.jpg",
            "absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
            "alt": {
              "en_US": "iPod"
            },
            "disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
            "title": {
              "en_US": "iPod"
            }
          },
          "name": {
            "color": "Red"
          },
          "orderable": true,
          "position": 2
        }
      ],
      "variationAttributeType": "string"
    }
  ]
}

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