Products resource (Data API 23.2)

Summary

Http Method Resource Description
GET /products/{id} Action to get product information.
DELETE /products/{id} Deletes the product by ID
PUT /products/{id} Creates a product using the information provided. If a product exists with the same identifier, it is cleared and overwritten unless the request includes the header x-dw-validate-existing=true. Note that the following read-only attributes aren't replaced: assigned_categories, bundled_products, classification_category, creation_date, default_variant_id, image, image_groups, last_modified, owning_catalog_name, price_per_unit, primary_categories, primary_category_id, product_bundles, product_options, product_sets, set_products, type, variants, variation_attributes, variation_groups, and variation_values.
PATCH /products/{id} Update a product using the information provided. Fields that can be updated: name, page_description, long_descripton, page_title, page_keywords, brand, ean,upc, manufacture_sku, manufacture_name, searchable, unit, searchable, online_flag, default_variant_id, valid_to, valid_from, tax_class_id, localized_tax_class_id.
GET /products/{master_product_id}/variation_groups Reads variation groups for a product master.
GET /products/{master_product_id}/variation_groups/{id} Read a variation group for a product master.
PUT /products/{master_product_id}/variation_groups/{id} Assign a variation group for a product master. If the variation group product does not initially exist, one is created using the body passed in.
PATCH /products/{master_product_id}/variation_groups/{id} Update a variation group for a product master.
DELETE /products/{master_product_id}/variation_groups/{id} Unassign a variation group product from a product master. The variation group product is not deleted: it remains as a normal product after unsassign.
GET /products/{master_product_id}/variations Reads variation for a product master.
GET /products/{master_product_id}/variations/{id} Read a variation for a product master.
PUT /products/{master_product_id}/variations/{id} Assign a variation for a product master. If the variation product does not initially exist, one is created using the body passed in.
PATCH /products/{master_product_id}/variations/{id} Update a variation for a product master.
DELETE /products/{master_product_id}/variations/{id} Unassign a variation product from a product master. The variation product is not deleted: it remains as a normal product after unsassign.
GET /products/{product_id}/product_options Read local and shared product options of a product.
GET /products/{product_id}/product_options/{id} Read a local or shared product option of a product.
PUT /products/{product_id}/product_options/{id} Creates a local product option using the information provided or binds a shared product option to the product.
DELETE /products/{product_id}/product_options/{id} Deletes a local product option or unbinds a shared product option from the product.
PATCH /products/{product_id}/product_options/{id} Updates a local product option with the information provided.
GET /products/{product_id}/product_options/{option_id}/values Read local product option values of a local product option in a product.
GET /products/{product_id}/product_options/{option_id}/values/{id} Read a local product option value of a local product option in a product.
PUT /products/{product_id}/product_options/{option_id}/values/{id} Creates a local product option value using the information provided.
DELETE /products/{product_id}/product_options/{option_id}/values/{id} Deletes a local product option value by ID.
PATCH /products/{product_id}/product_options/{option_id}/values/{id} Updates a local product option value with the information provided.
GET /products/{product_id}/variation_attributes Reads variation attributes of a product of type variant or variation master or variation group.
GET /products/{product_id}/variation_attributes/{attribute_id}/values Reads variation attribute values of a variation attribute bound to a product.
GET /products/{product_id}/variation_attributes/{attribute_id}/values/{id} Action to get product variation attribute value information.
PUT /products/{product_id}/variation_attributes/{attribute_id}/values/{id} Action to create a product variation attribute value.
PATCH /products/{product_id}/variation_attributes/{attribute_id}/values/{id} Updates the variation attribute value of a variation attribute of a master product.
DELETE /products/{product_id}/variation_attributes/{attribute_id}/values/{id} Deletes the variation attribute value of a variation attribute bound to a master product
GET /products/{product_id}/variation_attributes/{id} Action to get variation attribute information only for master product.
PATCH /products/{product_id}/variation_attributes/{id} Updates the variation attribute with the specified information.
  • name
  • slicing
DELETE /products/{product_id}/variation_attributes/{id} Deletes a variation attribute by ID.
PUT /products/{product_id}/variation_attributes/{id} Creates a local variation attribute using the information provided. This endpoint can't create shared variation attributes. To create a shared variation attribute, use the catalogs resource.

Get Product

Action to get product information.

Url

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

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

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
    • image_groups
  • 'all_images' used with images will retrieve the following properties, including the images specified for its variants and variation groups:
    • image
    • image_groups
  • 'categories' will retrieve the following properties:
    • assigned_categories
    • primary_category
    • classification_category
  • 'options' will retrieve the following properties:
    • product_options
  • 'prices' will retrieve the following properties:
    • price
    • price_currency
  • 'variations' will retrieve the following properties:
    • master
    • variation_attributes
    • variation_groups
    • variation_values
    • variants
  • 'sets' will retrieve the following properties:
    • set_products
    • product_sets
  • 'bundles' will retrieve the following properties:
    • product_bundles
    • bundled_products
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/v23_2/products/my-product?expand=availability,prices&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" : "23.2",
   "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
   "_type" : "product",
   "ats" : 500,
   "brand" : "Brand",
   "ean" : "EAN",
   "id" : "my-product",
   "in_stock" : true,
   "link" : "https://example.com/s/-/dw/data/v23_2/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
   },
   "price" : 100.00,
   "price_currency" : "USD",
   "price_per_unit" : 100.00,
   "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",
   "unit_measure" : "each",
   "unit_quantity" : 1,
   "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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with ID 'my-product' was found."
  }
}

Delete Product

Deletes the product by ID

Url

DELETE https://hostname:port/dw/data/v23_2/products/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

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

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:
DELETE /s/-/dw/data/v23_2/products/product1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5

# in case of success:

RESPONSE:
HTTP/1.1 204 No Content

# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with ID 'my-product' was found."
  }
}

Create Product

Creates a product using the information provided. If a product exists with the same identifier, it is cleared and overwritten unless the request includes the header x-dw-validate-existing=true. Note that the following read-only attributes aren't replaced: assigned_categories, bundled_products, classification_category, creation_date, default_variant_id, image, image_groups, last_modified, owning_catalog_name, price_per_unit, primary_categories, primary_category_id, product_bundles, product_options, product_sets, set_products, type, variants, variation_attributes, variation_groups, and variation_values.

Url

PUT https://hostname:port/dw/data/v23_2/products/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

Product

Response Document

Product

Path Parameters

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

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductInvalidException

productId (String)

field (String)

detail (String)

Indicates the catalog is not provided in the request.
400 ProductDuplicateException

productId (String)

Indicate the product is already existed.
400 IdConflictException

bodyID (String)

urlID (String)

Indicates the ID in request URL does not match the ID in the product document.
404 CatalogNotFoundException

catalogId (String)

Indicates the catalog is not found.

Sample

REQUEST:
PUT /s/-/dw/data/v23_2/products/product1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
    "owning_catalog_id" : "WapiCatalog", 
    "id" : "product1"
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
    "_v" : "23.2",
    "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
    "_type": "product",
    "id" : "product1",
    "link": "https://example.com/s/-/dw/data/v23_2/products/product1",
    "online": false,
    "owning_catalog_id" : "WapiCatalog",
    "searchable": false
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"CatalogNotFoundException",
        "message":"No catalog with ID 'my-catalog' was found."
    }
}

Update Product

