> 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

# BulkUpdateTaxExemptGroups

# Package: tax

# Namespace: TaxExemptGroups

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/bulk-update-tax-exempt-groups.md

## Permission Scopes:
Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS

## Introduction

Updates multiple tax exempt groups in a single request.

Each time a tax exempt group is updated, `revision` increments by 1. The current `revision` must be passed for each tax exempt group. This ensures you're working with the latest tax exempt groups and prevents unintended overwrites.

To update a single tax exempt group, call [Update Tax Exempt Group](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/update-tax-exempt-group.md).

---

## REST API

### Schema

```
 Method: bulkUpdateTaxExemptGroups
 Description: Updates multiple tax exempt groups in a single request.  Each time a tax exempt group is updated, `revision` increments by 1. The current `revision` must be passed for each tax exempt group. This ensures you're working with the latest tax exempt groups and prevents unintended overwrites.  To update a single tax exempt group, call [Update Tax Exempt Group](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/update-tax-exempt-group.md).
 URL: https://www.wixapis.com/billing/v1/bulk/tax-exempt-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:  taxExemptGroups, taxExemptGroups.taxExemptGroup.id, taxExemptGroups.taxExemptGroup.revision
 Method parameters: 
   param name: returnEntity | type: returnEntity | description: Whether to return the updated tax exempt groups in the response.  Default: `false`  
   param name: taxExemptGroups | type: array<taxExemptGroups> | description: Tax exempt groups to update. | required: true | validation: minItems 1, maxItems 100
              - name: taxExemptGroup | type: TaxExemptGroup | description: Tax exempt group to update.  
                 - name: id | type: string | description: Tax exempt group GUID. | required: true | read-only: true | validation: format GUID
                 - name: revision | type: string | description: Revision number, which increments by 1 each time the tax exempt group is updated. To prevent conflicting changes, the current revision must be passed when updating the tax exempt group.  Ignored when creating a tax exempt group. | required: true | read-only: true | validation: format int64
                 - name: name | type: string | description: Tax exempt group name. For example, `Resellers` or `Non-profits`.  | validation: minLength 1, maxLength 200
                 - name: extendedFields | type: ExtendedFields | description: Custom field data for the tax exempt group.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
                    - 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 associated with the tax exempt group.  
                    - 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: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
 Return type: BulkUpdateTaxExemptGroupsResponse
  - name: results | type: array<BulkTaxExemptGroupResult> | description: Results of the bulk update operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the single update 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: item | type: TaxExemptGroup | description: Updated tax exempt group. Returned only if `returnEntity` is `true` in the request.  
        - name: id | type: string | description: Tax exempt group GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the tax exempt group is updated. To prevent conflicting changes, the current revision must be passed when updating the tax exempt group.  Ignored when creating a tax exempt group.  | read-only: true | validation: format int64
        - name: createdDate | type: string | description: Date and time the tax exempt group was created.  | read-only: true | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the tax exempt group was updated.  | read-only: true | validation: format date-time
        - name: name | type: string | description: Tax exempt group name. For example, `Resellers` or `Non-profits`.  | validation: minLength 1, maxLength 200
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the tax exempt group.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - 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 associated with the tax exempt group.  
           - 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: publicTags | 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: Bulk update operation metadata.  
     - 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 Update Tax Exempt Groups
Updates multiple tax exempt groups in a single request. Provide each group's current revision.

```curl
curl -X POST \
    'https://www.wixapis.com/billing/v1/bulk/tax-exempt-groups/update' \
    -H 'Authorization: <AUTH>' \
    -H 'Content-Type: application/json' \
    -d '{
    "taxExemptGroups": [
      {
        "taxExemptGroup": {
          "id": "8046df3c-7575-4098-a5ab-c91ad8f33c47",
          "revision": "1",
          "name": "Non-profits - US"
        }
      }
    ],
    "returnEntity": true
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.taxExemptGroups.bulkUpdateTaxExemptGroups(taxExemptGroups, options)
 Description: Updates multiple tax exempt groups in a single request.  Each time a tax exempt group is updated, `revision` increments by 1. The current `revision` must be passed for each tax exempt group. This ensures you're working with the latest tax exempt groups and prevents unintended overwrites.  To update a single tax exempt group, call [Update Tax Exempt Group](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/update-tax-exempt-group.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  taxExemptGroups, taxExemptGroups.taxExemptGroup._id, taxExemptGroups.taxExemptGroup.revision
 Method parameters: 
   param name: options | type: BulkUpdateTaxExemptGroupsOptions  none  
        - name: returnEntity | type: boolean | description: Whether to return the updated tax exempt groups in the response.  Default: `false`  
   param name: taxExemptGroups | type: array<array> | description: Tax exempt groups to update. | required: true | validation: minItems 1, maxItems 100
              - name: taxExemptGroup | type: TaxExemptGroup | description: Tax exempt group to update.  
                 - name: _id | type: string | description: Tax exempt group GUID. | required: true | read-only: true | validation: format GUID
                 - name: revision | type: string | description: Revision number, which increments by 1 each time the tax exempt group is updated. To prevent conflicting changes, the current revision must be passed when updating the tax exempt group.  Ignored when creating a tax exempt group. | required: true | read-only: true | validation: format int64
                 - name: name | type: string | description: Tax exempt group name. For example, `Resellers` or `Non-profits`.  | validation: minLength 1, maxLength 200
                 - name: extendedFields | type: ExtendedFields | description: Custom field data for the tax exempt group.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
                    - 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 associated with the tax exempt group.  
                    - 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: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
 Return type: PROMISE<BulkUpdateTaxExemptGroupsResponse>
  - name: results | type: array<BulkTaxExemptGroupResult> | description: Results of the bulk update operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the single update 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: item | type: TaxExemptGroup | description: Updated tax exempt group. Returned only if `returnEntity` is `true` in the request.  
        - name: _id | type: string | description: Tax exempt group GUID.  | read-only: true | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the tax exempt group is updated. To prevent conflicting changes, the current revision must be passed when updating the tax exempt group.  Ignored when creating a tax exempt group.  | read-only: true | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the tax exempt group was created.  | read-only: true 
        - name: _updatedDate | type: Date | description: Date and time the tax exempt group was updated.  | read-only: true 
        - name: name | type: string | description: Tax exempt group name. For example, `Resellers` or `Non-profits`.  | validation: minLength 1, maxLength 200
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the tax exempt group.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - 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 associated with the tax exempt group.  
           - 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: publicTags | 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: Bulk update operation metadata.  
     - 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

### bulkUpdateTaxExemptGroups
```javascript
import { taxExemptGroups } from '@wix/ecom';

async function bulkUpdateTaxExemptGroups(taxExemptGroups,options) {
  const response = await taxExemptGroups.bulkUpdateTaxExemptGroups(taxExemptGroups,options);
};
```

### bulkUpdateTaxExemptGroups (with elevated permissions)
```javascript
import { taxExemptGroups } from '@wix/ecom';
import { auth } from '@wix/essentials';

async function myBulkUpdateTaxExemptGroupsMethod(taxExemptGroups,options) {
  const elevatedBulkUpdateTaxExemptGroups = auth.elevate(taxExemptGroups.bulkUpdateTaxExemptGroups);
  const response = await elevatedBulkUpdateTaxExemptGroups(taxExemptGroups,options);
}
```

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

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


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

---