Products Resource (Data API 16.6)

Summary

Http Method Resource Description
GET /Products/{Id} Action to get product information.

Get Product

Action to get product information.

Url

GET https://hostname:port/dw/data/v16_6/products/{id}?site_id={String}&expand={String}

Formats

json, xml

Response Document

Product

Path Parameters

Parameter Type Description Constraints
id String The product ID. minLength=1

Query Parameters

Parameter Type Description Constraints
expand String

The list of expansions that can be applied to the product. They are:

  • 'all' will retrieve all the product properties.
  • 'availability' will retrieve the following properties:
    • ats
    • in_stock
    • online
  • 'images' will retrieve the following properties:
    • image
  • 'prices' will retrieve the following properties:
    • price
    • price_currency
  • 'variations' will retrieve the following properties:
    • master
    • variation_attributes
    • variation_groups
    • variation_values
    • variants

Note that only variants with variation values are retrieved for a product of type variation master.

 
site_id String The site context.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
GET  /s/-/dw/data/v16.6/products/my-product?expand=availability&site_id=SiteGenesis HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8

# in case of success:
 
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Aug-2014 00:00:00 GMT
{
    "_v" : "16.6",
   "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
   "_type" : "product",
   "ats" : 500,
   "brand" : "Brand",
   "ean" : "EAN",
   "id" : "my-product",
   "in_stock" : true,
   "link" : "https://example.com/s/-/dw/data/v16.6/products/my-product",
   "long_description" : 
   {
      "default" : "Long Description"
   },
   "manufacturer_name" : "Manufacturer",
   "manufacturer_sku" : "Manufacturer ID",
   "name" : 
   {
      "default" : "My Product"
   },
   "online" : true,
   "online_flag" : 
   {
      "default" : true
   },
   "owning_catalog_id" : "my-catalog",
   "owning_catalog_name" : 
   {
      "default" : "My Catalog"
   },
   "page_description" : 
   {
      "default" : "Page description"
   },
   "page_keywords" : 
   {
      "default" : "Page Keyword"
   },
   "page_title" : 
   {
      "default" : "Page title"
   },
   "searchable" : 
   {
      "default" : true
   },
   "short_description" : 
   {
      "default" : "Short Description"
   },
   "type" : 
   {
      "_type" : "product_type",
      "bundle" : true,
      "bundled" : true,
      "part_of_product_set" : true
   },
   "unit" : "bnd",
   "upc" : "UPC"
}

# in case of 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: max-age=0,no-cache,no-store,must-revalidate
{
  "_v":"16.6",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-product' found."
  }
}
X OCAPI obsolete versions 13.x and 14.x will be end of life in 2020 and versions 15.x and 16.x in 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.