> 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

# UpdateAddOnGroup

# Package: services

# Namespace: AddOnGroupsService

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

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

## Introduction

Updates an add-on group.


To update only the display order for add-ons, call [Set Add Ons For Group](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/set-add-ons-for-group.md) instead.

You can't change which service an add-on group belongs to.
Each add-on group is permanently associated with the service it was created for.
To use the same add-ons with a different service, create a new add-on group for that service.

---

## REST API

### Schema

```
 Method: updateAddOnGroup
 Description: Updates an add-on group.   To update only the display order for add-ons, call [Set Add Ons For Group](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/set-add-ons-for-group.md) instead.  You can't change which service an add-on group belongs to. Each add-on group is permanently associated with the service it was created for. To use the same add-ons with a different service, create a new add-on group for that service.
 URL: https://www.wixapis.com/_api/bookings/v2/services/add-on-groups/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:  addOnGroup, addOnGroup.id, serviceId
 Method parameters: 
   param name: addOnGroup | type: AddOnGroup   | required: true 
        - name: id | type: string | description: GUID of the add-on group. Wix Bookings automatically populates this field when creating or updating an add-on group. | required: true | read-only: true | validation: format GUID
        - name: name | type: string | description: Name of the add-on group.  | validation: maxLength 100
        - name: maxNumberOfAddOns | type: integer | description: Maximum number of different [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) from the group customers can add when booking the service. When empty, there's no upper limit.  | validation: format int32
        - name: addOnIds | type: array<string> | description: List of GUIDs of all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) included in the group.  | validation: maxItems 7, format GUID
        - name: prompt | type: string | description: Description or instructional prompt of the add-on group that's displayed to customers when booking the service.  | validation: maxLength 200
   param name: serviceId | type: serviceId | description: GUID of the service that contains the add-on group. | required: true | validation: format GUID
 Return type: UpdateAddOnGroupResponse
  - name: addOnGroup | type: AddOnGroup | description: Updated add-on group.  
     - name: id | type: string | description: GUID of the add-on group. Wix Bookings automatically populates this field when creating or updating an add-on group.  | read-only: true | validation: format GUID
     - name: name | type: string | description: Name of the add-on group.  | validation: maxLength 100
     - name: maxNumberOfAddOns | type: integer | description: Maximum number of different [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) from the group customers can add when booking the service. When empty, there's no upper limit.  | validation: format int32
     - name: addOnIds | type: array<string> | description: List of GUIDs of all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) included in the group.  | validation: maxItems 7, format GUID
     - name: prompt | type: string | description: Description or instructional prompt of the add-on group that's displayed to customers when booking the service.  | validation: maxLength 200

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: GROUP_NOT_ON_SERVICE | Description: none


```

### Examples

### Update an add-on group
```curl
curl -X POST 'https://www.wixapis.com/bookings/v2/services/add-on-groups/update' \
-H 'Authorization: <AUTH>' \
-d '{
  "addOnGroup": {
    "id": "f8e7d6c5-b4a3-9281-7605-948372615038",
    "name": "Premium Spa Treatments",
    "maxNumberOfAddOns": 3,
    "prompt": "Select up to 3 luxurious spa treatments for the ultimate relaxation"
  },
  "serviceId": "d779a301-398d-4552-aa8c-3bef0b65cedb"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.services.updateAddOnGroup(addOnGroup, options)
 Description: Updates an add-on group.   To update only the display order for add-ons, call [Set Add Ons For Group](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/set-add-ons-for-group.md) instead.  You can't change which service an add-on group belongs to. Each add-on group is permanently associated with the service it was created for. To use the same add-ons with a different service, create a new add-on group for that service.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  addOnGroup, addOnGroup._id, options.serviceId, options
 Method parameters: 
   param name: addOnGroup | type: AddOnGroup   | required: true 
        - name: _id | type: string | description: GUID of the add-on group. Wix Bookings automatically populates this field when creating or updating an add-on group. | required: true | read-only: true | validation: format GUID
        - name: name | type: string | description: Name of the add-on group.  | validation: maxLength 100
        - name: maxNumberOfAddOns | type: integer | description: Maximum number of different [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) from the group customers can add when booking the service. When empty, there's no upper limit.  | validation: format int32
        - name: addOnIds | type: array<string> | description: List of GUIDs of all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) included in the group.  | validation: maxItems 7, format GUID
        - name: prompt | type: string | description: Description or instructional prompt of the add-on group that's displayed to customers when booking the service.  | validation: maxLength 200
   param name: options | type: UpdateAddOnGroupOptions  none | required: true 
        - name: serviceId | type: string | description: GUID of the service that contains the add-on group. | required: true | validation: format GUID
 Return type: PROMISE<UpdateAddOnGroupResponse>
  - name: addOnGroup | type: AddOnGroup | description: Updated add-on group.  
     - name: _id | type: string | description: GUID of the add-on group. Wix Bookings automatically populates this field when creating or updating an add-on group.  | read-only: true | validation: format GUID
     - name: name | type: string | description: Name of the add-on group.  | validation: maxLength 100
     - name: maxNumberOfAddOns | type: integer | description: Maximum number of different [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) from the group customers can add when booking the service. When empty, there's no upper limit.  | validation: format int32
     - name: addOnIds | type: array<string> | description: List of GUIDs of all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction.md) included in the group.  | validation: maxItems 7, format GUID
     - name: prompt | type: string | description: Description or instructional prompt of the add-on group that's displayed to customers when booking the service.  | validation: maxLength 200

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: GROUP_NOT_ON_SERVICE | Description: none


```

### Examples

### updateAddOnGroup
```javascript
import { services } from '@wix/bookings';

async function updateAddOnGroup(addOnGroup,options) {
  const response = await services.updateAddOnGroup(addOnGroup,options);
};
```

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

async function myUpdateAddOnGroupMethod(addOnGroup,options) {
  const elevatedUpdateAddOnGroup = auth.elevate(services.updateAddOnGroup);
  const response = await elevatedUpdateAddOnGroup(addOnGroup,options);
}
```

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

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


async function updateAddOnGroup(addOnGroup,options) {
  const response = await myWixClient.services.updateAddOnGroup(addOnGroup,options);
};
```

---