REST API - Get variations for a master product in category (until 7.8)

URI

/categories/<cat_ID>/products/<sku>/variations

Http Method

GET

Short Description

Returns a list of variations of a master product

Query Parameters

Optional parameters:

  • amount
  • offset
  • pageable
  • <attribute name>=<attribute value> - for filtering given variation attributes

Example Requests

/categories/Cameras-Camcorders/products/M7972533/variations?amount=2&offset=2

-or-

/categories/Cameras-Camcorders/products/M7972533/variations?amount=1&Colour_of_product=Black&Hard_disk_drive_capacity=640%20GB

HTTP Status Codes

200 OK
404 Not found 

Description

The following details/attributes are listed for each variation of the master product:

  • Title
  • Type
  • Description
  • Link to /products/<sku>
  • List of variable variation attributes

It is possible to request only parts of the complete list (using the parameters amount and offset).

Cartridge

app_sf_rest

ApplicationB2C Web Shop, SMB Web Shop

Product Version

7.5

Product To Version

7.8

Status

final

JSON

Request Data Format

application/json

Request related java object

n/a

Request Example

n/a

Response Data Format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resource.ProductResource
com.intershop.sellside.rest.common.capi.resourceobject.VariationCollectionRO
com.intershop.sellside.rest.common.capi.resourceobject.VariationLinkRO
com.intershop.sellside.rest.common.capi.resourceobject.VariationAttributeRO

Response Example

../products/M7972533/variations?amount=2

{
    "pageable": "G5sKDgBW4zsAAAFC3DQbqLyx",
    "total": 12,
    "offset": 0,
    "amount": 2,
    "elements":
    [
        {
            "type": "VariationLink",
            "variableVariationAttributeValues":
            [
                {
                    "name": "Colour",
                    "type": "VariationAttribute",
                    "value": "White",
                    "variationAttributeId": "Colour_of_product"
                },
                {
                    "name": "Hard disk drive capacity",
                    "type": "VariationAttribute",
                    "value": "640 GB",
                    "variationAttributeId": "Hard_disk_drive_capacity"
                }
            ],
            "description": "CH94 Portable 640GB, USB 2.0, 172g, 480Mb/s",
            "uri": "PrimeTech-PrimeTechSpecials-Site/-/products/3934150",
            "title": "A-DATA CH94 Portable 640GB"
        },
        {
            "type": "VariationLink",
            "variableVariationAttributeValues":
            [
                {
                    "name": "Colour",
                    "type": "VariationAttribute",
                    "value": "Black",
                    "variationAttributeId": "Colour_of_product"
                },
                {
                    "name": "Hard disk drive capacity",
                    "type": "VariationAttribute",
                    "value": "500 GB",
                    "variationAttributeId": "Hard_disk_drive_capacity"
                }
            ],
            "description": "500GB CH94, USB 2.0, Black",
            "uri": "PrimeTech-PrimeTechSpecials-Site/-/products/3934151",
            "title": "A-DATA CH94 Portable 500GB"
        }
    ],
    "type": "Variations",
    "name": "variations"
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

n/a

XML Request Example

n/a

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.sellside.rest.common.capi.resource.ProductResource
com.intershop.sellside.rest.common.capi.resourceobject.VariationCollectionRO
com.intershop.sellside.rest.common.capi.resourceobject.VariationLinkRO
com.intershop.sellside.rest.common.capi.resourceobject.VariationAttributeRO

XML Response Example

../products/M7972533/variations?amount=2

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Variations name="variations" type="Variations">
  <amount>2</amount>
  <elements>
    <VariationLink type="VariationLink">
      <description>CH94 Portable 640GB, USB 2.0, 172g, 480Mb/s</description>
      <title>A-DATA CH94 Portable 640GB</title>
      <uri>PrimeTech-PrimeTechSpecials-Site/-/products/3934150</uri>
      <variableVariationAttributeValues>
        <VariationAttribute name="Colour" type="VariationAttribute">
          <value>White</value>
          <variationAttributeId>Colour_of_product</variationAttributeId>
        </VariationAttribute>
        <VariationAttribute name="Hard disk drive capacity" type="VariationAttribute">
          <value>640 GB</value>
          <variationAttributeId>Hard_disk_drive_capacity</variationAttributeId>
        </VariationAttribute>
      </variableVariationAttributeValues>
    </VariationLink>
    <VariationLink type="VariationLink">
      <description>500GB CH94, USB 2.0, Black</description>
      <title>A-DATA CH94 Portable 500GB</title>
      <uri>PrimeTech-PrimeTechSpecials-Site/-/products/3934151</uri>
      <variableVariationAttributeValues>
        <VariationAttribute name="Colour" type="VariationAttribute">
          <value>Black</value>
          <variationAttributeId>Colour_of_product</variationAttributeId>
        </VariationAttribute>
        <VariationAttribute name="Hard disk drive capacity" type="VariationAttribute">
          <value>500 GB</value>
          <variationAttributeId>Hard_disk_drive_capacity</variationAttributeId>
        </VariationAttribute>
      </variableVariationAttributeValues>
    </VariationLink>
  </elements>
  <offset>0</offset>
  <pageable>0g8KDgBW5wkAAAFCNkobqLyw</pageable>
  <total>12</total>
</Variations>

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets