Products resource (Shop API 23.2)

Summary

Http Method Resource Description
GET /products/({id},...,{id}) Allows to access multiple products by a single request. This convenience resource should be used instead making separated requests. This saves bandwidth and CPU time on the server. The URI is the same like requesting a single Product by id, but multiple ids wrapped by parentheses and separated can be provided. If a parenthesis or the separator is part of the identifier itself it has to be URL encoded. Instead of a single Product document a result object of Product documents is returned. Note: Only products that are online and assigned to site catalog are returned. The maximum number of ids is 24. If none of the products requested are found, the cache-control header will be defaulted to 60 seconds.
GET /products/{id} To access single products resource, you construct a URL using the template shown below. This template requires you to specify an Id (typically a SKU) for a product. In response, the server returns a corresponding Product document, provided the product is online and assigned to site catalog. The document contains variation attributes (including values) and the variant matrix; this data is provided for both the master and for the variant.
GET /products/{id}/availability Access product availability information of products that are online and assigned to site catalog.
GET /products/{id}/bundled_products Access bundled product information of products that are online and assigned to site catalog.
GET /products/{id}/images Access product image information of products that are online and assigned to site catalog. Filter the result by view type and variation values.
GET /products/{id}/links Access product link information of products that are online and assigned to site catalog. Filter the result by link type and link direction.
GET /products/{id}/options Access product option information of products that are online and assigned to site catalog.
GET /products/{id}/prices Access product price information of products that are online and assigned to site catalog.
GET /products/{id}/promotions Access product promotion information of products that are online and assigned to site catalog.
GET /products/{id}/recommendations Access product recommendation information of products that are online and assigned to site catalog.
GET /products/{id}/set_products Access product set information of products that are online and assigned to site catalog.
GET /products/{id}/shipping_methods Retrieves the applicable shipping methods for a certain product.
GET /products/{id}/variations Access product variation information of products that are online and assigned to site catalog.

Get multiple products

Allows to access multiple products by a single request. This convenience resource should be used instead making separated requests. This saves bandwidth and CPU time on the server. The URI is the same like requesting a single Product by id, but multiple ids wrapped by parentheses and separated can be provided. If a parenthesis or the separator is part of the identifier itself it has to be URL encoded. Instead of a single Product document a result object of Product documents is returned. Note: Only products that are online and assigned to site catalog are returned. The maximum number of ids is 24. If none of the products requested are found, the cache-control header will be defaulted to 60 seconds.

Url

GET http://hostname:port/dw/shop/v23_2/products/({id},...,{id})?expand={String}&inventory_ids={String}&currency={String}&locale={String}&all_images={Boolean}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

ProductResult

Path Parameters

Parameter Type Description Constraints
ids [String] The ids of the requested products. maxItems=24, maxLength=100

Query Parameters

Parameter Type Description Constraints
all_images Boolean The flag that indicates whether to retrieve the whole image model for the requested product.  
currency String The currency mnemonic specified for price.  
expand String The expand parameter. A comma separated list with the allowed values (availability, bundled_products, links, promotions, options, images, prices, variations, set_products, recommendations)  
inventory_ids String the optional inventory list ids, for which the availability should be shown. maxItems=5
locale String The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

#
# Example - Request product base information
#
REQUEST:
GET /dw/shop/v23_2/products/(creative-zen-v,namco-we-ski-wii) HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate
{
  "_v" : "23.2",
  "_type":"product_result",
  "count" : 2,
  "data" : [ 
  {
    "brand" : "Creative",
    "id" : "creative-zen-v",
    "min_order_quantity" : 1,
    "name" : "Creative ZEN V Digital Media Player",
    "page_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "page_keywords" : "Creative",
    "page_title" : "Creative ZEN V Digital Media Player",
    "primary_category_id" : "electronics-digital-media-players",
    "short_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "step_quantity" : 1,
    "type" : {
      "item" : true
    },
    "unit_measure" : "each",
    "unit_quantity" : 1,
    ...
    "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
    "c_memorySize" : "1GB",
    "c_tabDescription" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player."
  }, 
  {
    "brand" : "Namco",
    "id" : "namco-we-ski-wii",
    "min_order_quantity" : 1,
    "name" : "We Ski (for Wii)",
    "page_description" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!",
    "page_keywords" : "Namco",
    "page_title" : "We Ski (for Wii)",
    "primary_category_id" : "electronic-games",
    "short_description" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!",
    "step_quantity" : 1,
    "type" : {
      "item" : true
    },
    "unit_measure" : "each",
    "unit_quantity" : 1,
    ...
    "c_gameSystemType" : "Wiiā„¢",
    "c_tabDescription" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!"
  } ],
  "total" : 2
}


