> 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`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# BulkDeletePromotions

# Package: catalogV3

# Namespace: PromotionsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/promotions-v3/bulk-delete-promotions.md

## Permission Scopes:
Manage v3 catalog: SCOPE.STORES.CATALOG_WRITE

## Introduction

Deletes multiple promotions. Works synchronously.

To delete a single promotion, call [Delete Promotion](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/promotions-v3/delete-promotion.md).

---

## REST API

### Schema

```
 Method: bulkDeletePromotions
 Description: Deletes multiple promotions. Works synchronously.  To delete a single promotion, call [Delete Promotion](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/promotions-v3/delete-promotion.md).
 URL: https://www.wixapis.com/stores/v3/bulk/promotions/delete
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  promotionIds
 Method parameters: 
   param name: promotionIds | type: array<promotionIds> | description: IDs of the promotions to delete. | required: true | validation: minItems 1, maxItems 100, format GUID
 Return type: BulkDeletePromotionsResponse
  - name: results | type: array<BulkPromotionResult> | description: Results of the bulk delete operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for this specific delete operation.  
        - name: id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - 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: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk delete operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0


```

### Examples

### Bulk Delete Promotions
Deletes two promotions by ID.

```curl
curl -X POST \
  'https://www.wixapis.com/stores/v3/bulk/promotions/delete' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "promotionIds": [
      "27ba9dfc-71b2-4172-a2c5-32ce56f4a021",
      "5e8a91b3-4c6d-42fa-9f37-b16482d5c0da"
    ]
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.stores.promotionsV3.bulkDeletePromotions(promotionIds)
 Description: Deletes multiple promotions. Works synchronously.  To delete a single promotion, call [Delete Promotion](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/promotions-v3/delete-promotion.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  promotionIds
 Method parameters: 
   param name: promotionIds | type: array<array> | description: IDs of the promotions to delete. | required: true | validation: minItems 1, maxItems 100, format GUID
 Return type: PROMISE<BulkDeletePromotionsResponse>
  - name: results | type: array<BulkPromotionResult> | description: Results of the bulk delete operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for this specific delete operation.  
        - name: _id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - 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: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk delete operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0


```

### Examples

### Delete multiple promotions in one call
```javascript
import { promotionsV3 } from "@wix/stores";

const promotionIds = [
  "0aeeee8a-7039-4d01-975c-5786d4238222",
  "e8f9978b-dc12-455e-85db-a2b18b7c8fa6",
];

async function bulkDeletePromotions() {
  const response = await promotionsV3.bulkDeletePromotions(promotionIds);
  return response;
}

/* Promise resolves to:
 * {
 *   "results": [
 *     { "itemMetadata": { "originalIndex": 0, "success": true, "_id": "0aeeee8a-7039-4d01-975c-5786d4238222" } }
 *   ],
 *   "bulkActionMetadata": { "totalSuccesses": 2, "totalFailures": 0, "undetailedFailures": 0 }
 * }
 */

```

### bulkDeletePromotions (self-hosted)
Self-hosted 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 { promotionsV3 } from '@wix/stores';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function bulkDeletePromotions(promotionIds) {
  const response = await myWixClient.promotionsV3.bulkDeletePromotions(promotionIds);
};
```

---