Update a product using the information provided. Fields that can be updated: name, page_description, long_descripton, page_title, page_keywords, brand, ean,upc, manufacture_sku, manufacture_name, searchable, unit, searchable, online_flag, default_variant_id, valid_to, valid_from, tax_class_id, localized_tax_class_id.

Url

PATCH https://hostname:port/dw/data/v23_2/products/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

Product

Response Document

Product

Path Parameters

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

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductDefaultVariantException

masterId (String)

variantId (String)

Indicates there is a problem to set default variant for a product.
400 IdConflictException

bodyID (String)

urlID (String)

Indicates the ID in request URL does not match the ID in the product document.
404 ProductNotFoundException

productId (String)

Indicates the product to be updated is not found.

Sample

REQUEST:
PATCH /s/-/dw/data/v23_2/products/product1 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
	"id" : "product1",
        "name" : 
        {
               "default" : "Product 1",
               "zh-CN" : "产品 1"
        }
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Content-Type: application/json; charset=UTF-8
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
   "_v" : "23.2",
   "_type" : "product",
   "_resource_state" : "cb8ba8f6173b517d36f8ccaa705a8072ed3369919b79c10c5b6afbfa4e1673ce",
   "id" : "product1”,
   "link" : "https://example.com/s/-/dw/data/v23_2/products/product1",
   "name" : 
        {
               "default" : "Product 1",
               "zh-CN" : "产品 1"
        }
   "online_flag" : 
   {
      "default" : false
   },
   "owning_catalog_id" : “testCatalog",
   "owning_catalog_name" : 
   {
      "default" : “Test Catalog"
   },
   "searchable" : 
   {
      "default" : false
   },
   "type" : 
   {
      "_type" : "product_type",
      "item" : true
   }
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type”:”ProductNotFoundException",
        "message":"No product with ID ‘product1’ found."
    }
}

Get Variation Groups

Reads variation groups for a product master.

Url

GET https://hostname:port/dw/data/v23_2/products/{master_product_id}/variation_groups?site_id={String}&start={Integer}&count={Integer}&select={String}&expand={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

VariationGroups

Path Parameters

Parameter Type Description Constraints
master_product_id String The id of the master product. minLength=1

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of variation groups to return (defaults to 25).  
expand String The valid expands are {price,availability}  
select String A selector that specifies the fields to return in the variation groups document.  
site_id String The site context.  
start Integer The start index of the variation groups to return (defaults to 0).  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates that the given product is not a variation master.
404 ProductNotFoundException

productId (String)

Indicates the master product is not found.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/my-product/variation_groups?count=20 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" : "23.2",
   "_type" : "variation_groups",
   "count" : 2,
   "data" : 
   [
      
      {
         "_type" : "variation_group",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-5",
         "product_id" : "my-product-5",
         "variation_values" : 
         {
            "color" : "red"
         }
      },
      
      {
         "_type" : "variation_group",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-6",
         "product_id" : "my-product-6",
         "variation_values" : 
         {
            "color" : "black"
         }
      }
   ],
   "start" : 0,
   "total" : 2
}

# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with ID 'my-product' was found."
  }
}

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" : "23.2",
  "fault":{
    "type":"ProductNotMasterException",
    "message":"Product 'my-product' is not a variation master product."
  }
}

Get Variation Group

Read a variation group for a product master.

Url

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

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

VariationGroup

Path Parameters

Parameter Type Description Constraints
id String The id of the variation group product. minLength=1
master_product_id String The id of the master product that contains the variation group. minLength=1

Query Parameters

Parameter Type Description Constraints
expand String The valid expands are {price,availability}  
site_id String    

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 ProductIsNotVariationGroupException

productId (String)

Indicates the product specified is not a variation group.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation group product cannot be found.
404 VariationGroupNotFoundException

masterProductId (String)

productId (String)

Indicates the product does not belong to the master product.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/my-product/variation_groups/my-variation-group HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
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" : "23.2",
   "_type" : "variationGroup",
   "product_id" : "my-variation-group",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/ExampleProduct/variation_groups/my-variation-group",
   "price": 10.50,
   "position": 4.0,
   "orderable" : true,
   "variation_values": {
       "color": "red",
       "size": "P"
   }
}
# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-product' found."
  }
}

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":"23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-variation-group' found."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
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" : "23.2",
  "fault":{
    "type":"ProductNotMasterException",
    "message":"Product 'my-product' is not a variation master product."
  }
}

Assign Variation Group

Assign a variation group for a product master. If the variation group product does not initially exist, one is created using the body passed in.

Url

PUT https://hostname:port/dw/data/v23_2/products/{master_product_id}/variation_groups/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

VariationGroup

Response Document

VariationGroup

Path Parameters

Parameter Type Description Constraints
id String The id of the variation group product. minLength=1
master_product_id String The id of the master product that contains the variation group. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 VariationValueNotValidException

productId (String)

invalidValues ([String, String])

Indicates the values passed are not valid for the variation attributes.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation group product cannot be found.
404 VariationAttributeValueNotFoundException

attrId (String)

value (String)

Indicates the value passed into a variation attribute is not one found in the valid values.

Sample

REQUEST:
PUT  https://example.com/s/-/dw/data/v23_2/products/my-product/variations_groups/my-variation-group HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
    "variation_values": {
        "color": "red",
        "size": "P"
    }
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 167
Content-Type: application/json; charset=UTF-8
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
   "_v" : "23.2",
   "_type" : "variationGroup",
   "product_id" : "my-variation-group",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/ExampleProduct/variation_groups/my-variation-group",
   "variation_values": {
       "color": "red",
       "size": "P"
   }
}
# in case of failure:

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-product' found."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-variation-group' found."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"VariationGroupNotFoundException",
    "message":"No variation group with id 'my-product' exists in master product 'my-variation-group'."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"VariationValueNotValidException",
    "message":"Product 'MyPetiteRedGroup' has an invalid value 'blue' for attribute 'color'."
  }
}

Update Variation Group

Update a variation group for a product master.

Url

PATCH https://hostname:port/dw/data/v23_2/products/{master_product_id}/variation_groups/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

VariationGroup

Response Document

VariationGroup

Path Parameters

Parameter Type Description Constraints
id String The id of the variation group product. minLength=1
master_product_id String The id of the master product that contains the variation group. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 ProductIsNotVariationGroupException

productId (String)

Indicates product specified is not a variation group.
400 VariationValueNotValidException

productId (String)

invalidValues ([String, String])

Indicates the values passed are not valid for the variation attributes.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation group product cannot be found.
404 VariationGroupNotFoundException

masterProductId (String)

productId (String)

Indicates the product does not belong to the master product.

Sample

REQUEST: 
PATCH  https://example.com/s/-/dw/data/v23_2/products/my-product/variations_groups/my-variation-group HTTP/1.1
Host: example.com 
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367 
{
    "variation_values": {
        "color": "blue"
    }
}

# in case of success: 

RESPONSE: 
HTTP/1.1 200 OK 
Content-Length: 167 
Content-Type: application/json; charset=UTF-8 
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5 
{
   "_v" : "23.2",
   "_type" : "variationGroup",
   "product_id" : "my-variation-group",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/ExampleProduct/variation_groups/my-variation-group",
   "price": 11.00,
   "orderable" : true,
   "variation_values": {
       "color": "blue",
       "size": "P"
   }
}
# in case of failure: 
  