#
# Example - Request product information expanded by 'prices' and 'availability'
#
REQUEST:
GET /dw/shop/v23_2/products/(creative-zen-v,namco-we-ski-wii)?expand=availability,prices HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=60,must-revalidate
{
  "_v" : "23.2",
  "count" : 2,
  "data" : [ 
  {
    "brand" : "Creative",
    "id" : "creative-zen-v",
    "min_order_quantity" : 1,
    "name" : "Creative ZEN V Digital Media Player",
    "orderable" : true,
    "page_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "page_keywords" : "Creative",
    "page_title" : "Creative ZEN V Digital Media Player",
    "price" : 71.99,
    "price_per_unit": 71.99,
    "primary_category_id" : "electronics-digital-media-players",
    "short_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "step_quantity" : 1,
    "type" : {
      "item" : true
    },
    "unit_measure" : "each",
    "unit_quantity" : 1,
    ...
    "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
    "c_memorySize" : "1GB",
    "c_tabDescription" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player."
  }, 
  {
    "brand" : "Namco",
    "id" : "namco-we-ski-wii",
    "min_order_quantity" : 1,
    "name" : "We Ski (for Wii)",
    "orderable" : true,
    "page_description" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!",
    "page_keywords" : "Namco",
    "page_title" : "We Ski (for Wii)",
    "price" : 39.99,
    "price_per_unit": 39.99,
    "primary_category_id" : "electronic-games",
    "short_description" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!",
    "step_quantity" : 1,
    "type" : {
      "item" : true
    },
    "unit_measure" : "each",
    "unit_quantity" : 1,
    ...
    "c_gameSystemType" : "Wiiā„¢",
    "c_tabDescription" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!"
  } ],
  "total" : 2
}

Get single product

To access single products resource, you construct a URL using the template shown below. This template requires you to specify an Id (typically a SKU) for a product. In response, the server returns a corresponding Product document, provided the product is online and assigned to site catalog. The document contains variation attributes (including values) and the variant matrix; this data is provided for both the master and for the variant.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}?expand={String}&inventory_ids={String}&currency={String}&locale={String}&all_images={Boolean}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The id of the requested product. maxLength=100

Query Parameters

Parameter Type Description Constraints
all_images Boolean The flag that indicates whether to retrieve the whole image model for the requested product.  
currency String The currency mnemonic specified for price.  
expand String The expand parameter. A comma separated list with the allowed values (availability, bundled_products, links, promotions, options, images, prices, variations, set_products, recommendations)  
inventory_ids String the optional inventory list ids, for which the availability should be shown. maxItems=5
locale String The locale context.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 InvalidExpandParameterException

param (String)

Thrown in case a specified expand parameter value is unknown.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

#
# Example - Request product base information
#
REQUEST:
GET /dw/shop/v23_2/products/creative-zen-v HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate
{
    "_v" : "23.2",
    "_type":"product",
    "brand" : "Creative",
    "id" : "creative-zen-v",
    "min_order_quantity" : 1,
    "name" : "Creative ZEN V Digital Media Player",
    "page_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "page_keywords" : "Creative",
    "page_title" : "Creative ZEN V Digital Media Player",
    "primary_category_id" : "electronics-digital-media-players",
    "short_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "step_quantity" : 1,
    "type" : {
      "item" : true
    },
    ...
    "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
    "c_memorySize" : "1GB",
    "c_tabDescription" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player."
}


#
# Example - Request product information expanded by 'prices' and 'availability'
#
REQUEST:
GET /dw/shop/v23_2/products/creative-zen-v?expand=availability,prices HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=60,must-revalidate
{
    "_v" : "23.2",
    "_type":"product",
    "brand" : "Creative",
    "id" : "creative-zen-v",
    "min_order_quantity" : 1,
    "name" : "Creative ZEN V Digital Media Player",
    "orderable" : true,
    "page_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "page_keywords" : "Creative",
    "page_title" : "Creative ZEN V Digital Media Player",
    "price" : 71.99,
    "price_per_unit": 71.99,
    "primary_category_id" : "electronics-digital-media-players",
    "short_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "step_quantity" : 1,
    "type" : {
      "item" : true
    },
    "unit_measure" : "each",
    "unit_quantity" : 1,
    ...
    "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
    "c_memorySize" : "1GB",
    "c_tabDescription" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player."
}

Get product availability

