updateSite
put
/ccadmin/v1/sites/{id}
Update Site. Update a site based on ID and request parameters. 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:
string
Required:true
The ID of the site.
Header Parameters
- X-CCAsset-Language
-
Type:
string
Required:true
The asset language of the request
Body Parameter
Root Schema : updateSite_request
{
"properties":{
"priceListGroupList":[
{
"id":"EURO"
},
{
"id":"defaultPriceGroup"
}
],
"name":"CloudLake US Site test",
"siteTypes":[
"b2bCommerce"
]
}
}
- properties
-
Type:
object
propertiesRequired:true
Additional Properties Allowed:Object with updatable properties.
Nested Schema : properties
Type:
object
Object with updatable properties.
- additionalLocaleIds
-
Type:
array
additionalLocaleIdsAdditional Properties Allowed:Additional locale IDs. - additionalProductionURLs
-
Type:
array
additionalProductionURLsAdditional Properties Allowed:The additional production URLs. - defaultBillingCountryId
-
Type:
string
Default billing country ID. - defaultCatalog
-
Type:
object
defaultCatalogAdditional Properties Allowed:The default catalog. - defaultLocaleId
-
Type:
string
The default locale ID. - defaultPriceListGroup
-
Type:
object
defaultPriceListGroupAdditional Properties Allowed:Default priceListGroup to be associated with site. - defaultSite
-
Type:
boolean
A boolean psuedo-property indicating that this site is the default site. - description
-
Type:
string
A description of the site. - enabled
-
Type:
boolean
Whether the site is enabled. - favicon
-
Type:
string
The favorite icon URL. - id
-
Type:
string
The repository ID of the site. - longDescription
-
Type:
string
A long description of the site. - loyaltyPrograms
-
Type:
array
loyaltyProgramsAdditional Properties Allowed:List of loyalty programs associated with site. - name
-
Type:
string
Required:true
Name of the site. - noimage
-
Type:
string
The no image icon URL. - priceListGroupList
-
Type:
array
priceListGroupListAdditional Properties Allowed:List of priceListGroups to be associated with site. - productionURL
-
Type:
string
The production URL. - recommendationsHost
-
Type:
string
The host name of the recommendations server. - recommendationsPort
-
Type:
string
The port of the recommendations server - repositoryId
-
Type:
string
The repository ID of the site. - secondaryCurrency
-
Type:
string
Currency used for calculating shipping and tax for loyalty. This must be in Uppercase - shipFromAddress
-
Type:
object
shipFromAddressAdditional Properties Allowed:The ship from address used for tax calculations. - siteTypes
-
Type:
array
siteTypesAdditional Properties Allowed:List of site types supported by this site - timeToLive
-
Type:
integer
It contains value in milliseconds. - timezone
-
Type:
string
The time zone for this site.
Nested Schema : additionalLocaleIds
Nested Schema : additionalProductionURLs
Nested Schema : defaultCatalog
Type:
object
The default catalog.
- repositoryId
-
Type:
string
The repository ID of the default catalog.
Nested Schema : defaultPriceListGroup
Type:
object
Default priceListGroup to be associated with site.
- id
-
Type:
string
Required:true
ID of default price list group.
Nested Schema : loyaltyPrograms
Nested Schema : priceListGroupList
Nested Schema : shipFromAddress
Type:
object
The ship from address used for tax calculations.
- addressLine1
-
Type:
string
Ship from address line 1 - addressLine2
-
Type:
string
Ship from address line 2 - addressLine3
-
Type:
string
Ship from address line 3 - city
-
Type:
string
Ship from city - country
-
Type:
string
Ship from country - postalCode
-
Type:
string
Ship from postal code - region
-
Type:
string
Ship from region
Nested Schema : siteTypes
Nested Schema : items
Type:
object
- programId
-
Type:
string
Loyalty Program Id. - programName
-
Type:
string
Name for loyalty program.
Nested Schema : items
Type:
object
- id
-
Type:
string
Required:true
priceListGroup id to be associated
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateSite_response
- activeTheme
-
Type:
string
The activeTheme for the site. - additionalLocaleIds
-
Type:
array
additionalLocaleIdsAdditional Properties Allowed:Additional Country ids. - additionalProductionURLs
-
Type:
array
additionalProductionURLsAdditional Properties Allowed:A list of additional production URLs (without schema). Currently, only plain hostnames are supported. - allowedOriginMethods
-
Type:
object
allowedOriginMethodsAdditional Properties Allowed:{ "type":"string" }
Map of hostname (key) and the allowed http methods (values) for that host. - defaultBillingCountryId
-
Type:
string
Default billing country ID. - defaultCatalog
-
Type:
object
defaultCatalogAdditional Properties Allowed:The default catalog id. - defaultLocaleId
-
Type:
string
Default locale ID. - defaultPriceListGroup
-
Type:
object
defaultPriceListGroupAdditional Properties Allowed:The default PLG for the site. - defaultShippingCountryId
-
Type:
string
Default shipping country ID. - defaultSite
-
Type:
string
Whether this is the default site - description
-
Type:
string
Site description. - enabled
-
Type:
boolean
Whether the site is enabled - favicon
-
Type:
string
The favorite icon URL. - id
-
Type:
string
ID of the site. - longDescription
-
Type:
string
Long site description. - loyaltyPrograms
-
Type:
array
loyaltyProgramsAdditional Properties Allowed:List of loyalty programs associated with site. - name
-
Type:
string
Site name. - noimage
-
Type:
string
The no image icon URL. - paymentOption
-
Type:
integer
The payment option for the site - priceListGroupList
-
Type:
array
priceListGroupListAdditional Properties Allowed:List of Price List Groups associated with the site including default Price List Group - productionURL
-
Type:
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
-
Type:
string
The host name of the recommendations server. - recommendationsPort
-
Type:
string
The port of the recommendations server - repositoryId
-
Type:
string
Repository ID of the site. - secondaryCurrency
-
Type:
string
Currency used for calculating shipping and tax for loyalty. - shipFromAddress
-
Type:
object
shipFromAddressAdditional Properties Allowed:The ship from address used for tax calculations. - siteTypes
-
Type:
array
siteTypesAdditional Properties Allowed:List of site types supported by this site - timeToLive
-
Type:
integer
The hold price time value in milliseconds. - timezone
-
Type:
string
The time zone for this site.
Nested Schema : additionalLocaleIds
Nested Schema : additionalProductionURLs
Type:
array
A 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:
object
The default catalog id.
- displayName
-
Type:
string
The display name of the default catalog for the site. - id
-
Type:
string
The ID of the default catalog for the site. - repositoryId
-
Type:
string
The ID of the default catalog for the site.
Nested Schema : defaultPriceListGroup
Type:
object
The default PLG for the site.
- active
-
Type:
boolean
Whether the PLG is active - deleted
-
Type:
boolean
Whether the PLG is deleted - id
-
Type:
string
The priceListGroup id associated with the site. - repositoryId
-
Type:
string
The priceListGroup id associated with the site.
Nested Schema : loyaltyPrograms
Nested Schema : priceListGroupList
Nested Schema : shipFromAddress
Type:
object
The ship from address used for tax calculations.
- addressLine1
-
Type:
string
Ship from address line 1 - addressLine2
-
Type:
string
Ship from address line 2 - addressLine3
-
Type:
string
Ship from address line 3 - city
-
Type:
string
Ship from city - country
-
Type:
string
Ship from country - postalCode
-
Type:
string
Ship from postal code - region
-
Type:
string
Ship from region
Nested Schema : siteTypes
Nested Schema : items
Type:
object
- associationDate
-
Type:
string
Association date of loyalty program to site. - programId
-
Type:
string
Loyalty Program Id. - programName
-
Type:
string
Name for loyalty program. - repositoryId
-
Type:
string
The loyalty program id associated with the site.
Nested Schema : items
Type:
object
- active
-
Type:
boolean
true if priceListGroup is active otherwise false - deleted
-
Type:
boolean
true if priceListGroup is deleted otherwise false - id
-
Type:
string
priceListGroup id associated to site - repositoryId
-
Type:
string
priceListGroup id associated to site
Example application/json
{
"priceListGroupList":[
{
"repositoryId":"defaultPriceGroup",
"id":"defaultPriceGroup"
},
{
"repositoryId":"EURO",
"id":"EURO"
}
],
"favicon":null,
"timezone":"europe_london",
"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|
|------------------|------------------|
|100092|{0} is an invalid value for {1}.|
|30001|A site id is required to update a site|
|30004|Given Site id does not exist|
|30015|Invalid Site Base URL ''{0}'' specified.|
|30003|Update site failed|
|30014|Could not update site. Allowed site types are {0}|
|25015|set Property RepositoryItem Internal Error|
|25014|convert Input Property Type Internal Error|
|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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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": [ { "repositoryId": "defaultPriceGroup", "id": "defaultPriceGroup" }, { "repositoryId": "EURO", "id": "EURO" } ], "favicon": null, "timezone": "europe_london", "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"] }