RESPONSE: 
HTTP/1.1 400 Bad Request 
Content-Type: application/json;charset=UTF-8 
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate 
{ 
  "_v" : "23.2",
  "fault":{ 
    "type":"ProductNotFoundException", 
    "message":"No product with id 'my-product' found."
  } 
} 

RESPONSE: 
HTTP/1.1 400 Bad Request 
Content-Type: application/json;charset=UTF-8 
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate 
{ 
  "_v" : "23.2",
  "fault":{ 
    "type":"ProductNotFoundException", 
    "message":"No product with id 'my-variation-group' found."
  } 
} 

RESPONSE: 
HTTP/1.1 400 Bad Request 
Content-Type: application/json;charset=UTF-8 
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate 
{ 
  "_v" : "23.2",
  "fault":{ 
    "type":"VariationGroupNotFoundException", 
    "message":"No variation group with id 'my-product' exists in master product 'my-variation-group'."
  } 
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"VariationValueNotValidException",
    "message":"Product 'MyPetiteRedGroup' has an invalid value 'blue' for attribute 'color'."
  }
}

Unassign Variation Group

Unassign a variation group product from a product master. The variation group product is not deleted: it remains as a normal product after unsassign.

Url

DELETE https://hostname:port/dw/data/v23_2/products/{master_product_id}/variation_groups/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

Parameter Type Description Constraints
id String   minLength=1
master_product_id String   minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 ProductIsNotVariationGroupException

productId (String)

Indicates product specified is not a variation group.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation group product cannot be found.
404 VariationGroupNotFoundException

masterProductId (String)

productId (String)

Indicates the product does not belong to the master product.

Sample

REQUEST:
DELETE  /s/-/dw/data/v23_2/products/my-product/variation_groups/my-variation-group HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
Content-Type: application/json; charset=UTF-8

# in case of success:

RESPONSE:
HTTP/1.1 204 No Content

# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-product' found."
  }
}

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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-variation-group' found."
  }
}


RESPONSE:
HTTP/1.1 400 Bad Request
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" : "23.2",
  "fault":{
    "type":"ProductNotMasterException",
    "message":"Product 'my-product' is not a variation master product."
  }
}

Get Variations

Reads variation for a product master.

Url

GET https://hostname:port/dw/data/v23_2/products/{master_product_id}/variations?site_id={String}&start={Integer}&count={Integer}&select={String}&expand={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

Variants

Path Parameters

Parameter Type Description Constraints
master_product_id String The id of the master product. minLength=1

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of variations to return (defaults to 25).  
expand String The valid expands are {price,availability}  
select String A selector that specifies the fields to return in the variations document.  
site_id String The site context.  
start Integer The start index of the variations to return (defaults to 0).  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates that the given product is not a variation master.
404 ProductNotFoundException

productId (String)

Indicates the master product is not found.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/my-product/variations?count=20 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" : "23.2",
   "_type" : "variants",
   "count" : 9,
   "data" : 
   [
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-1",
         "product_id" : "my-product-1",
         "variation_values" : 
         {
            "color" : "red",
            "size" : "S"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-2",
         "product_id" : "my-product-2",
         "variation_values" : 
         {
            "color" : "red",
            "size" : "M"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-3",
         "product_id" : "my-product-3",
         "variation_values" : 
         {
            "color" : "red",
            "size" : "L"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-4",
         "product_id" : "my-product-4",
         "variation_values" : 
         {
            "color" : "blue",
            "size" : "S"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-5",
         "product_id" : "my-product-5",
         "variation_values" : 
         {
            "color" : "blue",
            "size" : "M"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-6",
         "product_id" : "my-product-6",
         "variation_values" : 
         {
            "color" : "blue",
            "size" : "L"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-7",
         "product_id" : "my-product-7",
         "variation_values" : 
         {
            "color" : "black",
            "size" : "S"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-8",
         "product_id" : "my-product-8",
         "variation_values" : 
         {
            "color" : "black",
            "size" : "M"
         }
      },
      
      {
         "_type" : "variant",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product-9",
         "product_id" : "my-product-9",
         "variation_values" : 
         {
            "color" : "black",
            "size" : "L"
         }
      }
   ],
   "start" : 0,
   "total" : 9
}

# 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" : "23.2",
  "fault":{
    "type":"ProductNotMasterGroupException",
    "message":"Product 'my-product' is neither a variation master product nor a variation group product."
  }
}

Get Variation

Read a variation for a product master.

Url

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

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

Variant

Path Parameters

Parameter Type Description Constraints
id String The id of the variation product. minLength=1
master_product_id String The id of the master product that contains the variation. minLength=1

Query Parameters

Parameter Type Description Constraints
expand String The valid expands are {variation,attributes,availability,prices}  
site_id String    

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 ProductIsNotVariationException

productId (String)

Indicates the product specified is not a variation.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation product cannot be found.
404 VariationNotFoundException

masterProductId (String)

productId (String)

Indicates the product does not belong to the master product.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/my-product/variation/my-variation HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
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" : "23.2",
   "_type" : "variant",
   "product_id" : "my-variation",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/ExampleProduct/variation/my-variation",
   "price": 10.50,
   "position": 4.0,
   "orderable" : true,
   "variation_values": {
       "color": "red",
       "size": "P"
   }
}
# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-product' found."
  }
}

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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-variation' found."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
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" : "23.2",
  "fault":{
    "type":"ProductNotMasterException",
    "message":"Product 'my-product' is not a variation master product."
  }
}

Assign Variation

Assign a variation for a product master. If the variation product does not initially exist, one is created using the body passed in.

Url

PUT https://hostname:port/dw/data/v23_2/products/{master_product_id}/variations/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

Variant

Response Document

Variant

Path Parameters

Parameter Type Description Constraints
id String The id of the variation product. minLength=1
master_product_id String The id of the master product that contains the variation. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 VariationValueNotValidException

productId (String)

invalidValues ([String, String])

Indicates the values passed are not valid for the variation attributes.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation product cannot be found.
404 VariationAttributeValueNotFoundException

attrId (String)

value (String)

Indicates the value passed into a variation attribute is not one found in the valid values.

Sample

REQUEST:
PUT  https://example.com/s/-/dw/data/v23_2/products/my-product/variations/my-variation HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
    "variation_values": {
        "color": "red",
        "size": "P"
    }
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 167
Content-Type: application/json; charset=UTF-8
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
   "_v" : "23.2",
   "_type" : "variant",
   "product_id" : "my-variation",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/ExampleProduct/variation/my-variation",
   "variation_values": {
       "color": "red",
       "size": "P"
   }
}
# in case of failure:

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-product' found."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-variation' found."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"VariationNotFoundException",
    "message":"No variation with id 'my-product' exists in master product 'my-variation'."
  }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"VariationValueNotValidException",
    "message":"Product 'my-variation' has an invalid value 'blue' for attribute 'color'."
  }
}

Update Variation

Update a variation for a product master.

Url

PATCH https://hostname:port/dw/data/v23_2/products/{master_product_id}/variations/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

Variant

Response Document

Variant

Path Parameters

Parameter Type Description Constraints
id String The id of the variation product. minLength=1
master_product_id String The id of the master product that contains the variation. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 ProductIsNotVariationException

productId (String)

Indicates product specified is not a variation.
400 VariationValueNotValidException

productId (String)

invalidValues ([String, String])

