> 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

# BulkCreateTaxExemptGroups

# Package: tax

# Namespace: TaxExemptGroups

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

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

## Introduction

Creates multiple tax exempt groups in a single request.

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

---

## REST API

### Schema

```
 Method: bulkCreateTaxExemptGroups
 Description: Creates multiple tax exempt groups in a single request.  To create a single tax exempt group, call [Create Tax Exempt Group](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/create-tax-exempt-group.md).
 URL: https://www.wixapis.com/billing/v1/bulk/tax-exempt-groups/create
 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
 Method parameters: 
   param name: returnEntity | type: returnEntity | description: Whether to return the created tax exempt groups in the response.  Default: `false`  
   param name: taxExemptGroups | type: array<taxExemptGroups> | description: Tax exempt groups to create. | required: true | validation: minItems 1, maxItems 100
              - 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: BulkCreateTaxExemptGroupsResponse
  - name: results | type: array<BulkTaxExemptGroupResult> | description: Results of the bulk create operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the single create 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: Created tax exempt group. Returned only if `returnEntity` is `true` in the request.  
        - name: id | type: string | description: Tax exempt group GUID.  | 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.  | validation: format int64
        - name: createdDate | type: string | description: Date and time the tax exempt group was created.  | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the tax exempt group was updated.  | 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 create 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 Create Tax Exempt Groups
Creates multiple tax exempt groups in a single request.

```curl
curl -X POST \
    'https://www.wixapis.com/billing/v1/bulk/tax-exempt-groups/create' \
    -H 'Authorization: <AUTH>' \
    -H 'Content-Type: application/json' \
    -d '{
    "taxExemptGroups": [
      { "name": "Non-profits" },
      { "name": "Resellers" }
    ],
    "returnEntity": true
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.taxExemptGroups.bulkCreateTaxExemptGroups(taxExemptGroups, options)
 Description: Creates multiple tax exempt groups in a single request.  To create a single tax exempt group, call [Create Tax Exempt Group](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups/create-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
 Method parameters: 
   param name: options | type: BulkCreateTaxExemptGroupsOptions  none  
        - name: returnEntity | type: boolean | description: Whether to return the created tax exempt groups in the response.  Default: `false`  
   param name: taxExemptGroups | type: array<array> | description: Tax exempt groups to create. | required: true | validation: minItems 1, maxItems 100
              - 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<BulkCreateTaxExemptGroupsResponse>
  - name: results | type: array<BulkTaxExemptGroupResult> | description: Results of the bulk create operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata for the single create 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: Created tax exempt group. Returned only if `returnEntity` is `true` in the request.  
        - name: _id | type: string | description: Tax exempt group GUID.  | 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.  | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the tax exempt group was created.  
        - name: _updatedDate | type: Date | description: Date and time the tax exempt group was updated.  
        - 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 create 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

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

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

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

async function myBulkCreateTaxExemptGroupsMethod(taxExemptGroups,options) {
  const elevatedBulkCreateTaxExemptGroups = auth.elevate(taxExemptGroups.bulkCreateTaxExemptGroups);
  const response = await elevatedBulkCreateTaxExemptGroups(taxExemptGroups,options);
}
```

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

---