getStackingRule
get
/ccadmin/v1/stackingRules/{id}
Get Stacking Rule. Get a stacking rule by id. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
ID corresponding to the stacking rule to get.
Header Parameters
- X-CCAsset-Language
-
Type:
string
The asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getStackingRule_response
- displayName
-
Type:
string
The display name of the stacking rule. - excludedStackingRules
-
Type:
array
excludedStackingRulesAdditional Properties Allowed: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
-
Type:
string
The stacking rule id. - maxPromotions
-
Type:
integer
The maximum number of promotions allowed per stacking rule. Default is -1 indicates unlimited. - promotions
-
Type:
array
promotionsAdditional Properties Allowed:The promotion's repository id/s that we want to set the stacking rule on.
Nested Schema : excludedStackingRules
Nested Schema : promotions
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
The stacking rules's repository id
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
The promotion's repository id
Example application/json
{
"promotions":[
{
"repositoryId":"promo10001"
},
{
"repositoryId":"promo10002"
}
],
"maxPromotions":10,
"displayName":"10% Off Orders Over $100 stacking rule",
"repositoryId":"stack10005",
"id":"stack10005",
"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|
|------------------|------------------|
|21184|Stacking Rule not found for the given id: {nonExisting id}|
|21183|Stacking Rule Id is blank|
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 Response Payload returned by endpoint:
{ "promotions": [ {"repositoryId": "promo10001"}, {"repositoryId": "promo10002"} ], "maxPromotions": 10, "displayName": "10% Off Orders Over $100 stacking rule", "repositoryId": "stack10005", "id": "stack10005", "excludedStackingRules": [ {"repositoryId": "stack10001"}, {"repositoryId": "stack10002"} ] }