Indicates the values passed are not valid for the variation attributes.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation product cannot be found.
404 VariationNotFoundException

masterProductId (String)

productId (String)

Indicates the product does not belong to the master product.

Sample

REQUEST: 
PATCH  https://example.com/s/-/dw/data/v23_2/products/my-product/variations/my-variation HTTP/1.1
Host: example.com 
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367 
{
    "variation_values": {
        "color": "blue"
    }
}

# in case of success: 

RESPONSE: 
HTTP/1.1 200 OK 
Content-Length: 167 
Content-Type: application/json; charset=UTF-8 
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5 
{
   "_v" : "23.2",
   "_type" : "variant",
   "product_id" : "my-variation",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/ExampleProduct/variation/my-variation",
   "price": 11.00,
   "orderable" : true,
   "variation_values": {
       "color": "blue",
       "size": "P"
   }
}
# in case of failure: 
  
RESPONSE: 
HTTP/1.1 400 Bad Request 
Content-Type: application/json;charset=UTF-8 
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate 
{ 
  "_v" : "23.2",
  "fault":{ 
    "type":"ProductNotFoundException", 
    "message":"No product with id 'my-product' found."
  } 
} 

RESPONSE: 
HTTP/1.1 400 Bad Request 
Content-Type: application/json;charset=UTF-8 
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate 
{ 
  "_v" : "23.2",
  "fault":{ 
    "type":"ProductNotFoundException", 
    "message":"No product with id 'my-variation' found."
  } 
} 

RESPONSE: 
HTTP/1.1 400 Bad Request 
Content-Type: application/json;charset=UTF-8 
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate 
{ 
  "_v" : "23.2",
  "fault":{ 
    "type":"VariationNotFoundException",
    "message":"No variation with id 'my-product' exists in master product 'my-variation'."
  } 
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
  "_v" : "23.2",
  "fault":{
    "type":"VariationValueNotValidException",
    "message":"Product 'my-variation' has an invalid value 'blue' for attribute 'color'."
  }
}

Unassign Variation Product

Unassign a variation product from a product master. The variation product is not deleted: it remains as a normal product after unsassign.

Url

DELETE https://hostname:port/dw/data/v23_2/products/{master_product_id}/variations/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

Parameter Type Description Constraints
id String   minLength=1
master_product_id String   minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product id does not represent a master product.
400 ProductIsNotVariationException

productId (String)

Indicates product specified is not a variation.
404 ProductNotFoundException

productId (String)

Indicates either the master product or the variation product cannot be found.
404 VariationNotFoundException

masterProductId (String)

productId (String)

Indicates the product does not belong to the master product.

Sample

REQUEST:
DELETE  /s/-/dw/data/v23_2/products/my-product/variations/my-variation HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
Content-Type: application/json; charset=UTF-8

# in case of success:

RESPONSE:
HTTP/1.1 204 No Content

# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-product' found."
  }
}

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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'my-variation' found."
  }
}


RESPONSE:
HTTP/1.1 400 Bad Request
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" : "23.2",
  "fault":{
    "type":"ProductNotMasterException",
    "message":"Product 'my-product' is not a variation master product."
  }
}

Get Local and Shared Product Options

Read local and shared product options of a product.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/product_options?start={Integer}&count={Integer}&select={String}&currency={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

ProductOptions

Path Parameters

Parameter Type Description Constraints
product_id String The id of the product. minLength=1

Query Parameters

Parameter Type Description Constraints
count Integer Optional count for retrieving only a subset of the items (default is 25).  
currency String The currency mnemonic for retrieving the product option values according to the sorting mode.ex:'USD'  
select String The property selector.  
start Integer Optional start index for retrieving the items from a given index (default 0).  

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/v23_2/products/my-product/product_options?count=5&currency=USD HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
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" : "23.2",
   "_type" : "product_options",
   "count" : 2,
   "data" :
   [

      {
         "_type" : "product_option",
         "custom_name" :
         {
            "default" : "Shared Service"
         },
         "default_product_option_value" : "S00",
         "description" :
         {
            "default" : "Service description"
         },
         "id" : "service",
         "image" :
         {
            "_type" : "media_file",
            "abs_url" : "https://example.com/on/demandware.static/-/Sites-my-catalog/default/aaaaaaaabbbbbbbbbabababba/Desert.jpg",
            "dis_base_url" : "https://example.com/dw/image/v2/zzzz_s01/on/demandware.static/-/Sites-my-catalog/default/aaaaaaaabbbbbbbbbabababba/Desert.jpg",
            "path" : "Desert.jpg"
         },
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/service",
         "name" : "Shared Service",
         "shared" : false,
         "sorting_mode" : "byexplicitorder",
         "values" :
         [

            {
               "_type" : "product_option_value",
               "id" : "S00",
               "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/service/Values/S00",
               "sku_extension" : "S00",
               "value" :
               {
                  "default" : "None"
               }
            },

            {
               "_type" : "product_option_value",
               "id" : "S01",
               "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/service/Values/S01",
               "option_price" :
               {
                  "USD" : "9.99"
               },
               "sku_extension" : "S01",
               "value" :
               {
                  "default" : "1-year"
               }
            },

            {
               "_type" : "product_option_value",
               "id" : "S02",
               "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/service/Values/S02",
               "option_price" :
               {
                  "USD" : "19.99"
               },
               "sku_extension" : "S02",
               "value" :
               {
                  "default" : "2-year"
               }
            }
         ]
      },

      {
         "_type" : "product_option",
         "custom_name" :
         {
            "default" : "Extended Warranty"
         },
         "default_product_option_value" : "000",
         "id" : "warranty",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/warranty",
         "name" : "Extended Warranty",
         "shared" : false,
         "sorting_mode" : "byoptionprice",
         "values" :
         [

            {
               "_type" : "product_option_value",
               "id" : "001",
               "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/warranty/Values/001",
               "option_price" :
               {
                  "USD" : "9.99"
               },
               "value" :
               {
                  "default" : "1 Year Warranty"
               }
            },

            {
               "_type" : "product_option_value",
               "id" : "003",
               "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/warranty/Values/003",
               "option_price" :
               {
                  "USD" : "29.99"
               },
               "value" :
               {
                  "default" : "5 Year Warranty"
               }
            },

            {
               "_type" : "product_option_value",
               "id" : "000",
               "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/warranty/Values/000",
               "option_price" :
               {
                 "USD" : "39.99"
               },
               "value" :
               {
                  "default" : "None"
               }
            },

            {
               "_type" : "product_option_value",
               "id" : "002",
               "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/warranty/Values/002",
               "option_price" :
               {
                  "USD" : "49.99"
               },
               "value" :
               {
                  "default" : "3 Year Warranty"
               }
            }
         ]
      }
   ],
   "select" : "(**)",
   "start" : 0,
   "total" : 2
}
# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No Product with id 'my-product' found."
    }
}

Get Local or Shared Product Option

