> 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

# BulkUpdateAddOns

# Package: services

# Namespace: AddOnsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/bulk-update-add-ons.md

## Permission Scopes:
Manage Bookings: SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS

## Introduction

Updates multiple add-ons in a single request.

---

## REST API

### Schema

```
 Method: bulkUpdateAddOns
 Description: Updates multiple add-ons in a single request.
 URL: https://www.wixapis.com/addons/v1/bulk/add-ons/update
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  addOns, addOns.addOn.id, addOns.addOn.revision
 Method parameters: 
   param name: addOns | type: array<addOns> | description: List of add-ons to update. | required: true | validation: minItems 1, maxItems 100
              - name: addOn | type: AddOn | description: Add-on to update. May be partial.  
                 - ONE-OF: 
                    - name: durationInMinutes | type: integer | description: Duration in minutes for duration-based add-ons that extend offering time.  | validation: minimum 1, maximum 1440
                    - name: maxQuantity | type: integer | description: Maximum quantity customers can purchase for quantity-based add-ons.  | validation: minimum 1, maximum 9999
                 - name: id | type: string | description: Add-on GUID. | required: true | read-only: true | validation: format GUID
                 - name: revision | type: string | description: Revision number, which increments by 1 each time the add-on is updated. To prevent conflicting changes, the current revision must be passed when updating the add-on.  Ignored when creating an add-on. | required: true | read-only: true | validation: format int64
                 - name: name | type: string | description: Display name of the add-on shown to customers.  | validation: minLength 1, maxLength 100
                 - name: price | type: Money | description: Pricing information for the add-on.  
                    - name: value | type: string | description: Add-on price amount as a decimal string with period as decimal separator. For example, `3.99` for a $3.99 add-on or `15.00` for a $15.00 add-on.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":2}
                    - name: currency | type: string | description: Currency code for the add-on price. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. For example, `USD` for US dollars or `EUR` for euros.  | validation: format CURRENCY
                    - name: formattedValue | type: string | description: Add-on price amount as a decimal string in local format for display purposes. For example, `$3.99` for US format or `3,99 €` for European format.  | validation: maxLength 50
                 - name: taxGroup | type: string | description: GUID of the [tax group](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/tax-groups/introduction.md) to categorize the add-on for tax calculation in [Wix eCommerce](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction.md). Learn more about [how Wix eCommerce implements tax calculation](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/introduction.md).  This field doesn't apply to custom checkout/billing implementations.  | validation: format GUID
                 - name: mainMedia | type: MediaItem | description: Main image for the add-on.  
                    - ONE-OF: 
                       - name: image | type: Image | description: Add-on's main image.  
                          - name: id | type: string | description: WixMedia image GUID. To manage media assets, use the [Media Manager API](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction.md)  | validation: maxLength 2048
                          - name: url | type: string | description: Image URL.  | validation: maxLength 2048
                          - name: altText | type: string | description: Image alt text.  | validation: maxLength 2048
                 - name: extendedFields | type: ExtendedFields | description: Data extensions enabling users to save custom data related to the add-on.  
                    - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
                 - name: tags | type: Tags | description: [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction.md) assigned to add-ons for categorization and filtering purposes.  
                    - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
                       - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
                    - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
   param name: returnEntity | type: returnEntity | description: Whether to return the updated add-ons in the response.  
 Return type: BulkUpdateAddOnsResponse
  - name: results | type: array<BulkAddOnResult> | description: Results of the bulk update operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual update operation.  
        - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - 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: item | type: AddOn | description: Updated add-on. Only present if `return_entity` was set to true in the request.  
        - ONE-OF: 
           - name: durationInMinutes | type: integer | description: Duration in minutes for duration-based add-ons that extend offering time.  | validation: minimum 1, maximum 1440
           - name: maxQuantity | type: integer | description: Maximum quantity customers can purchase for quantity-based add-ons.  | validation: minimum 1, maximum 9999
        - name: id | type: string | description: Add-on GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the add-on is updated. To prevent conflicting changes, the current revision must be passed when updating the add-on.  Ignored when creating an add-on.  | read-only: true | validation: format int64
        - name: createdDate | type: string | description: Date and time the add-on was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the add-on was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time
        - name: name | type: string | description: Display name of the add-on shown to customers.  | validation: minLength 1, maxLength 100
        - name: price | type: Money | description: Pricing information for the add-on.  
           - name: value | type: string | description: Add-on price amount as a decimal string with period as decimal separator. For example, `3.99` for a $3.99 add-on or `15.00` for a $15.00 add-on.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":2}
           - name: currency | type: string | description: Currency code for the add-on price. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. For example, `USD` for US dollars or `EUR` for euros.  | validation: format CURRENCY
           - name: formattedValue | type: string | description: Add-on price amount as a decimal string in local format for display purposes. For example, `$3.99` for US format or `3,99 €` for European format.  | validation: maxLength 50
        - name: taxGroup | type: string | description: GUID of the [tax group](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/tax-groups/introduction.md) to categorize the add-on for tax calculation in [Wix eCommerce](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction.md). Learn more about [how Wix eCommerce implements tax calculation](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/introduction.md).  This field doesn't apply to custom checkout/billing implementations.  | validation: format GUID
        - name: mainMedia | type: MediaItem | description: Main image for the add-on.  
           - ONE-OF: 
              - name: image | type: Image | description: Add-on's main image.  
                 - name: id | type: string | description: WixMedia image GUID. To manage media assets, use the [Media Manager API](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction.md)  | validation: maxLength 2048
                 - name: url | type: string | description: Image URL.  | validation: maxLength 2048
                 - name: height | type: integer | description: Original image height.  | read-only: true 
                 - name: width | type: integer | description: Original image width.  | read-only: true 
                 - name: altText | type: string | description: Image alt text.  | validation: maxLength 2048
                 - name: filename | type: string | description: Image filename.  | read-only: true | validation: maxLength 2048
        - name: extendedFields | type: ExtendedFields | description: Data extensions enabling users to save custom data related to the add-on.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction.md) assigned to add-ons for categorization and filtering purposes.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk update operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### Bulk Update AddOns
Updates two AddOns

```curl
curl -X POST \
  'https://www.wixapis.com/addons/v1/bulk/add-ons/update' \
  -H 'authorization: <AUTH>' \
  --data-raw '{
    "addOns": [
      {
        "addOn": {
          "id": "0cc78b66-6f7a-4dab-b5b7-ee1bdca6346d",
          "revision": "11",
          "name": "Extended Aromatherapy Oil"
        }
      },
      {
        "addOn": {
          "id": "06a14b18-f5ba-4783-ad1a-9ce972ffe7b0",
          "revision": "1",
          "durationInMinutes": 10
        }
      }
    ],
    "returnEntity": true
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.addOns.bulkUpdateAddOns(addOns, options)
 Description: Updates multiple add-ons in a single request.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  addOns, addOns.addOn._id, addOns.addOn.revision
 Method parameters: 
   param name: addOns | type: array<MaskedAddOn> | description: List of add-ons to update. | required: true | validation: minItems 1, maxItems 100
              - name: addOn | type: AddOn | description: Add-on to update. May be partial.  
                 - ONE-OF: 
                    - name: durationInMinutes | type: integer | description: Duration in minutes for duration-based add-ons that extend offering time.  | validation: minimum 1, maximum 1440
                    - name: maxQuantity | type: integer | description: Maximum quantity customers can purchase for quantity-based add-ons.  | validation: minimum 1, maximum 9999
                 - name: _id | type: string | description: Add-on GUID. | required: true | read-only: true | validation: format GUID
                 - name: revision | type: string | description: Revision number, which increments by 1 each time the add-on is updated. To prevent conflicting changes, the current revision must be passed when updating the add-on.  Ignored when creating an add-on. | required: true | read-only: true | validation: format int64
                 - name: name | type: string | description: Display name of the add-on shown to customers.  | validation: minLength 1, maxLength 100
                 - name: price | type: Money | description: Pricing information for the add-on.  
                    - name: value | type: string | description: Add-on price amount as a decimal string with period as decimal separator. For example, `3.99` for a $3.99 add-on or `15.00` for a $15.00 add-on.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":2}
                    - name: currency | type: string | description: Currency code for the add-on price. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. For example, `USD` for US dollars or `EUR` for euros.  | validation: format CURRENCY
                    - name: formattedValue | type: string | description: Add-on price amount as a decimal string in local format for display purposes. For example, `$3.99` for US format or `3,99 €` for European format.  | validation: maxLength 50
                 - name: taxGroup | type: string | description: GUID of the [tax group](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/tax-groups/introduction.md) to categorize the add-on for tax calculation in [Wix eCommerce](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction.md). Learn more about [how Wix eCommerce implements tax calculation](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/introduction.md).  This field doesn't apply to custom checkout/billing implementations.  | validation: format GUID
                 - name: mainMedia | type: MediaItem | description: Main image for the add-on.  
                    - ONE-OF: 
                       - name: image | type: string | description: Add-on's main image.  
                 - name: extendedFields | type: ExtendedFields | description: Data extensions enabling users to save custom data related to the add-on.  
                    - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
                 - name: tags | type: Tags | description: [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction.md) assigned to add-ons for categorization and filtering purposes.  
                    - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
                       - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
                    - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
   param name: options | type: BulkUpdateAddOnsOptions  none  
        - name: returnEntity | type: boolean | description: Whether to return the updated add-ons in the response.  
 Return type: PROMISE<BulkUpdateAddOnsResponse>
  - name: results | type: array<BulkAddOnResult> | description: Results of the bulk update operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual update operation.  
        - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - 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: item | type: AddOn | description: Updated add-on. Only present if `return_entity` was set to true in the request.  
        - ONE-OF: 
           - name: durationInMinutes | type: integer | description: Duration in minutes for duration-based add-ons that extend offering time.  | validation: minimum 1, maximum 1440
           - name: maxQuantity | type: integer | description: Maximum quantity customers can purchase for quantity-based add-ons.  | validation: minimum 1, maximum 9999
        - name: _id | type: string | description: Add-on GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the add-on is updated. To prevent conflicting changes, the current revision must be passed when updating the add-on.  Ignored when creating an add-on.  | read-only: true | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the add-on was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 
        - name: _updatedDate | type: Date | description: Date and time the add-on was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 
        - name: name | type: string | description: Display name of the add-on shown to customers.  | validation: minLength 1, maxLength 100
        - name: price | type: Money | description: Pricing information for the add-on.  
           - name: value | type: string | description: Add-on price amount as a decimal string with period as decimal separator. For example, `3.99` for a $3.99 add-on or `15.00` for a $15.00 add-on.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":2}
           - name: currency | type: string | description: Currency code for the add-on price. Must be a valid [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. For example, `USD` for US dollars or `EUR` for euros.  | validation: format CURRENCY
           - name: formattedValue | type: string | description: Add-on price amount as a decimal string in local format for display purposes. For example, `$3.99` for US format or `3,99 €` for European format.  | validation: maxLength 50
        - name: taxGroup | type: string | description: GUID of the [tax group](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/tax-groups/introduction.md) to categorize the add-on for tax calculation in [Wix eCommerce](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction.md). Learn more about [how Wix eCommerce implements tax calculation](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/tax/introduction.md).  This field doesn't apply to custom checkout/billing implementations.  | validation: format GUID
        - name: mainMedia | type: MediaItem | description: Main image for the add-on.  
           - ONE-OF: 
              - name: image | type: string | description: Add-on's main image.  
        - name: extendedFields | type: ExtendedFields | description: Data extensions enabling users to save custom data related to the add-on.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction.md) assigned to add-ons for categorization and filtering purposes.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk update operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### bulkUpdateAddOns
```javascript
import { addOns } from '@wix/bookings';

async function bulkUpdateAddOns(addOns,options) {
  const response = await addOns.bulkUpdateAddOns(addOns,options);
};
```

### bulkUpdateAddOns (with elevated permissions)
```javascript
import { addOns } from '@wix/bookings';
import { auth } from '@wix/essentials';

async function myBulkUpdateAddOnsMethod(addOns,options) {
  const elevatedBulkUpdateAddOns = auth.elevate(addOns.bulkUpdateAddOns);
  const response = await elevatedBulkUpdateAddOns(addOns,options);
}
```

### bulkUpdateAddOns (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 { addOns } from '@wix/bookings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function bulkUpdateAddOns(addOns,options) {
  const response = await myWixClient.addOns.bulkUpdateAddOns(addOns,options);
};
```

---