updateProfileContextList
put
/ccadmin/v1/profileContextLists/{id}
Update Profile Context List. Update a profileContextList item. Note that when a profileContextList is updated, the JSON should contain a representation of all profileContexts. If the JSON array from the profileContexts property contains a single element, for example, then all other profileContexts will be deleted. Note that the "propertyName" property is all that is needed to identify an existing profileContext, so providing other properties that are unchanged is optional.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueThe ID of the profileContextList to be updated.
Body Parameter
Root Schema : updateProfileContextList_request
{
"profileContexts":[
{
"priceListGroupList":[
{
"id":"defaultPriceGroup"
}
],
"propertyName":"active",
"defaultPriceListGroup":{
"id":"defaultPriceGroup"
}
}
],
"id":"defaultProfileContextList"
}
- id
-
Type:
stringThe ID of the profileContextList item to be updated. (read-only) - profileContexts
-
Type:
arrayprofileContextsAdditional Properties Allowed:The ordered list of profileContexts.
Nested Schema : profileContexts
Nested Schema : items
Type:
object- defaultPriceListGroup
-
Type:
objectdefaultPriceListGroupAdditional Properties Allowed:The default priceListGroup for the profileContext. Properties other than "id" may be visible, but are not editable via this endpoint. - priceListGroupList
-
Type:
arraypriceListGroupListAdditional Properties Allowed:The list of available priceListGroups for the profileContext. Properties other than "id" may be visible, but cannot be updated by this endpoint. - propertyName
-
Type:
stringRequired:trueThe name of the profile boolean property that, when true on the current profile, will cause the profileContext to be active. A given property name can only appear once in the profileContexts list.
Nested Schema : defaultPriceListGroup
Type:
objectThe default priceListGroup for the profileContext. Properties other than "id" may be visible, but are not editable via this endpoint.
- id
-
Type:
stringRequired:trueThe ID of the default priceListGroup. Note that updating this ID merely updates a reference to an existing priceListGroup, and does not modify the priceListGroup itself.
Nested Schema : priceListGroupList
Nested Schema : items
Type:
object- id
-
Type:
stringThe ID of the priceListGroup. Note that updating the ID property just updates a reference to an existing priceListGroup, and does not modify the priceListGroup itself.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateProfileContextList_response
- id
-
Type:
stringThe ID of the profileContextList item. - profileContexts
-
Type:
arrayprofileContextsAdditional Properties Allowed:The ordered list of profileContexts. If present, this list much contain a representation of every profileContext to be retained. For existing profileContexts, only the "propertyName" property need be provided.
Nested Schema : profileContexts
Nested Schema : items
Type:
object- defaultPriceListGroup
-
Type:
objectdefaultPriceListGroupAdditional Properties Allowed:The default priceListGroup for the profile contexts - priceListGroupList
-
Type:
arraypriceListGroupListAdditional Properties Allowed:The array of available priceListGroups. This list should contain the defaultPriceListGroup, as well. - propertyName
-
Type:
stringThe name of the profile boolean property that, when true on the current profile, will cause the profileContext to (potentially) be active.
Nested Schema : defaultPriceListGroup
Type:
objectThe default priceListGroup for the profile contexts
- id
-
Type:
stringThe ID of the default price list group. Note that updating this ID merely updates a reference to an existing priceListGroup, and does not modify the priceListGroup itself.
Nested Schema : priceListGroupList
Nested Schema : items
Type:
object- id
-
Type:
stringThe ID of the priceListGroup.
Example application/json
{
"profileContexts":[
{
"priceListGroupList":[
{
"id":"defaultPriceGroup"
}
],
"propertyName":"active",
"defaultPriceListGroup":{
"id":"defaultPriceGroup"
}
}
],
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadmin/v1/profileContextLists/defaultProfileContextList"
}
],
"id":"defaultProfileContextList"
}
Default Response
The error response
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:
{
"profileContexts": [{
"priceListGroupList": [{"id": "defaultPriceGroup"}],
"propertyName": "active",
"defaultPriceListGroup": {"id": "defaultPriceGroup"}
}],
"id": "defaultProfileContextList"
}
Sample Response Payload returned by endpoint:
{
"profileContexts": [{
"priceListGroupList": [{"id": "defaultPriceGroup"}],
"propertyName": "active",
"defaultPriceListGroup": {"id": "defaultPriceGroup"}
}],
"links": [{
"rel": "self",
"href": "http://localhost:9080/ccadmin/v1/profileContextLists/defaultProfileContextList"
}],
"id": "defaultProfileContextList"
}