Read a local or shared product option of a product.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{id}?currency={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

ProductOption

Path Parameters

Parameter Type Description Constraints
id String The id of the local or shared product option. minLength=1
product_id String The id of the product. minLength=1

Query Parameters

Parameter Type Description Constraints
currency String The currency mnemonic for retrieving the product option values according to the sorting mode.ex:'USD'  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local or shared product option is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/my-product/product_options/option15&currency=USD HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
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" : "23.2",
   "_type" : "product_option",
   "_resource_state" : "a12bf03699b41b44ef3491dc40ada6b1f67dd6da3f5f15ecbba3a80018ccc0ba",
   "custom_name" :
   {
      "default" : "Option 15"
   },
   "description" :
   {
      "default" : "Description for Option 15"
   },
   "id" : "option15",
   "image" :
   {
      "_type" : "media_file",
      "abs_url" : "https://example.com/on/demandware.static/-/Sites-my-catalog/default/aaaaaaaabbbbbbbbbabababba/Desert.jpg",
      "dis_base_url" : "https://example.com/dw/image/v2/zzzz_s01/on/demandware.static/-/Sites-my-catalog/default/aaaaaaaabbbbbbbbbabababba/Desert.jpg",
      "path" : "Desert.jpg"
   },
   "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/option15",
   "name" : "15",
   "shared" : false,
   "sorting_mode" : "byoptionprice",
   "values" :
   [

      {
         "_type" : "product_option_value",
         "id" : "10",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/option15/Values/10",
         "option_price" :
         {
           "USD" : "9.99"
         },
         "sku_extension" : "12",
         "value" :
         {
            "default" : "12"
         }
      },

      {
         "_type" : "product_option_value",
         "id" : "121",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/option15/Values/121",
         "option_price" :
         {
           "USD" : "19.99"
         },
         "sku_extension" : "12",
         "value" :
         {
            "default" : "12"
         }
      }
   ]
}

# in case of failure:

RESPONSE:

HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

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" : "23.2",
  "fault":{
    "type":"ProductOptionNotFoundException",
    "message":"Can't find product option with option id 'option15' in 'my-product'."
  }
}

Create Local Product Option, Bind Shared Product Option

Creates a local product option using the information provided or binds a shared product option to the product.

Url

PUT https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

ProductOption

Response Document

ProductOption

Path Parameters

Parameter Type Description Constraints
id String The id of the local or shared product option. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductOptionCreateException

optionID (String)

productId (String)

Indicates the local product option cannot be created for a product of type variation group.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
PUT /s/-/dw/data/v23_2/products/my-product/product_options/my-option HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
{
   "id":"my-option",
   "custom_name" :
   {
      "default" : "My Option"
   },
   "description" :
   {
      "default" : "Description for my option."
   },
   "image" :
   {
      "_type" : "media_file",
      "path" : "option.jpg"
   }
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
   "_v" : "23.2",
   "_type" : "product_option",
   "_resource_state" : "89c79bffb963ddf3a9b8e0df18.7195b1e4d68f33192fceac7aedaea149dbcfd",
   "custom_name" :
   {
      "default" : "My Option"
   },
   "description" :
   {
      "default" : "Description for my option."
   },
   "id" : "my-option",
   "image" :
   {
      "_type" : "media_file",
      "abs_url" : "https://example.com/on/demandware.static/-/Sites-XSite/default/aaaaaaaabbbbbbbbbabababba/option.jpg",
      "dis_base_url" : "https://example.com/dw/image/v2/zzzz_s01/on/demandware.static/-/Sites-XSite/default/aaaaaaaabbbbbbbbbabababba/option.jpg",
      "path" : "option.jpg"
   },
   "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/my-option",
   "name" : "option",
   "shared" : false,
   "sorting_mode" : "byoptionprice"
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductOptionCreateException",
        "message":"The product option with ID 'my-option' for product ID 'my-product' of type variation group could not be created."
    }
}

Delete Local Product Option, Unbind Shared Product Option

Deletes a local product option or unbinds a shared product option from the product.

Url

DELETE https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

Parameter Type Description Constraints
id String The id of the local or shared product option.  
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local or shared product option is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
DELETE /s/-/dw/data/v23_2/products/my-product/product_options/service HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5

# in case of success:

RESPONSE:
HTTP/1.1 204 No Content

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

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" : "23.2",
    "fault":{
        "type":"ProductOptionNotFoundException",
        "message":"Can't find product option with option id 'service' in 'my-product'.""
    }
}

Update Product Option

Updates a local product option with the information provided.

Url

PATCH https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

ProductOption

Response Document

ProductOption

Path Parameters

Parameter Type Description Constraints
id String The id of the local product option. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductOptionUpdateException

attrId (String)

Indicates the shared product option cannot be updated.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local product option is not found.

Sample

REQUEST:
PATCH /s/-/dw/data/v23_2/products/my-product/product_options/option16 HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
{
   "id" : "option16",
   "custom_name" :
   {
      "default" : "12831431794"
   },
   "description" :
   {
      "default" : "1267136813791"
   },
   "sorting_mode":"byexplicitorder",
   "image" :
   {
      "_type" : "media_file",
      "path" : "Desert21312.jpg"
   }

}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
   "_v" : "23.2",
   "_type" : "product_option",
   "_resource_state" : "b40050fbf5f2dd5e997a110bfc9e893326daed8dc7a1ad7010c81ee513a33134",
   "custom_name" :
   {
      "default" : "12831431794"
   },
   "description" :
   {
      "default" : "1267136813791"
   },
   "id" : "option16",
   "image" :
   {
      "_type" : "media_file",
      "abs_url" : "https://example.com/on/demandware.static/-/Sites-my-catalog/default/aaaaaaaabbbbbbbbbabababba/Desert21312.jpg",
      "dis_base_url" : "https://example.com/dw/image/v2/zzzz_s01/on/demandware.static/-/Sites-my-catalog/default/aaaaaaaabbbbbbbbbabababba/Desert21312.jpg",
      "path" : "Desert21312.jpg"
   },
   "link" : "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/option16",
   "name" : "12831431794",
   "shared" : false,
   "sorting_mode" : "byexplicitorder"
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductOptionNotFoundException",
        "message":"Can't find product option with option id 'option16' in 'my-product'."
    }
}

Get Local Product Option Values

Read local product option values of a local product option in a product.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{option_id}/values?start={Integer}&count={Integer}&select={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

ProductOptionValues

Path Parameters

Parameter Type Description Constraints
option_id String The id of the local product option. minLength=1
product_id String The id of the product. minLength=1

Query Parameters

Parameter Type Description Constraints
count Integer Optional count for retrieving only a subset of the items (default is 25).  
select String The property selector.  
start Integer Optional start index for retrieving the items from a given index (default 0).  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local product option is not found.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/my-product/product_options/my-option/values?count=5 HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
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" : "23.2",
    "_type": "product_option_values",
    "count": 3,
    "data": [
        {
            "_type": "product_option_value",
            "default_product_option_value": true,
            "id": "value1",
            "link": "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1",
            "sku_extension": "S00",
            "value": {
                "default": "None",
                "en": "None (en)"
            }
        },
        {
            "_type": "product_option_value",
            "default_product_option_value": false,
            "id": "value2",
            "link": "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value2",
            "option_prices": [
                {
                    "_type": "money",
                    "currency_mnemonic": "USD",
                    "value": 9.99
                }
            ],
            "sku_extension": "S01",
            "value": {
                "default": "1-year",
                "en": "1-year (en)"
            }
        },
        {
            "_type": "product_option_value",
            "default_product_option_value": false,
            "id": "value3",
            "link": "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value3",
            "option_prices": [
                {
                    "_type": "money",
                    "currency_mnemonic": "USD",
                    "value": 19.99
                }
            ],
            "sku_extension": "S02",
            "value": {
                "default": "2-year",
                "en": "2-year (en)"
            }
        }
    ],
    "select": "(**)",
    "start": 0,
    "total": 3
}
# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

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" : "23.2",
    "fault":{
        "type":"ProductOptionNotFoundException",
        "message":"Can't find product option with option id 'my-option' in 'my-product'."
    }
}

