> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# BulkApproveRequestReview

# Package: cmsCompliance

# Namespace: CmsComplianceService

# Method link: https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-approve-request-review.md

## Permission Scopes:
Enterprise CMS compliance flow : SCOPE.ENTERPRISE.CMS-COMPLIANCE-MANAGE

## Introduction

Approves one or more previously submitted compliance review requests.

Approving applies each request's `action` to the underlying CMS data item and sets the item's
`requestReviewStatus` to `APPROVED`. Specify `prodCollectionId` and the compliance review requests
returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md)
or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md).
All the items belong to the collection specified by `prodCollectionId`.

Each item is resolved on its own `action`. `PUBLISH_DRAFT` and `PUBLISH_CHANGED` items are published
from their draft, `PUBLISH_PUBLISHED` items are already live so only their status is set, and
`UNPUBLISH_PUBLISHED` and `UNPUBLISH_CHANGED` items are unpublished. A single call can combine publish
and unpublish items. Each `UNPUBLISH_CHANGED` item must specify its own `versionOnUnpublish`, or the
call fails with `INVALID_VERSION_ON_UNPUBLISH`.

Every item must still exist in the collection version its action requires. If any item is missing, the
whole call fails with `DATA_ITEMS_NOT_FOUND` and nothing is published, unpublished, or updated.

Publishing, unpublishing, and the status update each resolve per item, so individual items can fail
while the rest succeed. Read `publishResult`, `unpublishResult`, and `statusUpdateResults` for the
outcome of each item. The status is set before publishing but after unpublishing, so a `PUBLISH_*`
item can be `APPROVED` without having been published, while an `UNPUBLISH_*` item is set to
`APPROVED` only once it was unpublished. Read the content results, not the status, to confirm what
actually changed.

To reject review requests instead, call
[Bulk Reject Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-reject-request-review.md).

---

## REST API

### Schema

