Site resource (Shop API 23.2)
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/v23_2/site
Formats
json, xml
Authentication
Name | Description |
---|---|
JWT | Authentication via Customer JWT. |
None | No authentication. |
Response Document
Customization
This Resource supports server-side customization.
Extension Point | Method Detail |
---|---|
dw.ocapi.shop.site.beforeGET |
beforeGET (siteId : String ) : Status The function is called before the request will be processed.
|
dw.ocapi.shop.site.modifyGETResponse |
modifyGETResponse (doc : Site ) : Status The function is called after the request has been processed.
|
Sample
REQUEST:
GET /dw/shop/v23_2/site HTTP/1.1
Host: demo.ocapi.<domain>
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" : "23.2",
"_type" : "site",
"allowed_currencies" : [ "USD", "EUR" ],
"allowed_locales" : [
{
"_type":"locale",
"id":"en-US",
"name":"English (United States)",
"display_language":"English",
"display_country":"United States",
"country":"US",
"default":true,
"iso3_language":"eng",
"language":"en",
"display_name":"English (United States)",
"iso3_country":"USA"
},
{
"_type":"locale",
"id":"es",
"name":"Spanish",
"display_language":"espaΓ±ol",
"display_country":""
"country":"",
"default":false,
"iso3_language":"spa",
"language":"es",
"display_name":"espaΓ±ol",
"iso3_country":""
}
],
"default_currency" : "USD",
"default_locale" : "default",
"http_dis_base_url" : "http://image.<domain>/dw/image/v2/abcd_s01",
"https_dis_base_url" : "https://image.<domain>/dw/image/v2/abcd_s01",
"http_hostname" : "demo.ocapi.<domain>",
"http_library_content_url" : "http://demo.ocapi.<domain>/on/<domain>.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1345174669086",
"https_hostname" : "demo.ocapi.<domain>",
"http_site_content_url" : "http://demo.ocapi.<domain>/on/<domain>.static/Sites-SiteGenesis-Site/-/default/v1345174669086",
"https_library_content_url" : "https://demo.ocapi.<domain>/on/<domain>.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1345174669086",
"https_site_content_url" : "https://demo.ocapi.<domain>/on/<domain>.static/Sites-SiteGenesis-Site/-/default/v1345174669086",
"id" : "SiteGenesis",
"name" : "Site Genesis",
"status" : "online",
"timezone" : "Etc/UTC",
"timezone_offset" : 0
}
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.