Get Local Product Option Value

Read a local product option value of a local product option in a product.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{option_id}/values/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

ProductOptionValue

Path Parameters

Parameter Type Description Constraints
id String the id of local product option value. minLength=1
option_id String The id of the local product option. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local product option is not found.
404 ProductOptionValueNotFoundException

productOptionID (String)

productOptionValueID (String)

Indicates the local product option value is not found.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1 HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
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" : "23.2",
    "_type": "product_option_value",
    "default_product_option_value": false,
    "id": "value1",
    "link": "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1",
    "option_prices": [
        {
            "_type": "money",
            "currency_mnemonic": "USD",
            "value": 9.99
        }
    ],
    "sku_extension": "S01",
    "value": {
        "default": "1-year",
        "en": "1-year (en)"
    }
}

# in case of failure:

RESPONSE:

HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

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" : "23.2",
  "fault":{
    "type":"ProductOptionNotFoundException",
    "message":"Can't find product option with option id 'my-option' in 'my-product'."
  }
}

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" : "23.2",
    "fault":{
        "type":"ProductOptionValueNotFoundException",
        "message":"Can't find product option value with id 'value1' in product option id 'my-option'."
    }
}

Create Local Product Option Value

Creates a local product option value using the information provided.

Url

PUT https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{option_id}/values/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

ProductOptionValue

Response Document

ProductOptionValue

Path Parameters

Parameter Type Description Constraints
id String The id of the local product option value. minLength=1
option_id String The id of the local product option. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local product option is not found.

Sample

REQUEST:
PUT /s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1 HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
{
    "value": {
        "default": "value 1",
        "en": "value 1(en)",
        "en-US": "value 1(en-US)"
    },
    "option_price": {
        "currency_mnemonic": "USD",
        "value": 100
    },
    "sku_extension": "s10"
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
    "_v" : "23.2",
    "_type": "product_option_value",
    "default_product_option_value": false,
    "id": "value1",
    "link": "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1",
    "option_prices": [
        {
            "_type": "money",
            "currency_mnemonic": "USD",
            "value": 100.00
        }
    ],
    "sku_extension": "s10",
    "value": {
        "default": "value 1",
        "en-US": "value 1(en-US)",
        "en": "value 1(en)"
    }
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductOptionNotFoundException",
        "message":"Can't find product option with option id 'my-option' in 'my-product'."
    }
}

Delete Local Product Option Value

Deletes a local product option value by ID.

Url

DELETE https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{option_id}/values/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

Parameter Type Description Constraints
id String The id of the local product option value.  
option_id String The id of the local product option. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local product option is not found.
404 ProductOptionValueNotFoundException

productOptionID (String)

productOptionValueID (String)

Indicates the local product option value is not found.

Sample

REQUEST:
DELETE /s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1 HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5

# in case of success:

RESPONSE:
HTTP/1.1 204 No Content

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

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" : "23.2",
    "fault":{
        "type":"ProductOptionNotFoundException",
        "message":"Can't find product option with option id 'my-option' in 'my-product'."
    }
}

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" : "23.2",
    "fault":{
        "type":"ProductOptionValueNotFoundException",
        "message":"Can't find product option value with id 'value1' in product option id 'my-option.'"
    }
}

Update Local Product Option Value

Updates a local product option value with the information provided.

Url

PATCH https://hostname:port/dw/data/v23_2/products/{product_id}/product_options/{option_id}/values/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

ProductOptionValue

Response Document

ProductOptionValue

Path Parameters

Parameter Type Description Constraints
id String The id of the local product option value. minLength=1
option_id String The id of the local product option. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 ProductOptionNotFoundException

productOptionID (String)

id (String)

Indicates the local product option is not found.
404 ProductOptionValueNotFoundException

productOptionID (String)

productOptionValueID (String)

Indicates the local product option value is not found.

Sample

REQUEST:
PATCH /s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1 HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaaa-dddd-cccc-eeee-aaaaaaaa
{
    "value": {
        "default": "value 10",
        "en": "value 10(en)",
        "en-US": "value 10(en-US)"
    },
    "option_price": {
        "currency_mnemonic": "AFN",
        "value": 100
    },
    "sku_extension": "s10"
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
    "_v" : "23.2",
    "_type": "product_option_value",
    "default_product_option_value": false,
    "id": "my-option",
    "link": "https://example.com/s/-/dw/data/v23_2/products/my-product/product_options/my-option/values/value1",
    "option_prices": [
        {
            "_type": "money",
            "currency_mnemonic": "AFN",
            "value": 100.00
        }
    ],
    "sku_extension": "s10",
    "value": {
        "default": "value 10",
        "en-US": "value 10(en-US)",
        "en": "value 10(en)"
    }
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductNotFoundException",
        "message":"No product with id 'my-product' found."
    }
}

HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"ProductOptionNotFoundException",
        "message":"Can't find product option with option id 'my-option' in 'my-product'."
    }
}

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" : "23.2",
    "fault":{
        "type":"ProductOptionValueNotFoundException",
        "message":"Can't find product option value with id 'value1' in product option id 'my-option'.
        "
    }
}

Get Variation Attributes

Reads variation attributes of a product of type variant or variation master or variation group.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes?start={Integer}&count={Integer}&select={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

VariationAttributes

Path Parameters

Parameter Type Description Constraints
product_id String The product ID of a variant or a variation master or a variation group. minLength=1

Query Parameters

Parameter Type Description Constraints
count Integer    
select String    
start Integer    

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/v23_2/products/my-product/variation_attributes?count=20 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" : "23.2",
   "_type" : "variation_attributes",
   "count" : 3,
   "data" : 
   [
      
      {
         "_type" : "variation_attribute",
         "id" : "fabric",
         "name" : 
         {
            "default" : "Fabric"
         },
         "values" : 
         [
            
            {
               "_type" : "variation_attribute_value",
               "name" : 
               {
                  "default" : "Leather"
               },
               "value" : "leather"
            },
            
            {
               "_type" : "variation_attribute_value",
               "name" : 
               {
                  "default" : "Linen"
               },
               "value" : "linen"
            },
            
            {
               "_type" : "variation_attribute_value",
               "name" : 
               {
                  "default" : "Plastic"
               },
               "value" : "plastic"
            },
            
            {
               "_type" : "variation_attribute_value",
               "name" : 
               {
                  "default" : "Metal"
               },
               "value" : "metal"
            }
         ]
      },
      
      {
         "_type" : "variation_attribute",
         "id" : "color",
         "name" : 
         {
            "default" : "Color"
         },
         "values" : 
         [
            
            {
               "_type" : "variation_attribute_value",
               "name" : 
               {
                  "default" : "Red"
               },
               "value" : "red"
            },
            
            {
               "_type" : "variation_attribute_value",
               "name" : 
               {
                  "default" : "Blue"
               },
               "value" : "blue"
            },
            
            {
               "_type" : "variation_attribute_value",
               "name" : 
               {
                  "default" : "Black"
               },
               "value" : "black"
            }
         ]
      },
      
      {
         "_type" : "variation_attribute",
         "id" : "size",
         "name" : 
         {
            "default" : "Size"
         },
         "values" : 
         [
            
            {
               "_type" : "variation_attribute_value",
               "description" : 
               {
                  "default" : "Small"
               },
               "name" : 
               {
                  "default" : "Small"
               },
               "value" : "S"
            },
            
            {
               "_type" : "variation_attribute_value",
               "description" : 
               {
                  "default" : "Medium"
               },
               "name" : 
               {
                  "default" : "Medium"
               },
               "value" : "M"
            },
            
            {
               "_type" : "variation_attribute_value",
               "description" : 
               {
                  "default" : "Large"
               },
               "name" : 
               {
                  "default" : "Large"
               },
               "value" : "L"
            }
         ]
      }
   ],
   "start" : 0,
   "total" : 3
}

# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with ID 'my-product' was found."
  }
}

Get Product Variation Attribute Values

Reads variation attribute values of a variation attribute bound to a product.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{attribute_id}/values?site_id={String}&start={Integer}&count={Integer}&select={String}&expand={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

VariationAttributeValues

Path Parameters

Parameter Type Description Constraints
attribute_id String The variation attribute ID that contains the values. minLength=1
product_id String id of the product minLength=1

Query Parameters

Parameter Type Description Constraints
count Integer the number of records to get  
expand String set of expands to retrieve additional information: {availability, image}  
select String a string that specifies which fields to return (default is all).  
site_id String    
start Integer the first record to get in the page  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 VariationAttributeNotFoundException

attrId (String)

If the attribute id specified is not a valid product attribute.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values HTTP/1.1
Host: example.com
Authorization: Bearer cccccccc-dddd-aaaa-ffff-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" : "23.2",
   "_type" : "variation_attribute_values",
   "count" : 3,
   "data" : 
   [ 
      {
         "_type" : "variation_attribute_value",
         "value" : "red",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/red"
      },
      
      {
         "_type" : "variation_attribute_value",
         "value" : "blue",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/blue"
      },
      
      {
         "_type" : "variation_attribute_value",
         "value" : "black",
         "link" : "https://example.com/s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/black"
      }
   ],
   "select" : "(*,data.(value,link))",
   "start" : 0,
   "total" : 3
}

# 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" : "23.2",
    "fault":{
        "type”:”ProductNotFoundException",
        "message":"No product with id ‘master_product_1’ found."
    }
}

Get Product Variation Attribute Value

Action to get product variation attribute value information.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{attribute_id}/values/{id}?site_id={String}&expand={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

VariationAttributeValue

Path Parameters

Parameter Type Description Constraints
attribute_id String The variation attribute custom ID minLength=1
id String The id of the variation attribute value minLength=1
product_id String The master product ID. minLength=1

Query Parameters

Parameter Type Description Constraints
expand String set of expands to retrieve additional information: {availability, image}  
site_id String The site context.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 VariationAttributeValueNotFoundException

attrId (String)

value (String)

If the value id specified is not a valid value id.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/a-master-product/variation_attributes/color/values/white HTTP/1.1
Host: example.com
Authorization: Bearer aaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
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
x-dw-resource-state: 43c2d7a118bd0a4034399ed86c86654b40c198ea64fd3195e5587d9211d10d7e
{
   "_v" : "23.2",
   "_type" : "variation_attribute_value",
   "_resource_state" : "01301d081252298f275d8fff7d87e89c0feadf5a3ad910ebd6a43ed496dab8da",
   "name" : 
   {
      "it-IT" : "Bianco",
      "default" : "White",
      "fr-FR" : "Blanc",
      "zh-CN" : "白色",
      "ja-JP" : "ホワイト"
   },
   "position" : 1.0,
   "value" : "white",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/a-master-product/variation_attributes/color/values/white"
}

# 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" : "23.2",
  "fault":{
    "type":"ProductNotFoundException",
    "message":"No product with id 'a-master-product' found."
  }
}

Put Product Variation Attribute Value

Action to create a product variation attribute value.

Url

PUT https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{attribute_id}/values/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

VariationAttributeValue

Response Document

VariationAttributeValue

Path Parameters

Parameter Type Description Constraints
attribute_id String The variation attribute ID minLength=1
id String The id of the variation attribute value minLength=1
product_id String The master product ID. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.
404 VariationAttributeNotFoundException

attrId (String)

If the attribute id specified is not a valid product attribute.
404 VariationAttributeValueNotFoundException

attrId (String)

value (String)

If the value id specified is not a valid value id.

Sample

REQUEST:
PUT  /s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/purple HTTP/1.1
Host: example.com
Authorization: Bearer cccccccc-dddd-aaaa-ffff-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
   "value":"purple" ,
   "description": {
        "default" : "desc of purple (default)",
        "en": "desc of purple (en)",
        "en-US": "desc of purple (en-US)"
        }
}

# in case of success:
 
RESPONSE:
HTTP/1.1 201 CREATED
Expires: Thu, 01-Aug-2014 00:00:00 GMT
{
   "_v" : "23.2",
   "_type" : "variation_attribute_value",
   "_resource_state" : "7a5d17d07f87784fd24999520856c58211bd90027074094d5bbfba784e01374b",
   "description" : 
   {
      "default" : "desc of purple (default)",
      "en-US" : "desc of purple (en-US)",
      "en" : "desc of purple (en)"
   },
   "link" : "https://example.com/s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/purple",
   "position" : 4.0,
   "value" : "purple"
}

# 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" : "23.2",
    "fault":{
        "type”:”ProductNotFoundException",
        "message":"No product with id ‘master_product_1’ found."
    }
}

Update Product Variation Attribute Value

Updates the variation attribute value of a variation attribute of a master product.

Url

PATCH https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{attribute_id}/values/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

VariationAttributeValue

Response Document

VariationAttributeValue

Path Parameters

Parameter Type Description Constraints
attribute_id String The id of the requested variation attribute. minLength=1
id String The id of the variation value. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

If the product id specified cannot be found.
404 VariationAttributeNotFoundException

attrId (String)

If the attribute id specified is not a valid product attribute.
404 VariationAttributeValueNotFoundException

attrId (String)

value (String)

If the value id specified is not a valid value id.

Sample

REQUEST:
PATCH  /s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/purple HTTP/1.1
Host: example.com
Authorization: Bearer cccccccc-dddd-aaaa-ffff-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
   "value":"purple" ,
   "name": {
        "default" : "purple (default)",
        "en": "purple (en)",
        "en-US": "purple (en-US)"
        }
}

# in case of success:
 
RESPONSE:
HTTP/1.1 201 CREATED
Expires: Thu, 01-Aug-2014 00:00:00 GMT
{
   "_v" : "23.2",
   "_type" : "variation_attribute_value",
   "_resource_state" : "7a5d17d07f87784fd24999520856c58211bd90027074094d5bbfba784e01374b",
   "description" : 
   {
      "default" : "desc of purple (default)",
      "en-US" : "desc of purple (en-US)",
      "en" : "desc of purple (en)"
   },
   "name": 
   {
        "default" : "purple (default)",
        "en": "purple (en)",
        "en-US": "purple (en-US)"
   },
   "link" : "https://example.com/s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/purple",
   "position" : 4.0,
   "value" : "purple"
}

# 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" : "23.2",
    "fault":{
        "type”:”ProductNotFoundException",
        "message":"No product with id ‘master_product_1’ found."
    }
}