```
 Method: bulkApproveRequestReview
 Description: Approves one or more previously submitted compliance review requests.  Approving applies each request's `action` to the underlying CMS data item and sets the item's `requestReviewStatus` to `APPROVED`. Specify `prodCollectionId` and the compliance review requests returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). All the items belong to the collection specified by `prodCollectionId`.  Each item is resolved on its own `action`. `PUBLISH_DRAFT` and `PUBLISH_CHANGED` items are published from their draft, `PUBLISH_PUBLISHED` items are already live so only their status is set, and `UNPUBLISH_PUBLISHED` and `UNPUBLISH_CHANGED` items are unpublished. A single call can combine publish and unpublish items. Each `UNPUBLISH_CHANGED` item must specify its own `versionOnUnpublish`, or the call fails with `INVALID_VERSION_ON_UNPUBLISH`.  Every item must still exist in the collection version its action requires. If any item is missing, the whole call fails with `DATA_ITEMS_NOT_FOUND` and nothing is published, unpublished, or updated.  Publishing, unpublishing, and the status update each resolve per item, so individual items can fail while the rest succeed. Read `publishResult`, `unpublishResult`, and `statusUpdateResults` for the outcome of each item. The status is set before publishing but after unpublishing, so a `PUBLISH_*` item can be `APPROVED` without having been published, while an `UNPUBLISH_*` item is set to `APPROVED` only once it was unpublished. Read the content results, not the status, to confirm what actually changed.  To reject review requests instead, call [Bulk Reject Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-reject-request-review.md).
 URL: https://www.wixapis.com/cms-compliance/v1/bulk/approve-request-review
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  prodCollectionId, items, items.id, items.action, items.submittedByUserId, items.submittedByAccountId
 Method parameters: 
   param name: items | type: array<items> | description: Compliance review requests to approve, as returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). Each item's `id` must appear once per call. | required: true | validation: minItems 1, maxItems 100
              - name: id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item. | required: true | read-only: true | validation: format GUID
              - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item. | required: true 
                     - enum:
                     -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
                     -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
                     -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
                     -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
                     -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
              - name: submittedByUserId | type: string | description: GUID of the user who submitted the action. | required: true | read-only: true | validation: format GUID
              - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under. | required: true | read-only: true | validation: format GUID
   param name: prodCollectionId | type: prodCollectionId | description: GUID of the published CMS collection every item in the request belongs to. A single call approves items from a single collection. | required: true | validation: maxLength 256
 Return type: BulkApproveRequestReviewResponse
  - name: complianceReviewRequests | type: array<ComplianceReviewRequest> | description: Approved compliance review requests, in the same order as the request's `items`. The same objects are emitted in the [Bulk Review Approved](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-approved.md) event.  Each one is built from the data items as they stand in CMS at the moment the decision is made, not from the copy sent in the request. Their `requestReviewStatus` is therefore the value the items held before this call; the status this call wrote is in `statusUpdateResults`.  | validation: maxItems 100
     - ONE-OF: 
        - name: versionOnUnpublish | type: VersionOnUnpublish | description: Version to preserve as a draft after a changed item is unpublished.  Returned only for `UNPUBLISH_CHANGED`. Submitting and approving a review request both require it, so it's always returned there. Rejecting never unpublishes anything and doesn't require it, so it's returned only when the rejected request carried it.  | read-only: true 
             - enum:
             -     KEEP_LATEST_DRAFT_VERSION: Preserve the item's latest draft edits.
             -     KEEP_LIVE_PUBLISHED_VERSION: Preserve the item's current live version.
     - name: id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item.  | read-only: true | validation: format GUID
     - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.  
         - enum:
         -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
         -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
         -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
         -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
         -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
     - name: currentDataItem | type: DataItem | description: Published (live) version of the data item. Returned for every action except `PUBLISH_DRAFT`.  | read-only: true 
        - name: id | type: string | description: Data item GUID.  When an item is inserted into a collection, the item's GUID is automatically assigned a random value. You can optionally provide a custom GUID in `dataItem.id` when inserting the item. If you specify an GUID that already exists in the collection, the insertion will fail.  | validation: maxLength 128, immutable
        - name: dataCollectionId | type: string | description: GUID of the collection this item belongs to.  This is the user-defined collection identifier set when the collection is created (for example, `EvalCustomers`), not a GUID.  | read-only: true | validation: maxLength 256
        - name: data | type: object | description: Data item contents.  Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:  + `_id`: Item GUID. + `_createdDate`: Date and time the item was added to the collection. + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. + `_owner`: GUID of the user who created the item. Can be modified with site owner permissions.  
     - name: proposedDataItem | type: DataItem | description: Version of the data item proposed by the request. For `PUBLISH_PUBLISHED`, this is the same published item as `current_data_item`. Absent only for `UNPUBLISH_PUBLISHED`.  | read-only: true 
     - name: submittedAt | type: string | description: Date and time the action was submitted.  | read-only: true | validation: format date-time
     - name: submittedByUserId | type: string | description: GUID of the user who submitted the action.  | read-only: true | validation: format GUID
     - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under.  | read-only: true | validation: format GUID
     - name: submittedByEmail | type: string | description: Email address of the user who submitted the action.  Returned by `Request Review` and `Bulk Request Review`, and carried in the `ReviewRequested` and `BulkReviewRequested` events. Always absent from `Bulk Approve Request Review` and `Bulk Reject Request Review` and from the `BulkReviewApproved` and `BulkReviewRejected` events: a decision call identifies the submitter with the `submitted_by_user_id` the caller sends back, which isn't checked against the original submission, so no address is reported from it. Read the submitter's email from the submission event instead.  Absent on the submission paths too whenever it can't be resolved, and its absence is never an error: a submission made with an API key carries no user identity, so `submitted_by_user_id` holds the account id, and an address is reported only if that id resolves to a user. A failed or unavailable lookup is treated the same way rather than failing the call. Never an empty string: the field is simply omitted.  | read-only: true | validation: format EMAIL
  - name: publishResult | type: BulkPublishDataItemDraftsResponse | description: Results of publishing the items whose action starts with `PUBLISH`, with 1 entry per item the call tried to publish. Each entry's `itemMetadata` reports whether that item was published, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `PUBLISH`.  
     - name: results | type: array<BulkPublishDataItemDraftResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true`, the published item.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
           - name: id | type: string | description: Item GUID. Does not appear if the item GUID is missing. For example, when item creation fails.  | validation: maxLength 128
           - name: originalIndex | type: integer | description: Original index of the item in the array specified in the request. Use this to match items in the request with those in the response.  
           - name: success | type: boolean | description: Whether the requested action was successful. When `false`, the `error` field is populated.  
           - name: error | type: ApplicationError | description: In case of failure, the error details.  
              - name: code | type: string | description: Error code.  
              - name: description | type: string | description: Description of the error.  
              - name: data | type: object | description: Data related to the error.  
        - name: dataItem | type: DataItem | description: Published data item.  Returned only when `returnEntity` is `true` and this item was published successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
        - name: totalSuccesses | type: integer | description: Number of items successfully processed.  
        - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
  - name: unpublishResult | type: BulkUnpublishDataItemsResponse | description: Results of unpublishing the items whose action starts with `UNPUBLISH`, with 1 entry per item the call tried to unpublish. Each entry's `itemMetadata` reports whether that item was unpublished, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `UNPUBLISH`.  
     - name: results | type: array<BulkUnpublishDataItemsResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true` and `copyToDraft` isn't `false`, the resulting draft.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
        - name: dataItem | type: DataItem | description: Draft created from the unpublished data item.  Returned only when `returnEntity` is `true`, `copyToDraft` isn't `false`, and this item was unpublished successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
  - name: statusUpdateResults | type: array<BulkUpdateDataItemsResponse> | description: Results of setting `requestReviewStatus` to `APPROVED`. Within each entry, `results` holds 1 entry per item, whose `itemMetadata` reports whether the status was set and whose `itemMetadata.originalIndex` is the item's position in the request's `items` array.  The status is set in one update per publishing direction, and there's 1 entry here per update, not per item. A batch whose actions all start with `PUBLISH`, or all start with `UNPUBLISH`, therefore returns a single entry covering every item in it. A batch that mixes the two returns 2 entries, the first covering its `PUBLISH_*` items and the second its `UNPUBLISH_*` items.  `PUBLISH_*` items are always covered, because their status is set before they're published. An `UNPUBLISH_*` item is covered only if it was unpublished successfully, so a batch whose unpublishes all failed has no second entry at all. This isn't a complete list of the items in the request: for any item missing from it, read `unpublishResult` to see why.  | validation: maxItems 2
     - name: results | type: array<BulkDataItemResult> | description: Information about the updated items.  
        - name: action | type: BulkActionType | description: Action attempted for the data item.  
             - enum: UNKNOWN_ACTION_TYPE, INSERT, UPDATE, DELETE, PATCH
        - name: itemMetadata | type: ItemMetadata | description: Item metadata.  
        - name: dataItem | type: DataItem | description: Updated data item.  Returned if `returnEntity` is set to `true` and the action is successful.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk action metadata.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: DUPLICATE_ITEM_ID | Description: The same item id appears more than once in `items`. Each id may only be submitted once per call.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_VERSION_ON_UNPUBLISH | Description: An `UNPUBLISH_CHANGED` item doesn't specify a recognized `versionOnUnpublish`.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_ACTION | Description: An item's `action` is missing or isn't a recognized review action.
   HTTP Code: 401 | Status Code: UNAUTHENTICATED | Application Code: MISSING_IDENTITY | Description: The request identity doesn't include the required account GUID.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: DATA_ITEMS_NOT_FOUND | Description: Couldn't find one or more of the data items in the collection version their `action` requires. The whole call fails and nothing is changed.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CMS_METASITE_NOT_RESOLVED | Description: Couldn't resolve the account's CMS metasite. Exactly one `ACCOUNT_MASTER_CMS` metasite must exist for the account.


```

