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
Type: string
Id of the stacking rule to fetch the 'excludedStackingRules' property on it. id has to be combined with the appropriate propertyName.
limit
Type: integer
The number of items to return.
name
Type: string
This is a search filter value that will find stacking rules that match on the ID or display name.
offset
Type: integer
Index of the first element to return.
propertyName
Type: 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
Type: 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
Type: integer
The total number of items.

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listStackingRules_response
Nested Schema : items
Type: array
The items returned by the listing.
Nested Schema : sort
Type: array
Sorting criteria.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example 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|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "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"
    }
  ]
}