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-CC-Workset: string
The ID of the workset that this change will appear in. If this header is missing, the change will be made in the default workset.
-
X-CCAsset-Language(required): string
The asset language of the request
Root Schema : createSite_request
Type:
Show Source
object
-
properties(required):
object properties
Object with updatable properties.
Example:
{
"properties":{
"priceListGroupList":[
{
"id":"EURO"
},
{
"id":"defaultPriceGroup"
}
],
"timeToLive":5000,
"inventoryLocationId":"SiteUS-GlenAllen187",
"inventoryLocations":[
"SiteUS-GlenAllen187",
"SiteUS-GlenAllen188"
],
"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
-
additionalLocaleIds:
array additionalLocaleIds
Additional locale IDs.
-
additionalProductionURLs:
array additionalProductionURLs
The additional production URLs.
-
allowAlternateCurrency:
boolean
Allows the order to be paid in mixed currencies
-
defaultBillingCountryId:
string
Default billing country ID.
-
defaultCatalog:
object defaultCatalog
The default catalog.
-
defaultLocaleId:
string
The default locale ID.
-
defaultPriceListGroup:
object defaultPriceListGroup
Default priceListGroup to be associated with site.
-
defaultSite:
boolean
A boolean psuedo-property indicating that this site is the default site.
-
description:
string
The description of the site.
-
enabled:
boolean
Whether the site is enabled.
-
favicon:
string
The favorite icon URL.
-
id:
string
The optional repository ID of the site. If no ID is specified, than an autogenerated ID will be used.
-
inventoryLocationId:
string
Defines which inventory this site should use by default.
-
inventoryLocations:
array inventoryLocations
The "inventoryLocations" field, defined as an array, enables users to link multiple inventory locations to a site. If the "inventoryLocations" array includes at least one element, the "inventoryLocationId" field is not considered.
-
longDescription:
string
The long description of the site.
-
loyaltyPrograms:
array loyaltyPrograms
List of loyalty programs associated with site.
-
name(required):
string
Name of the site.
-
noimage:
string
The no image icon URL.
-
payShippingInSecondaryCurrency:
boolean
Pay shipping charges in secondary currency.
-
payTaxInSecondaryCurrency:
boolean
Pay tax in secondary currency.
-
priceListGroupList:
array priceListGroupList
List of priceListGroups to be associated with site.
-
productionURL:
string
The production URL.
-
recommendationsHost:
string
The host name of the recommendations server.
-
recommendationsPort:
string
The port of the recommendations server
-
repositoryId:
string
The repository ID of the site.
-
requireGDPRCookieConsent:
boolean
Require consent to track cookies for personalization per Global Data Protection Regulation (GDPR).
-
requireGDPRP13nConsent:
boolean
Require consent to track personal information per Global Data Protection Regulation (GDPR).
-
secondaryCurrency:
string
Currency used for calculating shipping and tax for loyalty. This must be in Uppercase
-
siteTypes:
array siteTypes
List of site types supported by this site
-
timeToLive:
integer
The timeToLive of the site
-
timezone:
string
The time zone for this site.
-
type:
string
Type of site, being a store (storeConfiguration) or a website (siteConfiguration).
-
useDefaultSiteLocale:
boolean
Property to decide whether the site to render in default site locale or not.
Nested Schema : defaultCatalog
Type:
object
The default catalog.
Show Source
-
repositoryId:
string
The repository ID of the default catalog.
Nested Schema : defaultPriceListGroup
Type:
object
Default priceListGroup to be associated with site.
Show Source
-
id(required):
string
ID of default price list group.
Nested Schema : inventoryLocations
Type:
array
The "inventoryLocations" field, defined as an array, enables users to link multiple inventory locations to a site. If the "inventoryLocations" array includes at least one element, the "inventoryLocationId" field is not considered.
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 : items
Type:
Show Source
object
-
programId:
string
Loyalty Program Id.
-
programName:
string
Name for loyalty program.
Nested Schema : items
Type:
Show Source
object
-
id(required):
string
priceListGroup id to be associated
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createSite_response
Type:
Show Source
object
-
activeTheme:
string
The activeTheme for the site.
-
additionalLocaleIds:
array additionalLocaleIds
Additional Country ids.
-
additionalProductionURLs:
array additionalProductionURLs
A list of additional production URLs (without schema). Currently, only plain hostnames are supported.
-
allowAlternateCurrency:
boolean
Allows the order to be paid in mixed currencies
-
allowedOriginMethods:
object allowedOriginMethods
Additional Properties Allowed: additionalPropertiesMap of hostname (key) and the allowed http methods (values) for that host.
-
defaultBillingCountryId:
string
Default billing country ID.
-
defaultCatalog:
object defaultCatalog
The default catalog id.
-
defaultLocaleId:
string
Default locale ID.
-
defaultPriceListGroup:
object defaultPriceListGroup
The default PLG for the site.
-
defaultShippingCountryId:
string
Default Shipping Country ID.
-
defaultSite:
string
Whether this is the default site
-
description:
string
Site description.
-
enabled:
boolean
Whether the site is enabled
-
favicon:
string
The favorite icon URL.
-
id:
string
ID of the site.
-
inventoryLocationId:
string
Defines which inventory this site should use by default.
-
inventoryLocations:
array inventoryLocations
The "inventoryLocations" field, defined as an array, enables users to link multiple inventory locations to a site. If the "inventoryLocations" array includes at least one element, the "inventoryLocationId" field is not considered.
-
longDescription:
string
Long site description.
-
loyaltyPrograms:
array loyaltyPrograms
List of loyalty programs associated with site.
-
name:
string
Site name.
-
noimage:
string
The no image icon URL.
-
paymentOption:
integer
The payment option for the site
-
payShippingInSecondaryCurrency:
boolean
Pay shipping charges in secondary currency
-
payTaxInSecondaryCurrency:
boolean
Pay tax in secondary currency
-
priceListGroupList:
array priceListGroupList
List of Price List Groups associated with the site including default Price List Group
-
productionURL:
string
The production base url for storefront. If set, this base url will be used for any absolute generated links e.g. sitemap urls
-
recommendationsHost:
string
The host name of the recommendations server.
-
recommendationsPort:
string
The port of the recommendations server
-
repositoryId:
string
Repository ID of the site.
-
requireGDPRCookieConsent:
boolean
Require consent to track cookies for personalization per Global Data Protection Regulation (GDPR).
-
requireGDPRP13nConsent:
boolean
Require consent to track personal information per Global Data Protection Regulation (GDPR).
-
secondaryCurrency:
string
Currency used for calculating shipping and tax for loyalty.
-
shipFromAddress:
object shipFromAddress
The ship from address used for tax calculations.
-
siteTypes:
array siteTypes
List of site types supported by this site
-
timeToLive:
integer
It contains value in milliseconds.
-
timezone:
string
The time zone for this site.
-
type:
string
Type of site, being a store (storeConfiguration) or a website (siteConfiguration).
-
useDefaultSiteLocale:
boolean
Property to decide whether the site to render in default site locale or not.
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
-
displayName:
string
The display name of the default catalog for the site.
-
id:
string
The ID of the default catalog for the site.
-
repositoryId:
string
The ID of the default catalog for the site.
Nested Schema : defaultPriceListGroup
Type:
object
The default PLG for the site.
Show Source
-
active:
boolean
Whether the PLG is active
-
deleted:
boolean
Whether the PLG is deleted
-
id:
string
The priceListGroup id associated with the site.
-
repositoryId:
string
The priceListGroup id associated with the site.
Nested Schema : inventoryLocations
Type:
array
The "inventoryLocations" field, defined as an array, enables users to link multiple inventory locations to a site. If the "inventoryLocations" array includes at least one element, the "inventoryLocationId" field is not considered.
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
-
addressLine1:
string
Ship from address line 1
-
addressLine2:
string
Ship from address line 2
-
addressLine3:
string
Ship from address line 3
-
city:
string
Ship from city
-
country:
string
Ship from country
-
postalCode:
string
Ship from postal code
-
region:
string
Ship from region
Nested Schema : items
Type:
Show Source
object
-
associationDate:
string
Association date of loyalty program to site.
-
programId:
string
Loyalty Program Id.
-
programName:
string
Name for loyalty program.
-
repositoryId:
string
The loyalty program id associated with the site.
Nested Schema : items
Type:
Show Source
object
-
active:
boolean
true if priceListGroup is active otherwise false
-
deleted:
boolean
true if priceListGroup is deleted otherwise false
-
id:
string
priceListGroup id associated to site
-
repositoryId:
string
priceListGroup id associated to site
Example Response (application/json)
{
"priceListGroupList":[
{
"deleted":false,
"repositoryId":"defaultPriceGroup",
"active":false,
"id":"defaultPriceGroup"
},
{
"deleted":false,
"repositoryId":"EURO",
"active":false,
"id":"EURO"
}
],
"inventoryLocationId":"SiteUS-GlenAllen187",
"useDefaultSiteLocale":false,
"timezone":"europe_london",
"secondaryCurrency":"USD",
"requireGDPRP13nConsent":false,
"type":"siteConfiguration",
"defaultBillingCountryId":"US",
"defaultShippingCountryId":"US",
"enabled":true,
"payTaxInSecondaryCurrency":true,
"requireGDPRCookieConsent":false,
"timeToLive":5000,
"defaultLocaleId":"1",
"inventoryLocations":[
"SiteUS-GlenAllen187",
"SiteUS-GlenAllen188"
],
"loyaltyPrograms":[
{
"programName":"Movie rewards",
"repositoryId":"siteUS_LP0001",
"associationDate":"2017-07-05T14:15:37.000Z",
"programId":"LP0001"
}
],
"id":"siteUS",
"additionalLocaleIds":[
"1"
],
"favicon":null,
"allowAlternateCurrency":false,
"allowedOriginMethods":{
"https://somemoresecurehost":"GET",
"https://someHost:9080":"GET,PUT,DELETE,POST,OPTIONS"
},
"noimage":null,
"payShippingInSecondaryCurrency":true,
"siteTypes":[
"b2bCommerce"
],
"shipFromAddress":{
"country":"US",
"city":"Cambridge",
"postalCode":"02142",
"addressLine1":"1 Main Street",
"addressLine2":"Foo",
"addressLine3":"Bar",
"region":"MA"
},
"name":"CloudLake US Site",
"repositoryId":"siteUS"
}
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}
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code