createSiteFromForm
post
/ccadmin/v1/siteCreateForms/{id}
Create Site From Form. 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. **Requires the x-ccasset-language header so translated content can be set for a specific language.**
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueID corresponding to the site to be used as a the source template for the new site. An empty ID will use the default site as a template.
Header Parameters
- X-CCAsset-Language
-
Type:
stringRequired:trueThe asset language of the request
Body Parameter
Root Schema : createSiteFromForm_request
{
"properties":{
"priceListGroupList":[
{
"id":"EURO"
},
{
"id":"defaultPriceGroup"
}
],
"name":"CloudLake US Site test",
"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. - id
-
Type:
stringThe optional repository ID of the site. If no ID is specified, than an autogenerated ID will be used. - name
-
Type:
stringRequired:trueName of the site. - 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. - siteTypes
-
Type:
arraysiteTypesAdditional Properties Allowed:List of site types supported by 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 : priceListGroupList
Nested Schema : siteTypes
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 : createSiteFromForm_response
- additionalLocaleIds
-
Type:
arrayadditionalLocaleIdsAdditional Properties Allowed:Additional Country ids. - defaultBillingCountryId
-
Type:
stringDefault billing country ID. - defaultCatalog
-
Type:
objectdefaultCatalogAdditional Properties Allowed:The default catalog for the site. - defaultLocaleId
-
Type:
stringDefault locale ID. - defaultShippingCountryId
-
Type:
stringDefault Shipping Country ID. - id
-
Type:
stringID of the site. - name
-
Type:
stringSite name. - 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 - repositoryId
-
Type:
stringRepository ID of the site. - siteTypes
-
Type:
arraysiteTypesAdditional Properties Allowed:List of site types supported by this site
Nested Schema : additionalLocaleIds
Nested Schema : defaultCatalog
Type:
objectThe default catalog for the site.
- repositoryId
-
Type:
stringThe ID of the default catalog for the site.
Nested Schema : priceListGroupList
Nested Schema : siteTypes
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"
}
],
"defaultLocaleId":"1",
"name":"CloudLake US Site",
"repositoryId":"siteUS",
"id":"siteUS",
"defaultBillingCountryId":"US",
"defaultShippingCountryId":"US",
"additionalLocaleIds":[
"1"
],
"siteTypes":[
"b2bCommerce"
]
}
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|
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"}
],
"name": "CloudLake US Site test",
"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"
}
],
"defaultLocaleId": "1",
"name": "CloudLake US Site",
"repositoryId": "siteUS",
"id": "siteUS",
"defaultBillingCountryId": "US",
"defaultShippingCountryId": "US",
"additionalLocaleIds": ["1"],
"siteTypes": ["b2bCommerce"]
}