Update a site with CC site info

put

/swm/rs/v1/sites/cc/{ccSiteId}

A special endpoint used specifically with the Oracle Commerce Cloud (CC) Wish List client product.

This endpoint synchronizes an SWM Site with a corresponding CC Site by using the given CC siteId.

This endpoint is unique and doesn't follow REST standards precisely because it will create an SWM Site with the CC SiteId if it does not exist.

Explanation of custom header required by this endpoint:
  • X-SWM-SiteType is an optional custom header added to the request to identify which type of merchant site is to be updated. The header value must include the strings 'preview' and/or 'storefront' (e.g. 'preview' or 'storefront preview') to indentify the site type(s). A value of 'preview' is assumed if the header is not provided or no valid site type is identified.

Explanation of endpoint request parameters:
  • storefrontHost is required when the header X-SWM-Update-Site includes 'storefront'. This is the full host name with domain and optional port of the CC platform that is hosting this merchant storefront site (e.g. 'busgk1615.us.oracle.com:8080' or 'storefront.merchant.com') Any protocol or context root (sub-directories) will be stripped off.
  • notificationAppKey is optional, but would be needed if the site wants to support Wish List email notifications (0 to 300 characters)
  • siteName is optional (0 to 100 characters)
  • isDefaultCCSite is optional, when true sets this site as the default cc site (false is ignored)
  • productionUrls is optional (0 to 500 characters), used to include any additional public URLS/host domains, space delimited, that will be used by the merchant site.

Request

Supported Media Types
Path Parameters
Body ()
properties for site
Root Schema : schema
Type: string
Back to Top

Response

Supported Media Types

200 Response

site resource updated

404 Response

site resource not found
Back to Top

Examples

Sample Request:

       {
        "storefrontHost":"storefront.merchant.com",
        "notificationAppKey":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyNQ5V6PrLM/ih9/W6tf0+jokH/OMZ+2E/4mbs=",
        "siteName":"My Store",
        "isDefaultCCSite":"true",
        "productionUrls":"http://www.example.com my.example.com"
       }    

Sample Response:

       {"response":{"code":"200.1","developerMessage":"site resource updated"},
        "siteId":"RoGcM7ZB1dwMgzI6"}    

Possible Error Codes:

       {
          "code":"402.0","developerMessage":"site resource invalid parameter",
          "code":"404.0","developerMessage":"site resource not found",
          "code":"404.2","developerMessage":"default preview site resource not found",
          "code":"500.0","developerMessage":"internal server error"
       }    
Back to Top