updateStackingRule

put

/ccadmin/v1/stackingRules/{id}

Update Stacking Rule. Update an existing stacking rule. **Requires the x-ccasset-language header so translated content can be set for a specific language.**

Request

Supported Media Types
  • application/json
Path Parameters
id
Type: string
Required: true
ID corresponding to the stacking rule to udpate.
Header Parameters
X-CCAsset-Language
Type: string
Required: true
The asset language of the request
Body Parameter
Root Schema : updateStackingRule_request
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
Nested Schema : promotions
Type: array
The promotion's repository id/s that we want to set the stacking rule on.
Nested Schema : items
Type: object
Nested Schema : items
Type: object

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateStackingRule_response
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
Nested Schema : promotions
Type: array
The promotion's repository id/s that we want to set the stacking rule on.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example 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| |------------------|------------------| |21184|Stacking Rule not found for the given id: {nonExisting id}| |21171|No item found for the following type and ID: stackingRule, dd| |21182|The value "invalid" for property "maxPromotions" is not a valid number|
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 Request:

{
  "promotions": [
    {"repositoryId": "promo10001"},
    {"repositoryId": "promo10002"}
  ],
  "maxPromotions": 10,
  "displayName": "10% Off Orders Over $100 stacking rule",
  "excludedStackingRules": [
    {"repositoryId": "stack10001"},
    {"repositoryId": "stack10002"}
  ]
}

Sample Response Payload returned by endpoint:

{
  "promotions": [
    {"repositoryId": "promo10001"},
    {"repositoryId": "promo10002"}
  ],
  "maxPromotions": 10,
  "displayName": "10% Off Orders Over $100 stacking rule",
  "repositoryId": "stack10002",
  "id": "stack10002",
  "excludedStackingRules": [
    {"repositoryId": "stack10001"},
    {"repositoryId": "stack10002"}
  ]
}