Http Method | Resource | Description |
---|---|---|
GET | /Content/({Id},...,{Id}) | To access multiple content asset, you construct a URL using the template shown below. This template requires you to specify one or many content asset id. In response, the server returns a result set of corresponding content asset documents. Only content assets, which are marked as online are returned. An assignment to a folder is not necessary. |
GET | /Content/{Id} | To access a content asset, you construct a URL using the template shown below. This template requires you to specify a content asset id. In response, the server returns a corresponding content asset document. Only content assets, which are marked as online are returned. An assignment to a folder is not necessary. |
To access multiple content asset, you construct a URL using the template shown below. This template requires you to specify one or many content asset id. In response, the server returns a result set of corresponding content asset documents. Only content assets, which are marked as online are returned. An assignment to a folder is not necessary.
Url
GET http://hostname:port/dw/shop/v15_6/content/({id},...,{id})?locale={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
None | No authentication. |
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
ids | [String] | The ids of the requested content assets | maxItems=50, maxLength=256 |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
locale | String | The locale context |
Sample
REQUEST:
GET /dw/shop/v15_6/content/(about-us,terms) HTTP/1.1
Host: example.com
Accept: application/json
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=900,must-revalidate
Content-Length: 13120
{
"_v":"15.6",
"_type":"content_result",
"count":2,
"total":2,
"data":
[
{
"description" : "It all started with a series of observations ...",
"id" : "about-us",
"name" : "About Us",
"c_body" : "<h1>About Us</h1><h2>It all started with a series of observations ...",
"c_customCSSFile" : "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1365077029384/css/aboutus.css"
},
{
"description" : "These terms of use set forth the basis on which you are permitted to access and use this website, example.com",
"id" : "terms",
"name" : "Terms & Conditions of Sale",
"c_body" : "<h1>Terms & Conditions of Sale</h1><p>ATTENTION: These terms of use set forth the basis on which you are permitted ..."
}
]
}
To access a content asset, you construct a URL using the template shown below. This template requires you to specify a content asset id. In response, the server returns a corresponding content asset document. Only content assets, which are marked as online are returned. An assignment to a folder is not necessary.
Url
GET http://hostname:port/dw/shop/v15_6/content/{id}?locale={String}
Formats
json, xml
Authentication
Name | Description |
---|---|
None | No authentication. |
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String | The id of the requested content asset. | maxLength=256 |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
locale | String | The locale context. |
Sample
REQUEST:
GET /dw/shop/v15_6/content/about-us HTTP/1.1
Host: example.com
Accept: application/json
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=900,must-revalidate
Content-Length: 2883
{
"_v" : "15.6",
"_type":"content",
"description" : "It all started with a series of observations...",
"id" : "about-us",
"name" : "About Us",
"c_body" : "<h1>About Us</h1><h2>It all started with a series of observations ...",
"c_customCSSFile" : "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1365077029384/css/aboutus.css"
}