### Examples

### Approve a batch that mixes publish and unpublish items
Approves 2 review requests from the same collection, one PUBLISH_CHANGED and one UNPUBLISH_CHANGED. Because the batch mixes the two directions and both succeeded, statusUpdateResults holds 2 entries, one per direction. The wix-site-id header selects the site whose CMS holds the collection; omit it to call the account's CMS.

```curl
curl -X POST \
'https://www.wixapis.com/cms-compliance/v1/bulk/approve-request-review' \
-H 'Authorization: <AUTH>' \
-H 'wix-site-id: <SITE_ID>' \
-H 'Content-Type: application/json' \
-d '{
  "prodCollectionId": "Announcements",
  "items": [
    {
      "id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
      "action": "PUBLISH_CHANGED",
      "submittedAt": "2024-01-15T10:30:00.000Z",
      "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
      "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8"
    },
    {
      "id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
      "action": "UNPUBLISH_CHANGED",
      "versionOnUnpublish": "KEEP_LATEST_DRAFT_VERSION",
      "submittedAt": "2024-01-15T10:30:00.000Z",
      "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
      "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8"
    }
  ]
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.enterpriseCmsCompliance.enterpriseCmsCompliance.bulkApproveRequestReview(prodCollectionId, options)
 Description: Approves one or more previously submitted compliance review requests.  Approving applies each request's `action` to the underlying CMS data item and sets the item's `requestReviewStatus` to `APPROVED`. Specify `prodCollectionId` and the compliance review requests returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). All the items belong to the collection specified by `prodCollectionId`.  Each item is resolved on its own `action`. `PUBLISH_DRAFT` and `PUBLISH_CHANGED` items are published from their draft, `PUBLISH_PUBLISHED` items are already live so only their status is set, and `UNPUBLISH_PUBLISHED` and `UNPUBLISH_CHANGED` items are unpublished. A single call can combine publish and unpublish items. Each `UNPUBLISH_CHANGED` item must specify its own `versionOnUnpublish`, or the call fails with `INVALID_VERSION_ON_UNPUBLISH`.  Every item must still exist in the collection version its action requires. If any item is missing, the whole call fails with `DATA_ITEMS_NOT_FOUND` and nothing is published, unpublished, or updated.  Publishing, unpublishing, and the status update each resolve per item, so individual items can fail while the rest succeed. Read `publishResult`, `unpublishResult`, and `statusUpdateResults` for the outcome of each item. The status is set before publishing but after unpublishing, so a `PUBLISH_*` item can be `APPROVED` without having been published, while an `UNPUBLISH_*` item is set to `APPROVED` only once it was unpublished. Read the content results, not the status, to confirm what actually changed.  To reject review requests instead, call [Bulk Reject Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-reject-request-review.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  prodCollectionId, options.items, options.items._id, options.items.action, options.items.submittedByUserId, options.items.submittedByAccountId, options
 Method parameters: 
   param name: prodCollectionId | type: string | description: GUID of the published CMS collection every item in the request belongs to. A single call approves items from a single collection. | required: true | validation: maxLength 256
   param name: options | type: BulkApproveRequestReviewOptions  none | required: true 
        - name: items | type: array<ComplianceReviewRequest> | description: Compliance review requests to approve, as returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). Each item's `id` must appear once per call. | required: true | validation: minItems 1, maxItems 100
           - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.  
                 - enum:
                 -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
                 -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
                 -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
                 -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
                 -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
 Return type: PROMISE<BulkApproveRequestReviewResponse>
  - name: complianceReviewRequests | type: array<ComplianceReviewRequest> | description: Approved compliance review requests, in the same order as the request's `items`. The same objects are emitted in the [Bulk Review Approved](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/compliance-review-request-bulk-review-approved.md) event.  Each one is built from the data items as they stand in CMS at the moment the decision is made, not from the copy sent in the request. Their `requestReviewStatus` is therefore the value the items held before this call; the status this call wrote is in `statusUpdateResults`.  | validation: maxItems 100
     - ONE-OF: 
        - name: versionOnUnpublish | type: VersionOnUnpublish | description: Version to preserve as a draft after a changed item is unpublished.  Returned only for `UNPUBLISH_CHANGED`. Submitting and approving a review request both require it, so it's always returned there. Rejecting never unpublishes anything and doesn't require it, so it's returned only when the rejected request carried it.  | read-only: true 
             - enum:
             -     KEEP_LATEST_DRAFT_VERSION: Preserve the item's latest draft edits.
             -     KEEP_LIVE_PUBLISHED_VERSION: Preserve the item's current live version.
     - name: _id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item.  | read-only: true | validation: format GUID
     - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.  
         - enum:
         -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
         -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
         -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
         -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
         -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
     - name: currentDataItem | type: DataItem | description: Published (live) version of the data item. Returned for every action except `PUBLISH_DRAFT`.  | read-only: true 
        - name: _id | type: string | description: Data item GUID.  When an item is inserted into a collection, the item's GUID is automatically assigned a random value. You can optionally provide a custom GUID in `dataItem.id` when inserting the item. If you specify an GUID that already exists in the collection, the insertion will fail.  | validation: maxLength 128, immutable
        - name: dataCollectionId | type: string | description: GUID of the collection this item belongs to.  This is the user-defined collection identifier set when the collection is created (for example, `EvalCustomers`), not a GUID.  | read-only: true | validation: maxLength 256
        - name: data | type: object | description: Data item contents.  Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:  + `_id`: Item GUID. + `_createdDate`: Date and time the item was added to the collection. + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. + `_owner`: GUID of the user who created the item. Can be modified with site owner permissions.  
     - name: proposedDataItem | type: DataItem | description: Version of the data item proposed by the request. For `PUBLISH_PUBLISHED`, this is the same published item as `current_data_item`. Absent only for `UNPUBLISH_PUBLISHED`.  | read-only: true 
     - name: submittedAt | type: Date | description: Date and time the action was submitted.  | read-only: true 
     - name: submittedByUserId | type: string | description: GUID of the user who submitted the action.  | read-only: true | validation: format GUID
     - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under.  | read-only: true | validation: format GUID
     - name: submittedByEmail | type: string | description: Email address of the user who submitted the action.  Returned by `Request Review` and `Bulk Request Review`, and carried in the `ReviewRequested` and `BulkReviewRequested` events. Always absent from `Bulk Approve Request Review` and `Bulk Reject Request Review` and from the `BulkReviewApproved` and `BulkReviewRejected` events: a decision call identifies the submitter with the `submitted_by_user_id` the caller sends back, which isn't checked against the original submission, so no address is reported from it. Read the submitter's email from the submission event instead.  Absent on the submission paths too whenever it can't be resolved, and its absence is never an error: a submission made with an API key carries no user identity, so `submitted_by_user_id` holds the account id, and an address is reported only if that id resolves to a user. A failed or unavailable lookup is treated the same way rather than failing the call. Never an empty string: the field is simply omitted.  | read-only: true | validation: format EMAIL
  - name: publishResult | type: BulkPublishDataItemDraftsResponse | description: Results of publishing the items whose action starts with `PUBLISH`, with 1 entry per item the call tried to publish. Each entry's `itemMetadata` reports whether that item was published, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `PUBLISH`.  
     - name: results | type: array<BulkPublishDataItemDraftResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true`, the published item.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
           - name: _id | type: string | description: Item GUID. Does not appear if the item GUID is missing. For example, when item creation fails.  | validation: maxLength 128
           - name: originalIndex | type: integer | description: Original index of the item in the array specified in the request. Use this to match items in the request with those in the response.  
           - name: success | type: boolean | description: Whether the requested action was successful. When `false`, the `error` field is populated.  
           - name: error | type: ApplicationError | description: In case of failure, the error details.  
              - name: code | type: string | description: Error code.  
              - name: description | type: string | description: Description of the error.  
              - name: data | type: object | description: Data related to the error.  
        - name: dataItem | type: DataItem | description: Published data item.  Returned only when `returnEntity` is `true` and this item was published successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
        - name: totalSuccesses | type: integer | description: Number of items successfully processed.  
        - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
  - name: unpublishResult | type: BulkUnpublishDataItemsResponse | description: Results of unpublishing the items whose action starts with `UNPUBLISH`, with 1 entry per item the call tried to unpublish. Each entry's `itemMetadata` reports whether that item was unpublished, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `UNPUBLISH`.  
     - name: results | type: array<BulkUnpublishDataItemsResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true` and `copyToDraft` isn't `false`, the resulting draft.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
        - name: dataItem | type: DataItem | description: Draft created from the unpublished data item.  Returned only when `returnEntity` is `true`, `copyToDraft` isn't `false`, and this item was unpublished successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
  - name: statusUpdateResults | type: array<BulkUpdateDataItemsResponse> | description: Results of setting `requestReviewStatus` to `APPROVED`. Within each entry, `results` holds 1 entry per item, whose `itemMetadata` reports whether the status was set and whose `itemMetadata.originalIndex` is the item's position in the request's `items` array.  The status is set in one update per publishing direction, and there's 1 entry here per update, not per item. A batch whose actions all start with `PUBLISH`, or all start with `UNPUBLISH`, therefore returns a single entry covering every item in it. A batch that mixes the two returns 2 entries, the first covering its `PUBLISH_*` items and the second its `UNPUBLISH_*` items.  `PUBLISH_*` items are always covered, because their status is set before they're published. An `UNPUBLISH_*` item is covered only if it was unpublished successfully, so a batch whose unpublishes all failed has no second entry at all. This isn't a complete list of the items in the request: for any item missing from it, read `unpublishResult` to see why.  | validation: maxItems 2
     - name: results | type: array<BulkDataItemResult> | description: Information about the updated items.  
        - name: action | type: BulkActionType | description: Action attempted for the data item.  
             - enum: UNKNOWN_ACTION_TYPE, INSERT, UPDATE, DELETE, PATCH
        - name: itemMetadata | type: ItemMetadata | description: Item metadata.  
        - name: dataItem | type: DataItem | description: Updated data item.  Returned if `returnEntity` is set to `true` and the action is successful.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk action metadata.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: DUPLICATE_ITEM_ID | Description: The same item id appears more than once in `items`. Each id may only be submitted once per call.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_VERSION_ON_UNPUBLISH | Description: An `UNPUBLISH_CHANGED` item doesn't specify a recognized `versionOnUnpublish`.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_ACTION | Description: An item's `action` is missing or isn't a recognized review action.
   HTTP Code: 401 | Status Code: UNAUTHENTICATED | Application Code: MISSING_IDENTITY | Description: The request identity doesn't include the required account GUID.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: DATA_ITEMS_NOT_FOUND | Description: Couldn't find one or more of the data items in the collection version their `action` requires. The whole call fails and nothing is changed.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CMS_METASITE_NOT_RESOLVED | Description: Couldn't resolve the account's CMS metasite. Exactly one `ACCOUNT_MASTER_CMS` metasite must exist for the account.


```

