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
- application/json
Header Parameters
- X-CCAsset-Language
-
Type:
stringRequired:trueThe asset language of the request
Body Parameter
Root Schema : createSite_request
{
"properties":{
"priceListGroupList":[
{
"id":"EURO"
},
{
"id":"defaultPriceGroup"
}
],
"timeToLive":5000,
"timezone":"europe_london",
"name":"CloudLake US Site test",
"allowedOriginMethods":{
"https://somemoresecurehost":"GET",
"https://someHost:9080":"GET,PUT,DELETE,POST,OPTIONS"
},
"siteTypes":[
"b2bCommerce"
]
}
}
- properties
-
Type:
objectpropertiesRequired:trueAdditional Properties Allowed:Object with updatable properties.
Nested Schema : properties
Type:
objectObject with updatable properties.
- additionalLocaleIds
-
Type:
arrayadditionalLocaleIdsAdditional Properties Allowed:Additional locale IDs. - additionalProductionURLs
-
Type:
arrayadditionalProductionURLsAdditional Properties Allowed:The additional production URLs. - defaultBillingCountryId
-
Type:
stringDefault billing country ID. - defaultCatalog
-
Type:
objectdefaultCatalogAdditional Properties Allowed:The default catalog. - defaultLocaleId
-
Type:
stringThe default locale ID. - defaultPriceListGroup
-
Type:
objectdefaultPriceListGroupAdditional Properties Allowed:Default priceListGroup to be associated with site. - defaultSite
-
Type:
booleanA boolean psuedo-property indicating that this site is the default site. - description
-
Type:
stringThe description of the site. - enabled
-
Type:
booleanWhether the site is enabled. - favicon
-
Type:
stringThe favorite icon URL. - id
-
Type:
stringThe optional repository ID of the site. If no ID is specified, than an autogenerated ID will be used. - longDescription
-
Type:
stringThe long description of the site. - loyaltyPrograms
-
Type:
arrayloyaltyProgramsAdditional Properties Allowed:List of loyalty programs associated with site. - name
-
Type:
stringRequired:trueName of the site. - noimage
-
Type:
stringThe no image icon URL. - priceListGroupList
-
Type:
arraypriceListGroupListAdditional Properties Allowed:List of priceListGroups to be associated with site. - productionURL
-
Type:
stringThe production URL. - recommendationsHost
-
Type:
stringThe host name of the recommendations server. - recommendationsPort
-
Type:
stringThe port of the recommendations server - repositoryId
-
Type:
stringThe repository ID of the site. - secondaryCurrency
-
Type:
stringCurrency used for calculating shipping and tax for loyalty. This must be in Uppercase - siteTypes
-
Type:
arraysiteTypesAdditional Properties Allowed:List of site types supported by this site - timeToLive
-
Type:
integerThe timeToLive of the site - timezone
-
Type:
stringThe time zone for this site.
Nested Schema : additionalLocaleIds
Nested Schema : additionalProductionURLs
Nested Schema : defaultCatalog
Type:
objectThe default catalog.
- repositoryId
-
Type:
stringThe repository ID of the default catalog.
Nested Schema : defaultPriceListGroup
Type:
objectDefault priceListGroup to be associated with site.
- id
-
Type:
stringRequired:trueID of default price list group.
Nested Schema : loyaltyPrograms
Nested Schema : priceListGroupList
Nested Schema : siteTypes
Nested Schema : items
Type:
object- programId
-
Type:
stringLoyalty Program Id. - programName
-
Type:
stringName for loyalty program.
Nested Schema : items
Type:
object- id
-
Type:
stringRequired:truepriceListGroup id to be associated
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createSite_response
- activeTheme
-
Type:
stringThe activeTheme for the site. - additionalLocaleIds
-
Type:
arrayadditionalLocaleIdsAdditional Properties Allowed:Additional Country ids. - additionalProductionURLs
-
Type:
arrayadditionalProductionURLsAdditional Properties Allowed:A list of additional production URLs (without schema). Currently, only plain hostnames are supported. - allowedOriginMethods
-
Type:
objectallowedOriginMethodsAdditional Properties Allowed:{ "type":"string" }Map of hostname (key) and the allowed http methods (values) for that host. - defaultBillingCountryId
-
Type:
stringDefault billing country ID. - defaultCatalog
-
Type:
objectdefaultCatalogAdditional Properties Allowed:The default catalog id. - defaultLocaleId
-
Type:
stringDefault locale ID. - defaultPriceListGroup
-
Type:
objectdefaultPriceListGroupAdditional Properties Allowed:The default PLG for the site. - defaultShippingCountryId
-
Type:
stringDefault Shipping Country ID. - defaultSite
-
Type:
stringWhether this is the default site - description
-
Type:
stringSite description. - enabled
-
Type:
booleanWhether the site is enabled - favicon
-
Type:
stringThe favorite icon URL. - id
-
Type:
stringID of the site. - longDescription
-
Type:
stringLong site description. - loyaltyPrograms
-
Type:
arrayloyaltyProgramsAdditional Properties Allowed:List of loyalty programs associated with site. - name
-
Type:
stringSite name. - noimage
-
Type:
stringThe no image icon URL. - paymentOption
-
Type:
integerThe payment option for the site - priceListGroupList
-
Type:
arraypriceListGroupListAdditional Properties Allowed:List of Price List Groups associated with the site including default Price List Group - productionURL
-
Type:
stringThe production base url for storefront. If set, this base url will be used for any absolute generated links e.g. sitemap urls - recommendationsHost
-
Type:
stringThe host name of the recommendations server. - recommendationsPort
-
Type:
stringThe port of the recommendations server - repositoryId
-
Type:
stringRepository ID of the site. - secondaryCurrency
-
Type:
stringCurrency used for calculating shipping and tax for loyalty. - shipFromAddress
-
Type:
objectshipFromAddressAdditional Properties Allowed:The ship from address used for tax calculations. - siteTypes
-
Type:
arraysiteTypesAdditional Properties Allowed:List of site types supported by this site - timeToLive
-
Type:
integerIt contains value in milliseconds. - timezone
-
Type:
stringThe time zone for this site.
Nested Schema : additionalLocaleIds
Nested Schema : additionalProductionURLs
Type:
arrayA list of additional production URLs (without schema). Currently, only plain hostnames are supported.
-
Type:
string
Nested Schema : allowedOriginMethods
Type:
object-
Type:
string
Map of hostname (key) and the allowed http methods (values) for that host.
Nested Schema : defaultCatalog
Type:
objectThe default catalog id.
- displayName
-
Type:
stringThe display name of the default catalog for the site. - id
-
Type:
stringThe ID of the default catalog for the site. - repositoryId
-
Type:
stringThe ID of the default catalog for the site.
Nested Schema : defaultPriceListGroup
Type:
objectThe default PLG for the site.
- active
-
Type:
booleanWhether the PLG is active - deleted
-
Type:
booleanWhether the PLG is deleted - id
-
Type:
stringThe priceListGroup id associated with the site. - repositoryId
-
Type:
stringThe priceListGroup id associated with the site.
Nested Schema : loyaltyPrograms
Nested Schema : priceListGroupList
Nested Schema : shipFromAddress
Type:
objectThe ship from address used for tax calculations.
- addressLine1
-
Type:
stringShip from address line 1 - addressLine2
-
Type:
stringShip from address line 2 - addressLine3
-
Type:
stringShip from address line 3 - city
-
Type:
stringShip from city - country
-
Type:
stringShip from country - postalCode
-
Type:
stringShip from postal code - region
-
Type:
stringShip from region
Nested Schema : siteTypes
Nested Schema : items
Type:
object- associationDate
-
Type:
stringAssociation date of loyalty program to site. - programId
-
Type:
stringLoyalty Program Id. - programName
-
Type:
stringName for loyalty program. - repositoryId
-
Type:
stringThe loyalty program id associated with the site.
Nested Schema : items
Type:
object- active
-
Type:
booleantrue if priceListGroup is active otherwise false - deleted
-
Type:
booleantrue if priceListGroup is deleted otherwise false - id
-
Type:
stringpriceListGroup id associated to site - repositoryId
-
Type:
stringpriceListGroup id associated to site
Example application/json
{
"priceListGroupList":[
{
"deleted":false,
"repositoryId":"defaultPriceGroup",
"active":false,
"id":"defaultPriceGroup"
},
{
"deleted":false,
"repositoryId":"EURO",
"active":false,
"id":"EURO"
}
],
"favicon":null,
"timezone":"europe_london",
"allowedOriginMethods":{
"https://somemoresecurehost":"GET",
"https://someHost:9080":"GET,PUT,DELETE,POST,OPTIONS"
},
"noimage":null,
"secondaryCurrency":"USD",
"defaultBillingCountryId":"US",
"defaultShippingCountryId":"US",
"siteTypes":[
"b2bCommerce"
],
"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- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{"properties": {
"priceListGroupList": [
{"id": "EURO"},
{"id": "defaultPriceGroup"}
],
"timeToLive": 5000,
"timezone": "europe_london",
"name": "CloudLake US Site test",
"allowedOriginMethods": {
"https://somemoresecurehost": "GET",
"https://someHost:9080": "GET,PUT,DELETE,POST,OPTIONS"
},
"siteTypes": ["b2bCommerce"]
}}
Sample Response Payload returned by endpoint:
{
"priceListGroupList": [
{
"deleted": false,
"repositoryId": "defaultPriceGroup",
"active": false,
"id": "defaultPriceGroup"
},
{
"deleted": false,
"repositoryId": "EURO",
"active": false,
"id": "EURO"
}
],
"favicon": null,
"timezone": "europe_london",
"allowedOriginMethods": {
"https://somemoresecurehost": "GET",
"https://someHost:9080": "GET,PUT,DELETE,POST,OPTIONS"
},
"noimage": null,
"secondaryCurrency": "USD",
"defaultBillingCountryId": "US",
"defaultShippingCountryId": "US",
"siteTypes": ["b2bCommerce"],
"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"]
}