Access product availability information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/availability?inventory_ids={String}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
inventory_ids String the optional inventory list ids, for which the availability should be shown. maxItems=5
locale String The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/creative-zen-v/availability HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=60,must-revalidate
{
    "_v" : "23.2",
    "_type":"product",
    "brand" : "Creative",
    "id" : "creative-zen-v",
    "min_order_quantity" : 1,
    "name" : "Creative ZEN V Digital Media Player",
    "orderable" : true,
    "page_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "page_keywords" : "Creative",
    "page_title" : "Creative ZEN V Digital Media Player",
    "primary_category_id" : "electronics-digital-media-players",
    "short_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "step_quantity" : 1,
    "type" : {
      "item" : true
    },
    ...
    "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
    "c_memorySize" : "1GB",
    "c_tabDescription" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player."
}

Get bundled products

Access bundled product information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/bundled_products?locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
locale String The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/sony-ps3-bundle/bundled_products HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate
{
  "_v" : "23.2",
  "_type":"product",
  "brand" : "Sony",
    "bundled_products" : [ {
    "product" : {
      "brand" : "Sony",
      "id" : "sony-ps3-console",
      "name" : "Sony Playstation 3 Game Console",
      "page_description" : "ncludes PLAYSTATION 3 80GB system, DUALSHOCK 3 wireless controller, free PLAYSTATION Network membership, internet ready Wi-Fi, and 80GB of hard disk storage for all your games, music, videos, and photos. Every PS3 comes with a built-in Blu-ray player to give you the best high-definition viewing experience and pristine picture quality. Plus, the PS3 can play your entire catalog of CDs and DVDs.",
      "page_keywords" : "Sony",
      "page_title" : "Sony Playstation 3 Game Console",
      "primary_category_id" : "electronics-game-consoles",
      "short_description" : "ncludes PLAYSTATION 3 80GB system, DUALSHOCK 3 wireless controller, free PLAYSTATION Network membership, internet ready Wi-Fi, and 80GB of hard disk storage for all your games, music, videos, and photos. Every PS3 comes with a built-in Blu-ray player to give you the best high-definition viewing experience and pristine picture quality. Plus, the PS3 can play your entire catalog of CDs and DVDs.",
      "type" : {
        "item" : true,
        "option" : true
      }
    },
    "quantity" : 1
  }, {
    "product" : {
      "brand" : "EASports",
      "id" : "easports-nascar-09-ps3",
      "name" : "Nascar 09 (for Sony PS3)",
      "page_description" : "Race your way with unprecedented adaptability and customization in NASCAR 09. As the sport's newest prodigy, NASCAR's four-time champion Jeff Gordon takes you under his wing and guides you through some of the key aspects of the game. Use his advice to your advantage when racing in an all-new Career mode or the Sprint Driver Challenges to earn reputation and become a NASCAR champion yourself. Create a racing credential, design a customized car, and get ready to race for premier contracts as you work your way to the top with NASCAR 09. ",
      "page_keywords" : "EASports",
      "page_title" : "Nascar 09 (for Sony PS3)",
      "primary_category_id" : "electronic-games",
      "short_description" : "Race your way with unprecedented adaptability and customization in NASCAR 09. As the sport's newest prodigy, NASCAR's four-time champion Jeff Gordon takes you under his wing and guides you through some of the key aspects of the game. Use his advice to your advantage when racing in an all-new Career mode or the Sprint Driver Challenges to earn reputation and become a NASCAR champion yourself. Create a racing credential, design a customized car, and get ready to race for premier contracts as you work your way to the top with NASCAR 09. ",
      "type" : {
        "item" : true
      }
    },
    "quantity" : 1
  }, {
    "product" : {
      "brand" : "EASports",
      "id" : "easports-monopoly-ps3",
      "name" : "Monopoly Here and Now: The World Edition (for Sony PS3)",
      "page_description" : "Celebrating over 70 years of family fun, the legendary property trading game MONOPOLYĀ® is hitting video game consoles in a whole new way! The worldā€™s most popular board game returns in 21.2 with MONOPOLYĀ® HERE and NOW: The World Edition, a modern makeover of the classic game. With a host of current-day cities and landmarks from all over the world, this new version will let players wheel and deal and compete to own some of the most recognized locales on Earth. EA brings this exciting new edition of the beloved board game to video game consoles for the first time along with entirely new features that focus on super-fast play, fun and interactive mini-games and four-player simultaneous gameplay. Players can now host the ultimate MONOPOLY night with family and friends.",
      "page_keywords" : "EASports",
      "page_title" : "Monopoly Here and Now: The World Edition (for Sony PS3)",
      "primary_category_id" : "electronic-games",
      "short_description" : "Celebrating over 70 years of family fun, the legendary property trading game MONOPOLYĀ® is hitting video game consoles in a whole new way! The worldā€™s most popular board game returns in 21.2 with MONOPOLYĀ® HERE & NOW: The World Edition, a modern makeover of the classic game. With a host of current-day cities and landmarks from all over the world, this new version will let players wheel and deal and compete to own some of the most recognized locales on Earth. EA brings this exciting new edition of the beloved board game to video game consoles for the first time along with entirely new features that focus on super-fast play, fun and interactive mini-games and four-player simultaneous gameplay. Players can now host the ultimate MONOPOLY night with family and friends.",
      "type" : {
        "item" : true
      }
    },
    "quantity" : 1
  }, {
    "product" : {
      "brand" : "Namco",
      "id" : "namco-eternal-sonata-ps3",
      "name" : "Eternal Sonata (for Sony PS3)",
      "page_description" : "On his deathbed, the famous composer, Chopin, drifts between this life and the next. In his final hours, he experiences a fantastical dream where he encounters a young girl facing a terrible destiny and the boy who will fight to save her. On the border between dreams and reality, Chopin discovers the light that shines in all of us in this enduring tale of good and evil, love and betrayal.",
      "page_keywords" : "Namco",
      "page_title" : "Eternal Sonata (for Sony PS3)",
      "primary_category_id" : "electronic-games",
      "short_description" : "On his deathbed, the famous composer, Chopin, drifts between this life and the next. In his final hours, he experiences a fantastical dream where he encounters a young girl facing a terrible destiny and the boy who will fight to save her. On the border between dreams and reality, Chopin discovers the light that shines in all of us in this enduring tale of good and evil, love and betrayal.",
      "type" : {
        "item" : true
      }
    },
    "quantity" : 1
  }, {
    "product" : {
      "brand" : "Sony",
      "id" : "sony-warhawk-ps3",
      "name" : "Warhawk (for Sony PS3)",
      "page_description" : "The long-awaited remake to the PlayStation hit takes flight on the PLAYSTATION3 (PS3) computer entertainment system. In Warhawk, players experience the thrill of white-knuckle aerial combat with swarms of enemy fighters, bone-crunching armored assaults and high-intensity infantry combat in a massive, all-out war fought both on the ground and in the skies.",
      "page_keywords" : "Sony",
      "page_title" : "Warhawk (for Sony PS3)",
      "primary_category_id" : "electronic-games",
      "short_description" : "The long-awaited remake to the PlayStation hit takes flight on the PLAYSTATION3 (PS3) computer entertainment system. In Warhawk, players experience the thrill of white-knuckle aerial combat with swarms of enemy fighters, bone-crunching armored assaults and high-intensity infantry combat in a massive, all-out war fought both on the ground and in the skies.",
      "type" : {
        "item" : true
      }
    },
    "quantity" : 1
  } ],
  "id" : "sony-ps3-bundle",
  "name" : "Playstation 3 Bundle",
  "primary_category_id" : "electronics-game-consoles",
  "type" : {
    "bundle" : true,
    "option" : true
  },
  ...
}