Delete Product Variation Attribute Value

Deletes the variation attribute value of a variation attribute bound to a master product

Url

DELETE https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{attribute_id}/values/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

Parameter Type Description Constraints
attribute_id String The id of the variation attribute that contains the value. minLength=1
id String The id of one value to remove  
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 ProductNotFoundException

productId (String)

If the product id specified cannot be found.
404 VariationAttributeNotFoundException

attrId (String)

If the attribute id specified is not a valid product attribute.
404 VariationAttributeValueNotFoundException

attrId (String)

value (String)

If the value id specified is not a valid value id.

Sample

REQUEST:
DELETE  /s/-/dw/data/v23_2/products/master_product_1/variation_attributes/color/values/purple HTTP/1.1
Host: example.com
Authorization: Bearer cccccccc-dddd-aaaa-ffff-2c53c4507367
Content-Type: application/json; charset=UTF-8

# in case of success:
 
RESPONSE:
HTTP/1.1 204 NO CONTENT

# 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" : "23.2",
    "fault":{
        "type”:”ProductNotFoundException",
        "message":"No product with id ‘master_product_1’ found."
    }
}

Get Variation Attribute

Action to get variation attribute information only for master product.

Url

GET https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

VariationAttribute

Path Parameters

Parameter Type Description Constraints
id String The id of the requested variation attribute. minLength=1
product_id String The product ID of a variant or a variation master or a variation group. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product is not found.
404 VariationAttributeNotFoundException

attrId (String)

Indicates that the variation attribute is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
GET  /s/-/dw/data/v23_2/products/masterproductid/variationattributes/color HTTP/1.1
Host: example.com
Authorization: Bearer cccccccc-dddd-aaaa-ffff-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" : "23.2",
   "_type" : "variation_attribute",
   "_resource_state": "43c2d7a118bd0a4034399ed86c86654b40c198ea64fd3195e5587d9211d10d7e",
   "id" : "color",
   "attribute_definition_id" : "Test_String",
   "name" : {
      "default" : "color",
      "en" : "color",
      "de" : "Farbe"
   },
   "display_name" : {
      "default" : "Test_String",
      "en" : "Test_String",
      "de" : "Test_String"
   },
   "link" : "https://example.com/s/-/dw/data/v23_2/products/masterproductid/variation_attributes/color",
   "shared":false,
   "slicing": false,
   "values" : 
         [
            
            {
               "_type" : "variation_attribute_value",
               "description" : 
               {
                  "default" : "Reeed"
               },
               "name" : 
               {
                  "default" : "Red"
               },
               "value" : "red"
            },
            
            {
               "_type" : "variation_attribute_value",
               "description" : 
               {
                  "default" : "Bluuue"
               },
               "name" : 
               {
                  "default" : "Blue"
               },
               "value" : "blue"
            },
            
            {
               "_type" : "variation_attribute_value",
               "description" : 
               {
                  "default" : "Blaaack"
               },
               "name" : 
               {
                  "default" : "Black"
               },
               "value" : "black"
            }
         ]
}

# 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" : "23.2",
  "fault":{
    "type":"VariationAttributeNotFoundException",
    "message":"No variation attribute with id 'color' found."
  }
}

Update Variation Attribute

Updates the variation attribute with the specified information.
  • name
  • slicing

Url

PATCH https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

VariationAttribute

Response Document

VariationAttribute

Path Parameters

Parameter Type Description Constraints
id String The id of the requested variation attribute. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product is not found.
404 VariationAttributeNotFoundException

attrId (String)

Indicates that the variation attribute is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
PATCH /s/-/dw/data/v23_2/products/WapiMain/variation_attributes/Test_1481897519218 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
   "id" : "Test_1481897519218",
   "attribute_definition_id":"wapi-option17",
   "name" : 
   {
      "default" : "Red Color"
   } 
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Content-Type: application/json; charset=UTF-8
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
   "_v" : "23.2",
   "_type" : "variation_attribute",
   "_resource_state" : "f90f0b8e0cc9c3890400e868d5947f1cfd550d4be9e5cc6aabee565eb3e9cbe4",
   "attribute_definition_id" : "wapi-option17",
   "attribute_definition_name" : 
   {
      "default" : "WAPI Option String Value"
   },
   "id" : "Test_1481897519218",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/WapiMain/variation_attributes/Test_1481897519218",
   "name" : 
   {
      "default" : "Red Color"
   },
   "shared" : false,
   "slicing" : false
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type":"VariationAttributeNotFoundException",
        "message":"Can''t find variation attribute for attribute id '481897091358'."
    }
}

Delete Variation Attribute

Deletes a variation attribute by ID.

Url

DELETE https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Path Parameters

Parameter Type Description Constraints
id String One variation attribute id to remove.  
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductNotMasterException

productId (String)

Indicates the master product is not found.
404 VariationAttributeNotFoundException

attrId (String)

Indicates that the variation attribute is not found.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
DELETE /s/-/dw/data/v23_2/products/WapiMain/variation_attributes/Slicing_1481897715042 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
x-dw-resource-state: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5

# in case of success:

RESPONSE:
HTTP/1.1 204 No Content

# 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" : "23.2",
    "fault":{
        "type”:”ProductNotFoundException",
        "message":"No product with id ‘product1’ found."
    }
}

Create Variation Attribute

Creates a local variation attribute using the information provided. This endpoint can't create shared variation attributes. To create a shared variation attribute, use the catalogs resource.

Url

PUT https://hostname:port/dw/data/v23_2/products/{product_id}/variation_attributes/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

VariationAttribute

Response Document

VariationAttribute

Path Parameters

Parameter Type Description Constraints
id String The id of the variation attribute to create. minLength=1
product_id String The id of the product. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductVariationAttributeIDNotUniqueException

attrId (String)

Indicates that the variation attribute id is not unique.
400 ProductVariationAttributeDefinitionNotUniqueException

attrId (String)

Indicates that the variation attribute definition is not unique.
400 ProductNotMasterException

productId (String)

Indicates the master product is not found.
404 AttributeDefinitionNotFoundException

attributeDefinitionId (String)

objectDefinitionId (String)

If attribute definition supplied is not a product attribute.
404 ProductNotFoundException

productId (String)

Indicates the product is not found.

Sample

REQUEST:
PUT /s/-/dw/data/v23_2/products/XMaster/variation_attributes/481897091358 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
{
   "id":"481897091358" ,
   "attribute_definition_id":"wapi-option15"
}

# in case of success:

RESPONSE:
HTTP/1.1 201 CREATED
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
   "_v" : "23.2",
   "_type" : "variation_attribute",
   "_resource_state" : "bf3a5a9e01f83d64c1ed8669804d443e0f643da7a4a035617d75f8db52cf6861",
   "attribute_definition_id" : "wapi-option15",
   "attribute_definition_name" : 
   {
      "default" : "WAPI Option String Value"
   },
   "id" : "481897091358",
   "link" : "https://example.com/s/-/dw/data/v23_2/products/WapiMain/variation_attributes/481897091358",
   "name" : 
   {
      "default" : "WAPI Option String Value"
   },
   "shared" : false,
   "slicing" : false
}

# in case of failure:

RESPONSE:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-attribute,must-revalidate
{
    "_v" : "23.2",
    "fault":{
        "type”:”ProductNotFoundException",
        "message":"No product with id ‘XMaster’ found."
    }
}
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.