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. **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:trueObject with updatable properties.
Nested Schema : properties
Type:
objectObject with updatable properties.
- additionalLocaleIds
-
Type:
arrayadditionalLocaleIdsAdditional locale IDs. - additionalProductionURLs
-
Type:
arrayadditionalProductionURLsThe additional production URLs. - defaultBillingCountryId
-
Type:
stringDefault billing country ID. - defaultCatalog
-
Type:
objectdefaultCatalogThe default catalog. - defaultLocaleId
-
Type:
stringThe default locale ID. - 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. - loyaltyPrograms
-
Type:
arrayloyaltyProgramsList of loyalty programs associated with site. - name
-
Type:
stringRequired:trueName of the site. - noimage
-
Type:
stringThe no image icon URL. - priceListGroupList
-
Type:
arraypriceListGroupListList 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:
arraysiteTypesList of site types supported by this 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 : 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
- additionalLocaleIds
-
Type:
arrayadditionalLocaleIdsAdditional Country ids. - allowedOriginMethods
-
Type:
objectallowedOriginMethodsAdditional Properties Allowed: additionalPropertiesMap of hostname (key) and the allowed http methods (values) for that host. - defaultBillingCountryId
-
Type:
stringDefault billing country ID. - defaultCatalog
-
Type:
objectdefaultCatalogThe default catalog id. - defaultLocaleId
-
Type:
stringDefault locale ID. - defaultShippingCountryId
-
Type:
stringDefault Shipping Country ID. - favicon
-
Type:
stringThe favorite icon URL. - id
-
Type:
stringID of the site. - loyaltyPrograms
-
Type:
arrayloyaltyProgramsList of loyalty programs associated with site. - name
-
Type:
stringSite name. - noimage
-
Type:
stringThe no image icon URL. - priceListGroupList
-
Type:
arraypriceListGroupListList 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. - secondaryCurrency
-
Type:
stringCurrency used for calculating shipping and tax for loyalty. - shipFromAddress
-
Type:
objectshipFromAddressThe ship from address used for tax calculations. - siteTypes
-
Type:
arraysiteTypesList 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 : 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.
- repositoryId
-
Type:
stringThe ID of the default catalog for 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:
arrayerrorsAn 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"]
}