Salesforce B2C Commerce 19.10 > Open Commerce API 19.10 > Shop API resources 19.10

Site resource (Shop API 19.10)

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/v19_10/site

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.
None No authentication.

Response Document

Site

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.

Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.site.modifyGETResponse

modifyGETResponse (doc : Site ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v19_10/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" : "19.10",
  "_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.demandware.com/dw/image/v2/abcd_s01",
  "https_dis_base_url" : "https://image.demandware.com/dw/image/v2/abcd_s01",
  "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
}
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. By continuing to use this site you are giving us your consent to do this.