createStackingRule
post
/ccadmin/v1/stackingRules
Create Stacking Rule. Create a new stacking rule. **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-CCAsset-Language: string
The asset language of the request
Root Schema : createStackingRule_request
Type:
Show Source
object
-
displayName:
string
The display name of the stacking rule.
-
excludedStackingRules(optional):
array excludedStackingRules
The stacking rules's repository id/s that we don't want combine with the current stacking rule. If the array is empty, that means this stackingRule can be combined with all stackingRules
-
maxPromotions:
integer
The maximum number of promotions allowed per stacking rule. Default is -1 indicates unlimited.
-
promotions(optional):
array promotions
The promotion's repository id/s that we want to set the stacking rule on.
Example:
{
"promotions":[
{
"repositoryId":"promo10001"
},
{
"repositoryId":"promo10002"
}
],
"maxPromotions":10,
"displayName":"10% Off Orders Over $100 stacking rule",
"excludedStackingRules":[
{
"repositoryId":"stack10001"
},
{
"repositoryId":"stack10002"
}
]
}
Nested Schema : excludedStackingRules
Type:
array
The stacking rules's repository id/s that we don't want combine with the current stacking rule. If the array is empty, that means this stackingRule can be combined with all stackingRules
Show Source
Nested Schema : promotions
Type:
array
The promotion's repository id/s that we want to set the stacking rule on.
Show Source
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The stacking rules's repository id
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The promotion's repository id
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createStackingRule_response
Type:
Show Source
object
-
displayName(optional):
string
The display name of the stacking rule.
-
excludedStackingRules(optional):
array excludedStackingRules
The stacking rules's repository id/s that we don't want combine with the current stacking rule. If the array is empty, that means this stackingRule can be combined with all stackingRules
-
id(optional):
string
The stacking rule id.
-
maxPromotions(optional):
integer
The maximum number of promotions allowed per stacking rule. Default is -1 indicates unlimited.
-
promotions(optional):
array promotions
The promotion's repository id/s that we want to set the stacking rule on.
Nested Schema : excludedStackingRules
Type:
array
The stacking rules's repository id/s that we don't want combine with the current stacking rule. If the array is empty, that means this stackingRule can be combined with all stackingRules
Show Source
Nested Schema : promotions
Type:
array
The promotion's repository id/s that we want to set the stacking rule on.
Show Source
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The stacking rules's repository id
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The promotion's repository id
Example Response (application/json)
{
"promotions":[
{
"repositoryId":"promo10001"
},
{
"repositoryId":"promo10002"
}
],
"maxPromotions":10,
"displayName":"10% Off Orders Over $100 stacking rule",
"repositoryId":"stack10002",
"id":"stack10002",
"excludedStackingRules":[
{
"repositoryId":"stack10001"
},
{
"repositoryId":"stack10002"
}
]
}
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|
|------------------|------------------|
|21189|Missing required property: displayName|
|21171|No item found for the following type and ID: stackingRule, dd|
|21182|The value "invalid" for property "maxPromotions" is not a valid number|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
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(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code