Site Resource (Shop API 16.1)

Summary

Http Method Resource Description
GET /Site Access site information, like site status and site content URLs.

Get Site

Access site information, like site status and site content URLs.

Url

GET http://hostname:port/dw/shop/v16_1/site

Formats

json, xml

Authentication

Name Description
None No authentication.

Response Document

Site

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.site.afterGET

afterGET (doc : Document) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
  • Status.OK for success.
  • Status.ERROR in case something went wrong.

Sample

REQUEST:
GET /dw/shop/v16_1/site HTTP/1.1
Host: demo.ocapi.demandware.net
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
Content-Length: 818
{
  "_v" : "16.1",
  "_type" : "site",
  "currency" : "USD",
  "default_locale" : "default",
  "http_hostname" : "demo.ocapi.demandware.net",
  "http_library_content_url" : "http://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1345174669086",
  "https_hostname" : "demo.ocapi.demandware.net",
  "http_site_content_url" : "http://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/-/default/v1345174669086",
  "https_library_content_url" : "https://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1345174669086",
  "https_site_content_url" : "https://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/-/default/v1345174669086",
  "id" : "SiteGenesis",
  "name" : "Site Genesis",
  "status" : "online",
  "timezone" : "Etc/UTC",
  "timezone_offset" : 0
}
OCAPI obsolete versions 13.x and 14.x will be end of life in 2020 and versions 15.x and 16.x in 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.