updateSiteProperties
put
/ccagent/v1/profiles/{id}/siteProperties
Update site properties for specific customer. Example: Update recieve email property with yes or no for specic site
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The customer profile id.
Body Parameter
Root Schema : updateSiteProperties_request
{
"siteProperties":[
{
"site":{
"id":"100001"
},
"properties":{
"receiveEmail":"no"
}
},
{
"site":{
"id":"siteUS"
},
"properties":{
"receiveEmail":"yes"
}
}
]
}
- siteProperties
-
Type:
array
sitePropertiesAdditional Properties Allowed:The site related properties
Nested Schema : siteProperties
Nested Schema : items
Type:
object
- properties
-
Type:
object
propertiesAdditional Properties Allowed:The site related properties to be updated for the profile - site
-
Type:
object
siteAdditional Properties Allowed:The site data
Nested Schema : properties
Type:
object
The site related properties to be updated for the profile
- receiveEmail
-
Type:
string
Indicates 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:
array
itemsAdditional Properties Allowed:The list of site related properties for the profile - offset
-
Type:
integer
The start index of the list of records to be fetched - sort
-
Type:
string
Sorting format
Nested Schema : items
Nested Schema : items
Type:
object
- properties
-
Type:
object
propertiesAdditional Properties Allowed:The site related properties for the profile - site
-
Type:
object
siteAdditional Properties Allowed:The site data
Nested Schema : properties
Type:
object
The site related properties for the profile
- receiveEmail
-
Type:
string
Indicates whether the user should receive marketing emails on the current site. Can be yes or no.
Nested Schema : site
Example application/json
{
"totalResults":1,
"endingIndex":250,
"offset":0,
"totalResultsParam":true,
"count":1,
"limit":250,
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccagentui/v1/profiles/se-570031/siteProperties"
}
],
"sort":null,
"items":[
{
"site":{
"id":"SiteA"
},
"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":null,
"after":null,
"calculateTotalAvailable":true
},
"startingIndex":0,
"totalNumberOfItems":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|
|------------------|------------------|
|200012|please provide valid input|
|23010|City not specified in shipping address|
|23011|Address line 1 not specified in shipping address|
|22000|The profile id passes is null or empty.|
|23012|No last name specified in shipping address|
|22001|Internal error while getting the profile.|
|23013|No first name specified in shipping address|
|22002|No profile found with the given id.|
|23015|Phone number not specified in shipping address|
|23005|Invalid phone number in shipping address|
|23007|No country specified in shipping address|
|23008|Postal code not specified in shipping address|
|22024|{0}({1}) must be a String|
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:
{"siteProperties": [{ "site": {"id": "SiteA"}, "properties": {"receiveEmail": "yes"} }]}
Sample Response Payload returned by endpoint:
{ "totalResults": 1, "endingIndex": 250, "offset": 0, "totalResultsParam": true, "count": 1, "limit": 250, "links": [{ "rel": "self", "href": "http://localhost:9080/ccagentui/v1/profiles/se-570031/siteProperties" }], "sort": null, "items": [{ "site": {"id": "SiteA"}, "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": null, "after": null, "calculateTotalAvailable": true }, "startingIndex": 0, "totalNumberOfItems": 1 }