Get product images

Access product image information of products that are online and assigned to site catalog. Filter the result by view type and variation values.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/images?view_type={String}&all_images={Boolean}&variation_attribute={String}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
all_images Boolean If set to true, all images according to the requested product, view type and attribute value filter are returned. If set to false (or omitted), the best matching image for the requested product is returned. The attribute value filter is ignored in such case.  
locale String The locale context.  
variation_attribute String the variation values context maxLength=256
view_type String The view types. maxLength=256

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/creative-zen-v/images HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=60,must-revalidate
{
    "_v" : "23.2",
    "_type":"product",
    "brand" : "Creative",
    "id" : "creative-zen-v",
    "image_groups" : [ 
    {
	    "images" : [ {
	      "alt" : "Creative ZEN V Digital Media Player, , large",
	      "link" : "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-electronics-catalog/default/v19_5659726735/images/large/creative-zen-v.jpg",
	      "title" : "Creative ZEN V Digital Media Player, "
	    } ],
	    "view_type" : "large"
	  }, 
	  {
	    "images" : [ {
	      "alt" : "Creative ZEN V Digital Media Player, , medium",
	      "link" : "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-electronics-catalog/default/v19_5659726735/images/medium/creative-zen-v.jpg",
	      "title" : "Creative ZEN V Digital Media Player, "
	    } ],
	    "view_type" : "medium"
	  }, 
	  {
	    "images" : [ {
	      "alt" : "Creative ZEN V Digital Media Player, , small",
	      "link" : "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-electronics-catalog/default/v19_5659726735/images/small/creative-zen-v.jpg",
	      "title" : "Creative ZEN V Digital Media Player, "
	    } ],
	    "view_type" : "small"
	  } ],
    "name" : "Creative ZEN V Digital Media Player",
    "page_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "page_keywords" : "Creative",
    "page_title" : "Creative ZEN V Digital Media Player",
    "primary_category_id" : "electronics-digital-media-players",
    "short_description" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player.",
    "type" : {
      "item" : true
    },
    ...
    "c_mediaFormat" : [ "0010", "0020", "0030", "0040" ],
    "c_memorySize" : "1GB",
    "c_tabDescription" : "The ZEN V player was designed for people like youā€”those who walk a step or two ahead of the pack. So don't be surprised when people take notice of your cool, colorful music and photo player."
}

