createSite

post

/ccadmin/v1/sites

Create Site. Create a site based on the specified properties. Any unspecified properties will be inherited from the default site, except for id, productionURL, and additionalProductionURLs. Note that only a subset of properties can vary by site. The id can be specified, but it cannot be the ID of an existing site or the "defaultSite" pseudo ID. **Requires the x-ccasset-language header so translated content can be set for a specific language.**

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : createSite_request
Type: object
Show Source
Example:
{
    "properties":{
        "priceListGroupList":[
            {
                "id":"EURO"
            },
            {
                "id":"defaultPriceGroup"
            }
        ],
        "timeToLive":5000,
        "inventoryLocationId":"SiteUS-GlenAllen187",
        "timezone":"europe_london",
        "name":"CloudLake US Site test",
        "allowedOriginMethods":{
            "https://somemoresecurehost":"GET",
            "https://someHost:9080":"GET,PUT,DELETE,POST,OPTIONS"
        },
        "siteTypes":[
            "b2bCommerce"
        ]
    }
}
Nested Schema : properties
Type: object
Object with updatable properties.
Show Source
Nested Schema : additionalLocaleIds
Type: array
Additional locale IDs.
Show Source
Nested Schema : additionalProductionURLs
Type: array
The additional production URLs.
Show Source
Nested Schema : defaultCatalog
Type: object
The default catalog.
Show Source
Nested Schema : defaultPriceListGroup
Type: object
Default priceListGroup to be associated with site.
Show Source
Nested Schema : loyaltyPrograms
Type: array
List of loyalty programs associated with site.
Show Source
Nested Schema : priceListGroupList
Type: array
List of priceListGroups to be associated with site.
Show Source
Nested Schema : siteTypes
Type: array
List of site types supported by this site
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createSite_response
Type: object
Show Source
Nested Schema : additionalLocaleIds
Type: array
Additional Country ids.
Show Source
Nested Schema : additionalProductionURLs
Type: array
A list of additional production URLs (without schema). Currently, only plain hostnames are supported.
Show Source
Nested Schema : allowedOriginMethods
Type: object
Additional Properties Allowed
Show Source
Map of hostname (key) and the allowed http methods (values) for that host.
Nested Schema : defaultCatalog
Type: object
The default catalog id.
Show Source
Nested Schema : defaultPriceListGroup
Type: object
The default PLG for the site.
Show Source
Nested Schema : loyaltyPrograms
Type: array
List of loyalty programs associated with site.
Show Source
Nested Schema : priceListGroupList
Type: array
List of Price List Groups associated with the site including default Price List Group
Show Source
Nested Schema : shipFromAddress
Type: object
The ship from address used for tax calculations.
Show Source
Nested Schema : siteTypes
Type: array
List of site types supported by this site
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "priceListGroupList":[
        {
            "deleted":false,
            "repositoryId":"defaultPriceGroup",
            "active":false,
            "id":"defaultPriceGroup"
        },
        {
            "deleted":false,
            "repositoryId":"EURO",
            "active":false,
            "id":"EURO"
        }
    ],
    "inventoryLocationId":"SiteUS-GlenAllen187",
    "favicon":null,
    "timezone":"europe_london",
    "allowedOriginMethods":{
        "https://somemoresecurehost":"GET",
        "https://someHost:9080":"GET,PUT,DELETE,POST,OPTIONS"
    },
    "noimage":null,
    "secondaryCurrency":"USD",
    "requireGDPRP13nConsent":false,
    "payShippingInSecondaryCurrency":true,
    "type":"siteConfiguration",
    "defaultBillingCountryId":"US",
    "defaultShippingCountryId":"US",
    "enabled":true,
    "siteTypes":[
        "b2bCommerce"
    ],
    "payTaxInSecondaryCurrency":true,
    "requireGDPRCookieConsent":false,
    "timeToLive":5000,
    "defaultLocaleId":"1",
    "shipFromAddress":{
        "country":"US",
        "city":"Cambridge",
        "postalCode":"02142",
        "addressLine1":"1 Main Street",
        "addressLine2":"Foo",
        "addressLine3":"Bar",
        "region":"MA"
    },
    "loyaltyPrograms":[
        {
            "programName":"Movie rewards",
            "repositoryId":"siteUS_LP0001",
            "associationDate":"2017-07-05T14:15:37.000Z",
            "programId":"LP0001"
        }
    ],
    "name":"CloudLake US Site",
    "repositoryId":"siteUS",
    "id":"siteUS",
    "additionalLocaleIds":[
        "1"
    ]
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |30015|Invalid Site Base URL ''{0}'' specified.| |30014|Could not update site. Allowed site types are {0}| |25015|set Property RepositoryItem Internal Error| |25014|convert Input Property Type Internal Error| |30005|Create site failed| |100092|The value ''{0}'' for parameter ''{1}'' is not among the {2,number,integer} valid options. Showing the first {3,number,integer} valid options: {4}
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top