> 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

# QueryTaxGroups

# Package: tax

# Namespace: TaxGroups

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

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

## Introduction

Retrieves a list of tax groups, given the provided paging, filtering, and sorting.

Only tax groups that were created by this site will be retrieved with this query. Use [List Default Tax Groups](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/list-default-tax-groups.md)
or [List Default Tax Groups By App ID](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/list-default-tax-groups-by-app-ids.md)
to retrieve a site's default tax groups.

To learn about working with Query methods, see
[API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md),
[Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md),
and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).

---

## REST API

### Schema

```
 Method: queryTaxGroups
 Description: Retrieves a list of tax groups, given the provided paging, filtering, and sorting.  Only tax groups that were created by this site will be retrieved with this query. Use [List Default Tax Groups](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/list-default-tax-groups.md) or [List Default Tax Groups By App GUID](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/list-default-tax-groups-by-app-ids.md) to retrieve a site's default tax groups.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 URL: https://www.wixapis.com/billing/v1/tax-groups/query
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: QueryV2   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object.  Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#filters).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#sorting).  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
           - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
              - name: latitude | type: number | description: Address latitude.  | validation: format double
              - name: longitude | type: number | description: Address longitude.  | validation: format double
        - name: fields | type: array<string> | description: Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned.  
        - name: fieldsets | type: array<string> | description: Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned.  
 Query fields:
   - field: name | operators: $eq, $ne, $in, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: id | operators: $eq, $ne, $in, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryTaxGroupsResponse
  - name: taxGroups | type: array<TaxGroup> | description: Retrieved tax groups.  
     - name: id | type: string | description: Tax group GUID.  | read-only: true | validation: format GUID
     - name: name | type: string | description: Tax group name.  | validation: minLength 1, maxLength 200
     - name: revision | type: string | description: Revision number, which increments by 1 each time the tax group is updated. To prevent conflicting changes, the current revision must be passed when updating the tax group.  Ignored when creating a tax group.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the tax group was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the tax group was last updated.  | read-only: true | validation: format date-time
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query Tax Groups
Retrieves the site's tax groups sorted by name.

```curl
curl -X POST \
'https://www.wixapis.com/billing/v1/tax-groups/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "query": {
    "sort": [
      {
        "fieldName": "name",
        "order": "ASC"
      }
    ],
    "cursorPaging": {
      "limit": 10
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.taxGroups.queryTaxGroups(query)
 Description: Retrieves a list of tax groups, given the provided paging, filtering, and sorting.  Only tax groups that were created by this site will be retrieved with this query. Use [List Default Tax Groups](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/list-default-tax-groups.md) or [List Default Tax Groups By App GUID](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/list-default-tax-groups-by-app-ids.md) to retrieve a site's default tax groups.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: TaxGroupQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object.  Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#filters).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#sorting).  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
           - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
              - name: latitude | type: number | description: Address latitude.  
              - name: longitude | type: number | description: Address longitude.  
 Query fields:
   - field: name | operators: $eq, $ne, $in, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _id | operators: $eq, $ne, $in, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryTaxGroupsResponse>
  - name: taxGroups | type: array<TaxGroup> | description: Retrieved tax groups.  
     - name: _id | type: string | description: Tax group GUID.  | read-only: true | validation: format GUID
     - name: name | type: string | description: Tax group name.  | validation: minLength 1, maxLength 200
     - name: revision | type: string | description: Revision number, which increments by 1 each time the tax group is updated. To prevent conflicting changes, the current revision must be passed when updating the tax group.  Ignored when creating a tax group.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the tax group was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the tax group was last updated.  | read-only: true 
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query Tax Groups
Retrieves the site's tax groups sorted by name.

```javascript
import { taxGroups } from "@wix/ecom";

async function queryTaxGroups() {
  const response = await taxGroups.queryTaxGroups({
    sort: [{ fieldName: "name", order: "ASC" }],
    cursorPaging: { limit: 10 },
  });
  return response;
}

/* Promise resolves to:
 * {
 *   "taxGroups": [
 *     {
 *       "_id": "1d14e4a0-8a8f-4d21-813c-b743eef41bfd",
 *       "name": "Apparel",
 *       "revision": "2",
 *       "_createdDate": "2026-01-27T08:03:16.936Z",
 *       "_updatedDate": "2026-01-27T08:03:56.615Z"
 *     },
 *     {
 *       "_id": "1f26f00e-0edf-4b72-92e0-8a704da373c6",
 *       "name": "Food & Beverages",
 *       "revision": "1",
 *       "_createdDate": "2026-10-18T07:18:36.702Z",
 *       "_updatedDate": "2026-10-18T07:18:36.702Z"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 2,
 *     "cursors": {},
 *     "hasNext": false
 *   }
 * }
 */

```

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

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


async function queryTaxGroups(query) {
  const response = await myWixClient.taxGroups.queryTaxGroups(query);
};
```

---