Get product links

Access product link information of products that are online and assigned to site catalog. Filter the result by link type and link direction.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/links?type={String}&direction={String}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
direction String The product link direction Enum {in, out}  
locale String The locale context.  
type String The type of the product link. (Enum {accessory, alt_orderunit, cross_sell, newer_version, other, replacement, spare_part, up_sell} )  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedLinkTypeCodeParameterException

linkType (String)

400 indicates unknown product link type code
400 MalformedLinkDirectionParameterException

linkDirection (String)

400 indicates unknown link direction
404 ProductNotFoundException

productId (String)

siteId (String)

404 No product with given id found

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/namco-we-ski-wii/links HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate

{
  "_v" : "23.2",
  "_type":"product",
  "brand" : "Namco",
  "id" : "namco-we-ski-wii",
  "min_order_quantity" : 1,
  "name" : "We Ski (for Wii)",
  "page_description" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!",
  "page_keywords" : "Namco",
  "page_title" : "We Ski (for Wii)",
  "primary_category_id" : "electronic-games",
  "product_links" : [ 
  {
    "source_product_id" : "namco-we-ski-wii",
    "source_product_link" : "http://example.com/dw/shop/v23_2/products/namco-we-ski-wii?pretty_print=true",
    "target_product_id" : "midway-cruisn-wii",
    "target_product_link" : "http://example.com/dw/shop/v23_2/products/midway-cruisn-wii?pretty_print=true",
    "type" : "cross_sell"
  } ],
  "short_description" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!",
  "step_quantity" : 1,
  "type" : {
    "item" : true
  },
  ...
  "c_tabDescription" : "Welcome to the Happy Ski Resort, where fresh powder, groomed runs, multiple trails, and state of the art facilities await!  We Skiā„¢ takes you down the slopes in the most exciting skiing game to hit the Wiiā„¢!  Grab your Wii Remoteā„¢ and Nunchukā„¢ or step onto your Wii Balance Boardā„¢ to execute perfect wedge stops, shred the slaloms, and negotiate moguls with ease. With an in-depth Ski School and over a dozen lengthy runs packed with jumps, races, and more, you and your friends wonā€™t want to leave the slopes again!"
}

Get product options

Access product option information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/options?locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
locale String The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/garmin-gps-60/options HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate

{
  "_v" : "23.2",
  "_type":"product",
  "brand" : "Garmin",
  "id" : "garmin-gps-60",
  "min_order_quantity" : 1,
  "name" : "Garmin GPS 60ā„¢ Portable GPS Unit",
  "options" : [ {
    "id" : "gpsWarranty",
    "name" : "Extended Warranty",
    "values" : [ {
      "default" : true,
      "id" : "000",
      "name" : "None"
    }, {
      "default" : false,
      "id" : "001",
      "name" : "1 Year Warranty"
    }, {
      "default" : false,
      "id" : "004",
      "name" : "2 Year Warranty"
    }, {
      "default" : false,
      "id" : "002",
      "name" : "3 Year Warranty"
    }, {
      "default" : false,
      "id" : "003",
      "name" : "5 Year Warranty"
    } ]
  } ],
  "page_description" : "Backwoods, boundary waters, blue highways ā€” the GPS 60 is your trusted guide to the great outdoors. The GPS 60 and its counterpart, the GPSMAP 60, are packed with several of the features found in the 60-series colour navigators, but sport an affordable, high-resolution monochrome display for outdoor enthusiasts on a budget.",
  "page_keywords" : "Garmin",
  "page_title" : "Garmin GPS 60ā„¢ Portable GPS Unit",
  "primary_category_id" : "electronics-gps-units",
  "short_description" : "Backwoods, boundary waters, blue highways ā€” the GPS 60 is your trusted guide to the great outdoors. The GPS 60 and its counterpart, the GPSMAP 60, are packed with several of the features found in the 60-series colour navigators, but sport an affordable, high-resolution monochrome display for outdoor enthusiasts on a budget. ",
  "step_quantity" : 1,
  "type" : {
    "item" : true,
    "option" : true
  },
  ...
  "c_batteryLife" : "28 hours",
  "c_batteryType" : "Alkaline (AA)",
  "c_resolution" : "160 x 240",
  "c_tabDescription" : "Backwoods, boundary waters, blue highways ā€” the GPS 60 is your trusted guide to the great outdoors. The GPS 60 and its counterpart, the GPSMAP 60, are packed with several of the features found in the 60-series colour navigators, but sport an affordable, high-resolution monochrome display for outdoor enthusiasts on a budget."
}

