listStackingRules
get
/ccadmin/v1/stackingRules
List Stacking Rules. Get a list of stacking rules including support for pagination and sorting.
Request
Supported Media Types
- application/json
Query Parameters
-
id(optional): string
Id of the stacking rule to fetch the 'excludedStackingRules' property on it. id has to be combined with the appropriate propertyName.
-
limit(optional): integer
The number of items to return.
-
name(optional): string
This is a search filter value that will find stacking rules that match on the ID or display name.
-
offset(optional): integer
Index of the first element to return.
-
propertyName(optional): string
Property name that stores a list of excludedStackingRule on a given stacking rule specified with an id. The propertyName can only be 'excludedStackingRule'
-
sort(optional): string
Sorting criteria. Following are the fields supported by this param: |Field|Type|Description| |------------------|------------------|------------------| |property|string|The property the listing is sorted by.| |order|string|Sort order: asc or desc.|
-
total(optional): integer
The total number of items.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : listStackingRules_response
Type:
Show Source
object
-
items(optional):
array items
The items returned by the listing.
-
limit(optional):
integer
The number of items to return.
-
offset(optional):
integer
Index of the first element to return.
-
sort(optional):
array sort
Sorting criteria.
-
total(optional):
integer
The total number of items. Deprecated.
-
totalResults(optional):
integer
The total number of items.
Nested Schema : items
Type:
Show Source
object
-
displayName(optional):
string
The display name of the stacking rule.
-
id(optional):
string
The stacking rule id.
-
maxPromotions(optional):
integer
The maximum number of promotions allowed per stacking rule.
Nested Schema : items
Type:
Show Source
object
-
order(optional):
string
Sort order: asc or desc.
-
property(optional):
string
The property the listing is sorted by.
Example Response (application/json)
{
"total":2,
"totalResults":2,
"offset":0,
"limit":2,
"sort":[
{
"property":"displayName",
"order":"asc"
}
],
"type":"promotion",
"items":[
{
"maxPromotions":10,
"displayName":"A new staking rule for item stacking rule",
"repositoryId":"stack20009",
"id":"stack20009"
},
{
"maxPromotions":5,
"displayName":"Brand new stacking rule ",
"repositoryId":"stack20011",
"id":"stack20011"
}
]
}
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|
|------------------|------------------|
|21175|id is a required property for this request.|
|21184|Stacking rule not found for the given id : nonExistingStackingruleId|
|21190|propertyName can only be excludedStackingRules for this request|
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