### Examples

### Approve a batch that mixes publish and unpublish items
Approves 2 review requests from the same collection, one PUBLISH_CHANGED and one UNPUBLISH_CHANGED. Because the batch mixes the two directions and both succeeded, statusUpdateResults holds 2 entries, one per direction.

```javascript
import { enterpriseCmsCompliance } from "@wix/enterprise-cms-compliance";

async function bulkApproveRequestReview() {
  const response = await enterpriseCmsCompliance.bulkApproveRequestReview(
    "Announcements",
    {
      items: [
        {
          _id: "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
          action: "PUBLISH_CHANGED",
          submittedAt: new Date("2024-01-15T10:30:00.000Z"),
          submittedByUserId: "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
          submittedByAccountId: "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8",
        },
        {
          _id: "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
          action: "UNPUBLISH_CHANGED",
          versionOnUnpublish: "KEEP_LATEST_DRAFT_VERSION",
          submittedAt: new Date("2024-01-15T10:30:00.000Z"),
          submittedByUserId: "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
          submittedByAccountId: "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8",
        },
      ],
    },
  );
}

/* Promise resolves to:
 * {
 *   "complianceReviewRequests": [
 *     {
 *       "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *       "action": "PUBLISH_CHANGED",
 *       "currentDataItem": {
 *         "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *         "dataCollectionId": "Announcements",
 *         "data": {
 *           "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *           "_createdDate": "2024-01-14T09:12:40.738Z",
 *           "_updatedDate": "2024-01-14T09:12:40.738Z",
 *           "status": "published",
 *           "title": "Q3 disclosure"
 *         }
 *       },
 *       "proposedDataItem": {
 *         "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *         "dataCollectionId": "Announcements__drafts",
 *         "data": {
 *           "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *           "_createdDate": "2024-01-15T10:28:10.264Z",
 *           "_updatedDate": "2024-01-15T10:28:10.264Z",
 *           "status": "draft",
 *           "title": "Q3 disclosure (revised)"
 *         }
 *       },
 *       "submittedAt": "2024-01-15T10:30:00Z",
 *       "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
 *       "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8"
 *     },
 *     {
 *       "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *       "action": "UNPUBLISH_CHANGED",
 *       "currentDataItem": {
 *         "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *         "dataCollectionId": "Announcements",
 *         "data": {
 *           "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *           "_createdDate": "2024-01-14T09:12:40.737Z",
 *           "_updatedDate": "2024-01-14T09:12:40.737Z",
 *           "status": "published",
 *           "title": "Annual compliance statement"
 *         }
 *       },
 *       "proposedDataItem": {
 *         "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *         "dataCollectionId": "Announcements__drafts",
 *         "data": {
 *           "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *           "_createdDate": "2024-01-15T10:28:10.263Z",
 *           "_updatedDate": "2024-01-15T10:28:10.263Z",
 *           "status": "draft",
 *           "title": "Annual compliance statement (revised)"
 *         }
 *       },
 *       "submittedAt": "2024-01-15T10:30:00Z",
 *       "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
 *       "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8",
 *       "versionOnUnpublish": "KEEP_LATEST_DRAFT_VERSION"
 *     }
 *   ],
 *   "publishResult": {
 *     "results": [
 *       {
 *         "itemMetadata": {
 *           "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *           "originalIndex": 0,
 *           "success": true
 *         }
 *       }
 *     ],
 *     "bulkActionMetadata": {
 *       "totalSuccesses": 1,
 *       "totalFailures": 0
 *     }
 *   },
 *   "unpublishResult": {
 *     "results": [
 *       {
 *         "itemMetadata": {
 *           "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *           "originalIndex": 1,
 *           "success": true
 *         }
 *       }
 *     ],
 *     "bulkActionMetadata": {
 *       "totalSuccesses": 1,
 *       "totalFailures": 0
 *     }
 *   },
 *   "statusUpdateResults": [
 *     {
 *       "results": [
 *         {
 *           "action": "UPDATE",
 *           "itemMetadata": {
 *             "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *             "originalIndex": 0,
 *             "success": true
 *           },
 *           "dataItem": {
 *             "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *             "dataCollectionId": "Announcements__drafts",
 *             "data": {
 *               "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *               "_createdDate": "2024-01-15T10:28:10.264Z",
 *               "_updatedDate": "2024-01-15T10:30:21.363Z",
 *               "status": "draft",
 *               "title": "Q3 disclosure (revised)",
 *               "requestReviewStatus": "APPROVED"
 *             }
 *           }
 *         }
 *       ],
 *       "bulkActionMetadata": {
 *         "totalSuccesses": 1,
 *         "totalFailures": 0
 *       }
 *     },
 *     {
 *       "results": [
 *         {
 *           "action": "UPDATE",
 *           "itemMetadata": {
 *             "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *             "originalIndex": 1,
 *             "success": true
 *           },
 *           "dataItem": {
 *             "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *             "dataCollectionId": "Announcements__drafts",
 *             "data": {
 *               "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *               "_createdDate": "2024-01-15T10:28:10.263Z",
 *               "_updatedDate": "2024-01-15T10:30:22.130Z",
 *               "status": "draft",
 *               "title": "Annual compliance statement (revised)",
 *               "requestReviewStatus": "APPROVED"
 *             }
 *           }
 *         }
 *       ],
 *       "bulkActionMetadata": {
 *         "totalSuccesses": 1,
 *         "totalFailures": 0
 *       }
 *     }
 *   ]
 * }
 */

```

### bulkApproveRequestReview (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { enterpriseCmsCompliance } from '@wix/enterprise-cms-compliance';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { enterpriseCmsCompliance },
  // Include the auth strategy and host as relevant
});


async function bulkApproveRequestReview(prodCollectionId,options) {
  const response = await myWixClient.enterpriseCmsCompliance.bulkApproveRequestReview(prodCollectionId,options);
};
```

---