Get product prices

Access product price information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/prices?locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
locale String The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/apple-ipod-touch/prices HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=300,must-revalidate

{
  "_v" : "23.2",
  "_type":"product",
  "brand" : "Apple",
  "currency" : "USD",
  "id" : "apple-ipod-touch",
  "long_description" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support Wi-Fi web browsing",
  "min_order_quantity" : 1,
  "name" : "Apple iPod Touch",
  "page_description" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "page_keywords" : "Apple, iPod, iPod Touch, MP3, Music Player, Video iPod",
  "page_title" : "Apple iPod Touch",
  "price" : 229.00,
  "price_max" : 399.00,
  "price_per_unit": 229.00,
  "price_per_unit_max": 399.00,
  "primary_category_id" : "electronics-digital-media-players",
  "short_description" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "step_quantity" : 1,
  "type" : {
    "master" : true
  },
  "unit_measure" : "each",
  "unit_quantity" : 1,
  "c_displaySize" : "3.5 inches",
  "c_resolution" : "480 x 320",
  "c_tabDescription" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "c_tabDetails" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support Wi-Fi web browsing"
}

Get product promotions

Access product promotion information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/promotions?currency={String}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
currency String The currency mnemonic specified for price  
locale String The locale context.The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/apple-ipod-nano/promotions HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate

{
  "_v" : "23.2",
  "_type":"product",
  "brand" : "Apple",
  "id" : "apple-ipod-nano",
  "long_description" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support",
  "min_order_quantity" : 1,
  "name" : "Apple iPod Nano",
  "page_description" : "The all new iPod nano has a curved aluminum and glass design and stunning new features. The Genius music feature helps you find music to fit your mood. With the built-in accelerometer, you can rotate the nano to flip through album art with Cover Flow. Plus, view photos and videos in either portrait or landscape.",
  "page_keywords" : "Apple, iPod, Nano, MP3, Music Player",
  "page_title" : "Apple iPod Nano",
  "primary_category_id" : "electronics-digital-media-players",
  "product_promotions" : [ {
    "callout_msg" : "Save 15% Off iPod Nano",
    "link" : "http://example.com/dw/shop/v23_2/promotions/15off-nano",
    "promotion_id" : "15off-nano"
  } ],
  "short_description" : "The all new iPod nano has a curved aluminum and glass design and stunning new features. The Genius music \r\nfeature helps you find music to fit your mood. With the built-in accelerometer, you can rotate the nano to flip through album art with \r\nCover Flow. Plus, view photos and videos in either portrait or landscape.",
  "step_quantity" : 1,
  "type" : {
    "master" : true
  },
  ...
  "c_batteryLife" : "24 hours",
  "c_batteryType" : "Lithium Ion",
  "c_displaySize" : "2 inches",
  "c_resolution" : "320 x 240",
  "c_tabDescription" : "The all new iPod nano has a curved aluminum and glass design and stunning new features. The Genius music feature helps you find music to fit your mood. With the built-in accelerometer, you can rotate the nano to flip through album art with Cover Flow. Plus, view photos and videos in either portrait or landscape.",
  "c_tabDetails" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support"
}

Get product recommendations

Access product recommendation information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/recommendations?recommendation_type={Integer}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
locale String The locale context.  
recommendation_type Integer    

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/apple-ipod-touch/recommendations HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate

{
  "_v" : "23.2",
  "_type":"product",
  "brand" : "Apple",
  "id" : "apple-ipod-touch",
  "long_description" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support Wi-Fi web browsing",
  "name" : "Apple iPod Touch",
  "page_description" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "page_keywords" : "Apple, iPod, iPod Touch, MP3, Music Player, Video iPod",
  "page_title" : "Apple iPod Touch",
  "primary_category_id" : "electronics-digital-media-players",
  "short_description" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "type" : {
    "master" : true
  },
  recommendations": [
    {
      "_type": "product_recommendation",
      "recommendation_type": 
      {
        "_type": "recommendation_type",
        "display_value": "Cross-Sell",
        "value": 1
      },
      "recommended_item_id": "apple-ipod-classic",
      "recommended_item_link": "https://example.com/dw/shop/v23_2/products/apple-ipod-classic"
    },
    {

      "_type": "product_recommendation",
      "recommendation_type": 
      {
        "_type": "recommendation_type",
        "display_value": "Up-Sell",
        "value": 2
      },
      "recommended_item_id": "apple-ipod-shuffle",
      "recommended_item_link": "https://example.com/dw/shop/v23_2/products/apple-ipod-shuffle"

    },
    {
      "_type": "product_recommendation",
      "recommendation_type": 
        {
            "_type": "recommendation_type",
            "display_value": "Cross-Sell",
            "value": 1
        },
        "recommended_item_id": "apple-ipod-nano",
        "recommended_item_link": "https://example.com/dw/shop/v23_2/products/apple-ipod-nano"
    }
],
  ...
  "c_batteryLife" : "36 Hours",
  "c_batteryType" : "Lithium Ion",
  "c_displaySize" : "3.5 inches",
  "c_resolution" : "480 x 320",
  "c_tabDescription" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "c_tabDetails" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support Wi-Fi web browsing"
}

