Products Resource (Data API 17.6)
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 with the same unique identifier, it will be cleaned and overwritten unless the header x-dw-validate-existing=true is passed in with the request. |
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. |
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}/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.
|
DELETE | /Products/{Product_id}/Variation_attributes/{Id} | Deletes the variation attribute by ID |
PUT | /Products/{Product_id}/Variation_attributes/{Id} | Creates a variation attribute using the information provided. |
Get Product
Action to get product information.Url
GET https://hostname:port/dw/data/v17_6/products/{id}?site_id={String}&expand={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
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:
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/v17.6/products/my-product?expand=availability&site_id=SiteGenesis HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Aug-2014 00:00:00 GMT
{
"_v" : "17.6",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type" : "product",
"ats" : 500,
"brand" : "Brand",
"ean" : "EAN",
"id" : "my-product",
"in_stock" : true,
"link" : "https://example.com/s/-/dw/data/v17.6/products/my-product",
"long_description" :
{
"default" : "Long Description"
},
"manufacturer_name" : "Manufacturer",
"manufacturer_sku" : "Manufacturer ID",
"name" :
{
"default" : "My Product"
},
"online" : true,
"online_flag" :
{
"default" : true
},
"owning_catalog_id" : "my-catalog",
"owning_catalog_name" :
{
"default" : "My Catalog"
},
"page_description" :
{
"default" : "Page description"
},
"page_keywords" :
{
"default" : "Page Keyword"
},
"page_title" :
{
"default" : "Page title"
},
"searchable" :
{
"default" : true
},
"short_description" :
{
"default" : "Short Description"
},
"type" :
{
"_type" : "product_type",
"bundle" : true,
"bundled" : true,
"part_of_product_set" : true
},
"unit" : "bnd",
"upc" : "UPC"
}
# in case of failure:
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"17.6",
"fault":{
"type":"ProductNotFoundException",
"message":"No product with ID 'my-product' was found."
}
}
Delete Product
Deletes the product by IDUrl
DELETE https://hostname:port/dw/data/v17_6/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/v17_6/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":"17.6",
"fault":{
"type":"ProductNotFoundException",
"message":"No product with ID 'my-product' was found."
}
}
Create Product
Creates a product using the information provided. If a product with the same unique identifier, it will be cleaned and overwritten unless the header x-dw-validate-existing=true is passed in with the request.Url
PUT https://hostname:port/dw/data/v17_6/products/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
"_type": "product",
"id" : "product1",
"link": "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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.Url
PATCH https://hostname:port/dw/data/v17_6/products/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_type" : "product",
"_resource_state" : "cb8ba8f6173b517d36f8ccaa705a8072ed3369919b79c10c5b6afbfa4e1673ce",
"id" : "product1”,
"link" : "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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/v17_6/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
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/v17_6/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" : "17.6",
"_type" : "variation_groups",
"count" : 2,
"data" :
[
{
"_type" : "variation_group",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-5",
"product_id" : "my-product-5",
"variation_values" :
{
"color" : "red"
}
},
{
"_type" : "variation_group",
"link" : "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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":"17.6",
"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/v17_6/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
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/v17_6/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" : "17.6",
"_type" : "variationGroup",
"product_id" : "my-variation-group",
"link" : "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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":"17_6",
"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":"17.6",
"fault":{
"type":"ProductNotMasterException",
"message":"Product 'my-product' is not a variation master product."
}
}
Create 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/v17_6/products/{master_product_id}/variation_groups/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_type" : "variationGroup",
"product_id" : "my-variation-group",
"link" : "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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":"17.6",
"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":"17.6",
"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":"17.6",
"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/v17_6/products/{master_product_id}/variation_groups/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_type" : "variationGroup",
"product_id" : "my-variation-group",
"link" : "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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":"17.6",
"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":"17.6",
"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":"17.6",
"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/v17_6/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/v17_6/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":"17.6",
"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":"17.6",
"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":"17.6",
"fault":{
"type":"ProductNotMasterException",
"message":"Product 'my-product' is not a variation master product."
}
}
Get Variation
Reads variation for a product master.Url
GET https://hostname:port/dw/data/v17_6/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
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/v17_6/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" : "17.6",
"_type" : "variants",
"count" : 9,
"data" :
[
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-1",
"product_id" : "my-product-1",
"variation_values" :
{
"color" : "red",
"size" : "S"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-2",
"product_id" : "my-product-2",
"variation_values" :
{
"color" : "red",
"size" : "M"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-3",
"product_id" : "my-product-3",
"variation_values" :
{
"color" : "red",
"size" : "L"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-4",
"product_id" : "my-product-4",
"variation_values" :
{
"color" : "blue",
"size" : "S"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-5",
"product_id" : "my-product-5",
"variation_values" :
{
"color" : "blue",
"size" : "M"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-6",
"product_id" : "my-product-6",
"variation_values" :
{
"color" : "blue",
"size" : "L"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-7",
"product_id" : "my-product-7",
"variation_values" :
{
"color" : "black",
"size" : "S"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/products/my-product-8",
"product_id" : "my-product-8",
"variation_values" :
{
"color" : "black",
"size" : "M"
}
},
{
"_type" : "variant",
"link" : "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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/v17_6/products/{master_product_id}/variations/{id}?site_id={String}&expand={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
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/v17_6/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" : "17.6",
"_type" : "variant",
"product_id" : "my-variation",
"link" : "https://example.com/s/-/dw/data/v99_9/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":"17.6",
"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":"17.6",
"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":"17.6",
"fault":{
"type":"ProductNotMasterException",
"message":"Product 'my-product' is not a variation master product."
}
}
Create Variation Group
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/v17_6/products/{master_product_id}/variations/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_type" : "variant",
"product_id" : "my-variation",
"link" : "https://example.com/s/-/dw/data/v99_9/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":"17.6",
"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":"17.6",
"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":"17.6",
"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":"17.6",
"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/v17_6/products/{master_product_id}/variations/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_type" : "variant",
"product_id" : "my-variation",
"link" : "https://example.com/s/-/dw/data/v99_9/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":"17.6",
"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":"17.6",
"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":"17.6",
"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":"17.6",
"fault":{
"type":"VariationValueNotValidException",
"message":"Product 'my-variation' has an invalid value 'blue' for attribute 'color'."
}
}
Unassign Variation Group
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/v17_6/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/v17_6/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":"17.6",
"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":"17.6",
"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":"17.6",
"fault":{
"type":"ProductNotMasterException",
"message":"Product 'my-product' is not a variation master product."
}
}
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/v17_6/products/{product_id}/variation_attributes?start={Integer}&count={Integer}&select={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
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/v17_6/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" : "17.6",
"_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":"17.6",
"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/v17_6/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
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/v17_6/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" : "17.6",
"_type" : "variation_attribute_values",
"count" : 3,
"data" :
[
{
"_type" : "variation_attribute_value",
"value" : "red",
"link" : "https://example.com/s/-/dw/data/v17_6/products/master_product_1/variation_attributes/color/values/red"
},
{
"_type" : "variation_attribute_value",
"value" : "blue",
"link" : "https://example.com/s/-/dw/data/v17_6/products/master_product_1/variation_attributes/color/values/blue"
},
{
"_type" : "variation_attribute_value",
"value" : "black",
"link" : "https://example.com/s/-/dw/data/v17_6/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":"17.6",
"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/v17_6/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
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/v17_6/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" : "17.6",
"_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/v17_6/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":"17.6",
"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/v17_6/products/{product_id}/variation_attributes/{attribute_id}/values/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_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/v17_6/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":"17.6",
"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/v17_6/products/{product_id}/variation_attributes/{attribute_id}/values/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_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/v17_6/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":"17.6",
"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 productUrl
DELETE https://hostname:port/dw/data/v17_6/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/v17_6/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":"17.6",
"fault":{
"type”:”ProductNotFoundException",
"message":"No product with id ‘master_product_1’ found."
}
}
Get VariationAttribute
Action to get variation attribute information only for master product.Url
GET https://hostname:port/dw/data/v17_6/products/{product_id}/variation_attributes/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Response Document
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/v17_6/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" : "17.6",
"_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/v99_9/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":"17.6",
"fault":{
"type":"VariationAttributeNotFoundException",
"message":"No variation attribute with id 'color' found."
}
}
Update VariationAttribute
Updates the variation attribute with the specified information.- name
- slicing
Url
PATCH https://hostname:port/dw/data/v17_6/products/{product_id}/variation_attributes/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/products/WapiMaster/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" : "17.6",
"_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/v99_9/products/WapiMaster/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":"17.6",
"fault":{
"type":"VariationAttributeNotFoundException",
"message":"Can''t find variation attribute for attribute id '481897091358'."
}
}
Delete VariationAttribute
Deletes the variation attribute by IDUrl
DELETE https://hostname:port/dw/data/v17_6/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/v17_6/products/WapiMaster/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":"17.6",
"fault":{
"type”:”ProductNotFoundException",
"message":"No product with id ‘product1’ found."
}
}
Create VariationAttribute
Creates a variation attribute using the information provided.Url
PUT https://hostname:port/dw/data/v17_6/products/{product_id}/variation_attributes/{id}
Formats
json, xml
Authentication
Name | Description |
---|---|
OAuth | Authentication via OAuth token. |
Request Document
Response Document
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/v17_6/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" : "17.6",
"_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/v99_9/products/WapiMaster/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":"17.6",
"fault":{
"type”:”ProductNotFoundException",
"message":"No product with id ‘XMaster’ found."
}
}