updateSiteProperties
put
/ccstore/v1/profiles/current/siteProperties
Updates the site based properties for the current profile. Can be used to update multiple properties of multiple sites at the same time.
Request
Supported Media Types
- application/json
Query Parameters
- limit
-
Type:
integerThis is the field to specify the number of records to be fetched per REST call.- offset
Type:integerThis field specifies the offset/starting index from which data to be fetched.
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request.
Body Parameter
Root Schema : updateSiteProperties_request
{
"siteProperties":[
{
"site":{
"id":"100001"
},
"properties":{
"receiveEmail":"no"
}
},
{
"site":{
"id":"siteUS"
},
"properties":{
"receiveEmail":"yes"
}
}
]
}
- siteProperties
-
Type:
arraysitePropertiesAdditional Properties Allowed:The site related properties
Nested Schema : siteProperties
Nested Schema : items
Type:
object- properties
-
Type:
objectpropertiesAdditional Properties Allowed:The site related properties to be updated for the profile - site
-
Type:
objectsiteAdditional Properties Allowed:The site data
Nested Schema : properties
Type:
objectThe site related properties to be updated for the profile
- receiveEmail
-
Type:
stringIndicates whether the user should receive marketing emails on the current site. Can be yes or no.
Nested Schema : site
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateSiteProperties_response
- items
-
Type:
arrayitemsAdditional Properties Allowed:The list of site related properties for the profile - offset
-
Type:
integerThe start index of the list of records to be fetched - sort
-
Type:
stringSorting format
Nested Schema : items
Nested Schema : items
Type:
object- properties
-
Type:
objectpropertiesAdditional Properties Allowed:The site related properties for the profile - site
-
Type:
objectsiteAdditional Properties Allowed:The site data
Nested Schema : properties
Type:
objectThe site related properties for the profile
- receiveEmail
-
Type:
stringIndicates whether the user should receive marketing emails on the current site. Can be yes or no.
Nested Schema : site
Example application/json
{
"totalResults":2,
"endingIndex":250,
"offset":0,
"totalResultsParam":true,
"count":2,
"limit":250,
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstoreui/v1/profiles/current/siteProperties"
}
],
"sort":null,
"items":[
{
"site":{
"repositoryId":"100001",
"id":"100001"
},
"properties":{
"repositoryId":"100002",
"receiveEmail":"no"
}
},
{
"site":{
"id":"siteUS"
},
"properties":{
"receiveEmail":"yes"
}
}
],
"listingRequest":{
"endingIndex":250,
"correctedView":null,
"queryOptions":{
"precachedPropertyNames":null,
"doNotCacheQuery":false,
"sortDirectives":null,
"endingIndex":250,
"ignoreDuplicates":false,
"nthIndex":1,
"uncachedItems":false,
"uncachedItemsSet":false,
"startingIndex":0
},
"rqlString":null,
"QErrorCodeMap":null,
"QPropertyAliasMap":null,
"sort":null,
"startingIndex":0,
"QIgnoreCase":true,
"QString":null,
"filterProperties":[
"displayName",
"id"
],
"includeRqlInQueryGeneration":true,
"rqlStatement":null,
"expanded":false,
"scimParser":null,
"useSCIMForQ":true,
"limit":250,
"siteId":"siteUS",
"after":null,
"calculateTotalAvailable":true
},
"startingIndex":0,
"totalNumberOfItems":2
}
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|
|------------------|------------------|
|22031|Internal error during get profile properties.|
|22032|Error occured due to invalid data|
|22033|User is not logged in.|
|22034|No site found|
|22035|Error occured when site property not found.|
|22036|Internal error during update profile properties.|
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:
{"siteProperties": [
{
"site": {"id": "100001"},
"properties": {"receiveEmail": "no"}
},
{
"site": {"id": "siteUS"},
"properties": {"receiveEmail": "yes"}
}
]}
Sample Response Payload returned by endpoint:
{
"totalResults": 2,
"endingIndex": 250,
"offset": 0,
"totalResultsParam": true,
"count": 2,
"limit": 250,
"links": [{
"rel": "self",
"href": "http://localhost:8080/ccstoreui/v1/profiles/current/siteProperties"
}],
"sort": null,
"items": [
{
"site": {
"repositoryId": "100001",
"id": "100001"
},
"properties": {
"repositoryId": "100002",
"receiveEmail": "no"
}
},
{
"site": {"id": "siteUS"},
"properties": {"receiveEmail": "yes"}
}
],
"listingRequest": {
"endingIndex": 250,
"correctedView": null,
"queryOptions": {
"precachedPropertyNames": null,
"doNotCacheQuery": false,
"sortDirectives": null,
"endingIndex": 250,
"ignoreDuplicates": false,
"nthIndex": 1,
"uncachedItems": false,
"uncachedItemsSet": false,
"startingIndex": 0
},
"rqlString": null,
"QErrorCodeMap": null,
"QPropertyAliasMap": null,
"sort": null,
"startingIndex": 0,
"QIgnoreCase": true,
"QString": null,
"filterProperties": [
"displayName",
"id"
],
"includeRqlInQueryGeneration": true,
"rqlStatement": null,
"expanded": false,
"scimParser": null,
"useSCIMForQ": true,
"limit": 250,
"siteId": "siteUS",
"after": null,
"calculateTotalAvailable": true
},
"startingIndex": 0,
"totalNumberOfItems": 2
}