Get set products

Access product set information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/set_products?locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
locale String The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/fall-look/set_products HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate

{
  "_v" : "23.2",
  "_type":"product",
  "id" : "fall-look",
  "long_description" : "Fall Look",
  "name" : "Fall Look",
  "primary_category_id" : "womens-outfits",
  "set_products" : [ {
    "id" : "013742003314",
    "name" : "Pink and Gold Necklace",
    "type" : {
      "variant" : true
    },
    "upc" : "013742003314"
  }, {
    "id" : "25592648",
    "long_description" : "You will love this floral tunic with embroidery! Perfect for Spring!",
    "name" : "Floral Tunic",
    "page_description" : "You will love this floral tunic with embroidery! Perfect for Spring!",
    "page_title" : "Floral Tunic",
    "primary_category_id" : "womens-clothing-tops",
    "short_description" : "You will love this floral tunic with embroidery! Perfect for Spring!",
    "type" : {
      "master" : true
    }
  }, {
    "id" : "25698039",
    "long_description" : "Classically designed, this straight leg pant is perfect to pair with the matching Salesforce Commerce Cloud Store jacket! ",
    "name" : "Straight Leg Pant.",
    "page_description" : "Classically designed, this straight leg pant is perfect to pair with the matching Salesforce Commerce Cloud Store jacket! ",
    "page_title" : "Straight Leg Pant.",
    "primary_category_id" : "womens-clothing-bottoms",
    "short_description" : "Classically designed, this straight leg pant is perfect to pair with the matching Salesforce Commerce Cloud Store jacket! ",
    "type" : {
      "master" : true
    }
  }, {
    "id" : "013742003314",
    "name" : "Pink and Gold Necklace",
    "type" : {
      "variant" : true
    },
    "upc" : "013742003314"
  }, {
    "id" : "25592648",
    "long_description" : "You will love this floral tunic with embroidery! Perfect for Spring!",
    "name" : "Floral Tunic",
    "page_description" : "You will love this floral tunic with embroidery! Perfect for Spring!",
    "page_title" : "Floral Tunic",
    "primary_category_id" : "womens-clothing-tops",
    "short_description" : "You will love this floral tunic with embroidery! Perfect for Spring!",
    "type" : {
      "master" : true
    }
  }, {
    "id" : "25698039",
    "long_description" : "Classically designed, this straight leg pant is perfect to pair with the matching Salesforce Commerce Cloud Store jacket! ",
    "name" : "Straight Leg Pant.",
    "page_description" : "Classically designed, this straight leg pant is perfect to pair with the matching Salesforce Commerce Cloud Store jacket! ",
    "page_title" : "Straight Leg Pant.",
    "primary_category_id" : "womens-clothing-bottoms",
    "short_description" : "Classically designed, this straight leg pant is perfect to pair with the matching Salesforce Commerce Cloud Store jacket! ",
    "type" : {
      "master" : true
    }
  } ],
  "short_description" : "Fall Look",
  "type" : {
    "set" : true
  },
  ...
}

Get applicable shipping methods for certain product

Retrieves the applicable shipping methods for a certain product.

Url

GET https://hostname:port/dw/shop/v23_2/products/{id}/shipping_methods

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
OAuth Authentication via OAuth token. A valid user is required.

Response Document

ShippingMethodResult

Path Parameters

Parameter Type Description Constraints
id String the requested product id minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

siteId (String)

Indicates that the product with the given id is unknown.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.shipping_methods.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the requested product id
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.shipping_methods.modifyGETResponse_v2

modifyGETResponse_v2 (product : Product , shippingMethodResultResponse : ShippingMethodResult ) : Status

Parameters:
product - the product the shipping methods result retrieved for.
shippingMethodResultResponse - shipping method result response
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/apple-ipod-touch/shipping_methods HTTP/1.1
Host: example.com
Authorization: Bearer af7f5c90-ffc1-4ea4-9613-f5b375b7dc19
Content-Type: application/json

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
Content-Type: application/json;charset=UTF-8

