Skip to main content

Update a Rule Promotion

PUT 

https://useast.api.elasticpath.com/v2/rule-promotions/:promotionID

Updates an existing Rule Promotion specified by its promotion ID. This includes both semantic and syntactic validation to ensure correctness. For example, the start date must be earlier than the end date.

Editable fields include:

  • name
  • description
  • enabled
  • start
  • end
  • automatic
  • stackable
  • override_stacking
  • rule_set

Please refer to the OpenAPI examples section on this page for sample update requests.

Request

Responses

OK

Authorization: http

name: BearerAuthtype: httpscheme: bearer

Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Parameters
— pathrequired
— headerrequired
Body required
{
  "data": {
    "type": "rule_promotion",
    "name": "string",
    "description": "string",
    "priority": 0,
    "enabled": true,
    "automatic": true,
    "stackable": true,
    "override_stacking": true,
    "start": "2024-07-29T15:51:28.071Z",
    "end": "2024-07-29T15:51:28.071Z",
    "rule_set": {
      "catalog_ids": [
        "string"
      ],
      "currencies": [
        "string"
      ],
      "rules": {
        "strategy": "string",
        "operator": "string",
        "args": [
          "string"
        ],
        "children": [
          {
            "strategy": "string",
            "operator": "string",
            "args": [
              "string"
            ]
          }
        ]
      },
      "actions": [
        {
          "strategy": "string",
          "args": [
            "string"
          ],
          "condition": {
            "strategy": "string",
            "children": [
              {
                "strategy": "string",
                "operator": "string",
                "args": [
                  "string"
                ]
              }
            ]
          },
          "limitations": {
            "max_discount": 0,
            "max_quantity": 0,
            "items": {
              "max_items": 0,
              "price_strategy": "cheapest"
            }
          }
        }
      ]
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!