---
title: "Update bulk operation"
method: PUT
path: "/bulk-operations/{id}"
tags: ["Bulk Operations"]
---

# Update bulk operation

`PUT /bulk-operations/{id}`

Update an existing bulk operation. Used to modify operation parameters or retry failed rules.

## Path parameters

- `id` string, required

## Query parameters

- `fields` string[]

## Headers

- `If-Match` string

## Request body

- union
  - DeleteRuleBulkOperationRequest — Details about the bulk operation.
    - `type` 'deleteRule', required — Discriminator for the operation type. Must be `deleteRule` for this operation.
    - `ruleIds` string[] — List of rule IDs to operate on. These will be put into the operation in addition to the rules matching the specification, if any.
    - `ruleExternalIds` string[] — List of rule external IDs to operate on. These will be put into the operation in addition to the rules matching the specification or referenced by ruleIds, if any.
    - `excludeRuleIds` string[] — List of rule IDs to exclude from the operation. These will be excluded even if they match the specification or are included in ruleIds.
    - `excludeRuleExternalIds` string[] — List of rule external IDs to exclude from the operation. These will be excluded even if they match the specification, are included in ruleIds, or are included in ruleExternalIds.
    - `specification` RuleSpecification — Filter for rules.
      - `searchQuery` string
      - `tags` string[]
      - `groups` string[]
      - `types` string[] — Types of rules to filter by (using OR logic).
      - `publishState` 'DRAFT' | 'PUBLISHED' | 'PUBLISHED_WITH_DRAFT_EDITS' — Filter by publish state (DRAFT, PUBLISHED, PUBLISHED_WITH_DRAFT_EDITS).
      - `published` boolean
      - `targetedDocumentId` string
      - `targetedDocumentIdField` string
      - `activeDateStart` string, date-time
      - `activeDateEnd` string, date-time
      - `expirationDateStart` string, date-time
      - `expirationDateEnd` string, date-time
      - `lastModifiedStart` string, date-time
      - `lastModifiedEnd` string, date-time
      - `createdStart` string, date-time
      - `createdEnd` string, date-time
      - `contentType` 'RULE' | 'QUERY_REWRITE'
  - EditRuleBulkOperationRequest — Details about the bulk operation.
    - `type` 'editRule', required — Discriminator for the operation type. Must be `editRule` for this operation.
    - `ruleIds` string[] — List of rule IDs to operate on. These will be put into the operation in addition to the rules matching the specification, if any.
    - `ruleExternalIds` string[] — List of rule external IDs to operate on. These will be put into the operation in addition to the rules matching the specification or referenced by ruleIds, if any.
    - `excludeRuleIds` string[] — List of rule IDs to exclude from the operation. These will be excluded even if they match the specification or are included in ruleIds.
    - `excludeRuleExternalIds` string[] — List of rule external IDs to exclude from the operation. These will be excluded even if they match the specification, are included in ruleIds, or are included in ruleExternalIds.
    - `specification` RuleSpecification — Filter for rules.
      - `searchQuery` string
      - `tags` string[]
      - `groups` string[]
      - `types` string[] — Types of rules to filter by (using OR logic).
      - `publishState` 'DRAFT' | 'PUBLISHED' | 'PUBLISHED_WITH_DRAFT_EDITS' — Filter by publish state (DRAFT, PUBLISHED, PUBLISHED_WITH_DRAFT_EDITS).
      - `published` boolean
      - `targetedDocumentId` string
      - `targetedDocumentIdField` string
      - `activeDateStart` string, date-time
      - `activeDateEnd` string, date-time
      - `expirationDateStart` string, date-time
      - `expirationDateEnd` string, date-time
      - `lastModifiedStart` string, date-time
      - `lastModifiedEnd` string, date-time
      - `createdStart` string, date-time
      - `createdEnd` string, date-time
      - `contentType` 'RULE' | 'QUERY_REWRITE'
    - `patch` JsonNode, required — Query parameters to be passed to Fusion in the body.
    - `stageChanges` boolean — When true, the patch is applied to staging content only for any published rule, using the current live content as the baseline (discarding any existing staged changes). Has no effect on unpublished rules.
  - MigrateRuleBulkOperationRequest — Details about the bulk operation.
    - `type` 'migrateRule', required — Discriminator for the operation type. Must be `migrateRule` for this operation.
    - `ruleIds` string[] — List of rule IDs to operate on. These will be put into the operation in addition to the rules matching the specification, if any.
    - `ruleExternalIds` string[] — List of rule external IDs to operate on. These will be put into the operation in addition to the rules matching the specification or referenced by ruleIds, if any.
    - `excludeRuleIds` string[] — List of rule IDs to exclude from the operation. These will be excluded even if they match the specification or are included in ruleIds.
    - `excludeRuleExternalIds` string[] — List of rule external IDs to exclude from the operation. These will be excluded even if they match the specification, are included in ruleIds, or are included in ruleExternalIds.
    - `specification` RuleSpecification — Filter for rules.
      - `searchQuery` string
      - `tags` string[]
      - `groups` string[]
      - `types` string[] — Types of rules to filter by (using OR logic).
      - `publishState` 'DRAFT' | 'PUBLISHED' | 'PUBLISHED_WITH_DRAFT_EDITS' — Filter by publish state (DRAFT, PUBLISHED, PUBLISHED_WITH_DRAFT_EDITS).
      - `published` boolean
      - `targetedDocumentId` string
      - `targetedDocumentIdField` string
      - `activeDateStart` string, date-time
      - `activeDateEnd` string, date-time
      - `expirationDateStart` string, date-time
      - `expirationDateEnd` string, date-time
      - `lastModifiedStart` string, date-time
      - `lastModifiedEnd` string, date-time
      - `createdStart` string, date-time
      - `createdEnd` string, date-time
      - `contentType` 'RULE' | 'QUERY_REWRITE'
    - `targetExperienceManagerInstanceId` string, uuid, required — ID of the Commerce Studio destination instance.
    - `published` boolean — Whether the migrated rules should be created in the destination as published (true) or in draft state (false).
  - PublishRuleBulkOperationRequest — Details about the bulk operation.
    - `type` 'publishRule', required — Discriminator for the operation type. Must be `publishRule` for this operation.
    - `ruleIds` string[] — List of rule IDs to operate on. These will be put into the operation in addition to the rules matching the specification, if any.
    - `ruleExternalIds` string[] — List of rule external IDs to operate on. These will be put into the operation in addition to the rules matching the specification or referenced by ruleIds, if any.
    - `excludeRuleIds` string[] — List of rule IDs to exclude from the operation. These will be excluded even if they match the specification or are included in ruleIds.
    - `excludeRuleExternalIds` string[] — List of rule external IDs to exclude from the operation. These will be excluded even if they match the specification, are included in ruleIds, or are included in ruleExternalIds.
    - `specification` RuleSpecification — Filter for rules.
      - `searchQuery` string
      - `tags` string[]
      - `groups` string[]
      - `types` string[] — Types of rules to filter by (using OR logic).
      - `publishState` 'DRAFT' | 'PUBLISHED' | 'PUBLISHED_WITH_DRAFT_EDITS' — Filter by publish state (DRAFT, PUBLISHED, PUBLISHED_WITH_DRAFT_EDITS).
      - `published` boolean
      - `targetedDocumentId` string
      - `targetedDocumentIdField` string
      - `activeDateStart` string, date-time
      - `activeDateEnd` string, date-time
      - `expirationDateStart` string, date-time
      - `expirationDateEnd` string, date-time
      - `lastModifiedStart` string, date-time
      - `lastModifiedEnd` string, date-time
      - `createdStart` string, date-time
      - `createdEnd` string, date-time
      - `contentType` 'RULE' | 'QUERY_REWRITE'
  - UnpublishRuleBulkOperationRequest — Details about the bulk operation.
    - `type` 'unpublishRule', required — Discriminator for the operation type. Must be `unpublishRule` for this operation.
    - `ruleIds` string[] — List of rule IDs to operate on. These will be put into the operation in addition to the rules matching the specification, if any.
    - `ruleExternalIds` string[] — List of rule external IDs to operate on. These will be put into the operation in addition to the rules matching the specification or referenced by ruleIds, if any.
    - `excludeRuleIds` string[] — List of rule IDs to exclude from the operation. These will be excluded even if they match the specification or are included in ruleIds.
    - `excludeRuleExternalIds` string[] — List of rule external IDs to exclude from the operation. These will be excluded even if they match the specification, are included in ruleIds, or are included in ruleExternalIds.
    - `specification` RuleSpecification — Filter for rules.
      - `searchQuery` string
      - `tags` string[]
      - `groups` string[]
      - `types` string[] — Types of rules to filter by (using OR logic).
      - `publishState` 'DRAFT' | 'PUBLISHED' | 'PUBLISHED_WITH_DRAFT_EDITS' — Filter by publish state (DRAFT, PUBLISHED, PUBLISHED_WITH_DRAFT_EDITS).
      - `published` boolean
      - `targetedDocumentId` string
      - `targetedDocumentIdField` string
      - `activeDateStart` string, date-time
      - `activeDateEnd` string, date-time
      - `expirationDateStart` string, date-time
      - `expirationDateEnd` string, date-time
      - `lastModifiedStart` string, date-time
      - `lastModifiedEnd` string, date-time
      - `createdStart` string, date-time
      - `createdEnd` string, date-time
      - `contentType` 'RULE' | 'QUERY_REWRITE'

## Response `200`

OK

---

[API](https://skmtc.dev/lucidworks/apis/rules-rewrites-api.md) · [All operations](https://skmtc.dev/lucidworks/apis/rules-rewrites-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lucidworks/rules-rewrites-api/revisions/f2d3747848e8/schema)