{
   "_v" : "23.2",
   "_type" : "shipping_method_result",
   "applicable_shipping_methods" : 
   [
      
      {
         "_type" : "shipping_method",
         "description" : "The default shipping method.",
         "id" : "DefaultShippingMethod",
         "name" : "Default Shipping Method"
      },
      
      {
         "_type" : "shipping_method",
         "description" : "The base shipping method.",
         "id" : "BaseShippingMethod",
         "name" : "Base Shipping Method"
      },
      
      {
         "_type" : "shipping_method",
         "description" : "A shipping method that contains product level shipping costs.",
         "id" : "ProductLevelShippingCostsShippingMethod",
         "name" : "Product Level Shipping Costs Shipping Method",
         "price" : 5.55
      }
   ]
}
# in case of validation failure:

RESPONSE:
HTTP/1.1 404 NOT FOUND
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache,no-store,must-revalidate

{
   "_v" : "23.2",
   "fault" : 
   {
      "arguments" : 
      {
         "productId" : "apple-ipod-touch",
         "siteId" : "SiteGenesis"
      },
      "type" : "ProductNotFoundException",
      "message" : "No product with ID 'apple-ipod-touch' for site 'SiteGenesis' was found."
   }
}

Get product variations

Access product variation information of products that are online and assigned to site catalog.

Url

GET http://hostname:port/dw/shop/v23_2/products/{id}/variations?locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The requested product id. maxLength=100

Query Parameters

Parameter Type Description Constraints
locale String The locale context.  

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product.beforeGET

beforeGET (productId : String ) : Status

The function is called before the request will be processed.

Parameters:
productId - the incoming product id from the URL.
Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product.modifyGETResponse

modifyGETResponse (scriptProduct : Product , doc : Product ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
scriptProduct - an instance of dw.catalog.Product
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/products/apple-ipod-touch/variations HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=900,must-revalidate

{
  "_v" : "23.2",
  "_type":"product",
  "brand" : "Apple",
  "id" : "apple-ipod-touch",
  "long_description" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support Wi-Fi web browsing",
  "master" : {
    "link" : "http://example.com/dw/shop/v23_2/products/apple-ipod-touch?pretty_print=true",
    "master_id" : "apple-ipod-touch"
  },
  "name" : "Apple iPod Touch",
  "page_description" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "page_keywords" : "Apple, iPod, iPod Touch, MP3, Music Player, Video iPod",
  "page_title" : "Apple iPod Touch",
  "primary_category_id" : "electronics-digital-media-players",
  "short_description" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "type" : {
    "master" : true
  },
  "variants" : [ {
    "link" : "http://example.com/dw/shop/v23_2/products/apple-ipod-touch-8gb?pretty_print=true",
    "product_id" : "apple-ipod-touch-8gb",
    "variation_values" : {
      "memorySize" : "8 GB"
    }
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/apple-ipod-touch-16gb?pretty_print=true",
    "product_id" : "apple-ipod-touch-16gb",
    "variation_values" : {
      "memorySize" : "16 GB"
    }
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/apple-ipod-touch32gb?pretty_print=true",
    "product_id" : "apple-ipod-touch32gb",
    "variation_values" : {
      "memorySize" : "32 GB"
    }
  } ],
  "variation_attributes" : [ {
    "id" : "memorySize",
    "name" : "Memory Size",
    "values" : [ {
      "name" : "1 GB",
      "value" : "1 GB"
    }, {
      "name" : "2 GB",
      "value" : "2 GB"
    }, {
      "name" : "8 GB",
      "value" : "8 GB"
    }, {
      "name" : "16 GB",
      "value" : "16 GB"
    }, {
      "name" : "32 GB",
      "value" : "32 GB"
    }, {
      "name" : "120 GB",
      "value" : "120 GB"
    } ]
  } ],
  ...
  "c_batteryLife" : "36 Hours",
  "c_batteryType" : "Lithium Ion",
  "c_displaySize" : "3.5 inches",
  "c_resolution" : "480 x 320",
  "c_tabDescription" : "Play music, watch video and surf the Internet with the touch of a finger. The revolutionary multitouch interface is easy to use and the built-in wi-fi comes with a Safari Web browser. Music, movies, games and the Internet ā€” with a built-in speaker and groundbreaking technologies such as accelerometer, and 3D graphics, iPod touch puts an amazing entertainment experience in the palm of your hand.",
  "c_tabDetails" : "Supports MP3 (up to 320 Kbps), MP3 VBR, AAC (up to 320 Kbps), Protected AAC (iTunes Music Store), Audible (formats 2, 3, 4), AIFF, Apple Lossless and WAV audio formats, plus BMP, JPEG, GIF, TIFF, PNG and PSD (Mac only) image formats; podcasting support Wi-Fi web browsing"
}
X OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.