> 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

# UpdateTaxExemptGroup

# Package: tax

# Namespace: TaxExemptGroups

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

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

## Introduction

Updates a tax exempt group.

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

Only the fields provided in the request are updated. To update multiple tax exempt groups in a single API call, call [Bulk Update Tax Exempt Groups](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/bulk-update-tax-exempt-groups.md).

---

## REST API

### Schema

```
 Method: updateTaxExemptGroup
 Description: Updates a tax exempt group.  Each time the tax exempt group is updated, `revision` increments by 1. The current `revision` must be passed when updating the tax exempt group. This ensures you're working with the latest tax exempt group and prevents unintended overwrites.  Only the fields provided in the request are updated. To update multiple tax exempt groups in a single API call, call [Bulk Update Tax Exempt Groups](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/bulk-update-tax-exempt-groups.md).
 URL: https://www.wixapis.com/billing/v1/tax-exempt-groups/{taxExemptGroup.id}
 Method: PATCH
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  taxExemptGroup, taxExemptGroup.id, taxExemptGroup.revision
 Method parameters: 
   param name: taxExemptGroup | type: TaxExemptGroup | description: A tax exempt group is a reusable, named set of tax exemption rules that can be applied to one or more customers. Instead of exempting each customer individually, you create a group, such as "Resellers" or "Non-profits", give it reduced or zero override rates, and then associate customers with it through their contact tax details.  When a customer that belongs to a tax exempt group checks out, tax calculation resolves the group and applies its exemption, reporting the reduced tax as an exempt amount in the tax breakdown.  A group's override rates are stored per tax group and tax region on the associated manual tax mappings, so exemptions are applied by the Wix manual tax calculator. | required: true 
        - 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: UpdateTaxExemptGroupResponse
  - name: taxExemptGroup | type: TaxExemptGroup | description: Updated tax exempt group.  
     - 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.  


```

### Examples

### Update Tax Exempt Group
Updates a tax exempt group's name. Provide the current revision.

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

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.taxExemptGroups.updateTaxExemptGroup(_id, taxExemptGroup)
 Description: Updates a tax exempt group.  Each time the tax exempt group is updated, `revision` increments by 1. The current `revision` must be passed when updating the tax exempt group. This ensures you're working with the latest tax exempt group and prevents unintended overwrites.  Only the fields provided in the request are updated. To update multiple tax exempt groups in a single API call, call [Bulk Update Tax Exempt Groups](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/bulk-update-tax-exempt-groups.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  taxExemptGroup, _id, taxExemptGroup.revision
 Method parameters: 
   param name: _id | type: string | description: Tax exempt group GUID. | required: true | validation: format GUID
   param name: taxExemptGroup | type: UpdateTaxExemptGroup | description: A tax exempt group is a reusable, named set of tax exemption rules that can be applied to one or more customers. Instead of exempting each customer individually, you create a group, such as "Resellers" or "Non-profits", give it reduced or zero override rates, and then associate customers with it through their contact tax details.  When a customer that belongs to a tax exempt group checks out, tax calculation resolves the group and applies its exemption, reporting the reduced tax as an exempt amount in the tax breakdown.  A group's override rates are stored per tax group and tax region on the associated manual tax mappings, so exemptions are applied by the Wix manual tax calculator. | required: true 
        - 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<TaxExemptGroup>
  - 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.  


```

### Examples

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

async function updateTaxExemptGroup(_id,taxExemptGroup) {
  const response = await taxExemptGroups.updateTaxExemptGroup(_id,taxExemptGroup);
};
```

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

async function myUpdateTaxExemptGroupMethod(_id,taxExemptGroup) {
  const elevatedUpdateTaxExemptGroup = auth.elevate(taxExemptGroups.updateTaxExemptGroup);
  const response = await elevatedUpdateTaxExemptGroup(_id,taxExemptGroup);
}
```

### updateTaxExemptGroup (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 updateTaxExemptGroup(_id,taxExemptGroup) {
  const response = await myWixClient.taxExemptGroups.updateTaxExemptGroup(_id,taxExemptGroup);
};
```

---