> 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

# QueryManualTaxMappings

# Package: tax

# Namespace: ManualTaxMappingService

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

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

## Introduction

Retrieves a list of manual tax mappings based on the provided query criteria.

Use this method to find manual tax mappings by tax group, tax region, or other filter criteria.
You can also sort and paginate the results. This is useful for managing large numbers of tax mappings
or finding mappings that apply to specific regions or tax groups.

To learn how to query manual tax mappings, 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).

---

## REST API

### Schema

```
 Method: queryManualTaxMappings
 Description: Retrieves a list of manual tax mappings based on the provided query criteria.  Use this method to find manual tax mappings by tax group, tax region, or other filter criteria. You can also sort and paginate the results. This is useful for managing large numbers of tax mappings or finding mappings that apply to specific regions or tax groups.  To learn how to query manual tax mappings, 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).
 URL: https://www.wixapis.com/billing/v1/manual-tax-mappings/query
 Method: POST
 Method parameters:
   param name: query | type: CursorQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - 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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 50
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | 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
   - field: taxRate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: taxType | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: taxName | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: jurisdiction | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: jurisdictionType | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: taxGroupId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
   - field: taxRegionId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
   - field: description | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
   - field: exemptRates.taxExemptGroupId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
 Return type: QueryManualTaxMappingsResponse
  - name: manualTaxMappings | type: array<ManualTaxMapping> | description: Manual tax mappings that match the query criteria.  | validation: maxItems 100
     - name: id | type: string | description: Manual tax mapping GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the manual tax mapping is updated. To prevent conflicting changes, the current revision must be passed when updating the manual tax mapping.  Ignored when creating a manual tax mapping.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the manual tax mapping was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the manual tax mapping was last updated.  | read-only: true | validation: format date-time
     - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment.  | validation: format GUID
     - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply.  | validation: format GUID
     - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination.  Specified as a decimal string representing a fraction, not a percentage. For example, `"0.05"` is 5%, `"0.1"` is 10%, and `"0.08"` is 8%. Don't pass a number (`0.05`), an integer (`5`), or a percentage string (`"5%"`). Up to 6 decimal places are supported.  | validation: decimalValue {"maxScale":6,"gte":"0"}
     - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate.  | validation: maxLength 1000
     - name: taxType | type: string | description: Type of tax being applied, such as `VAT`, `GST`, or `Sales Tax`. This depends on the jurisdiction's tax laws.  | validation: maxLength 200
     - name: taxName | type: string | description: Customer-facing name of the tax, shown at checkout. For example, `STATE TAX`, `GST`, or `VAT`.  Cosmetic only. It doesn't affect the calculated amount. Can be left empty, in which case checkout shows a default label such as `Sales Tax`.  | validation: maxLength 200
     - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`.  | validation: maxLength 200
     - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction where this tax rate applies, such as country, state, county, city, or special district.  
         - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
     - name: exemptRates | type: array<ExemptDetails> | description: Tax exemption details for user-defined exempt groups.  | validation: maxItems 50
        - name: taxExemptGroupId | type: string | description: Tax exempt group GUID.  | validation: format GUID
        - name: taxRate | type: string | description: Tax override rate for given tax mapping.  | validation: decimalValue {"maxScale":6,"gte":"0"}
     - name: extendedFields | type: ExtendedFields | description: Extended fields for storing additional custom data.  
        - 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: pagingMetadata | type: CursorPagingMetadata | description: Pagination 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 Manual Tax Mappings
Retrieves manual tax mappings using filters and sorting, with support for pagination

```curl
curl -X POST \
  'https://www.wixapis.com/billing/v1/manual-tax-mappings/query' \
  -H 'Content-type: application/json' \
  -H 'Authorization: <AUTH>' \
  -d '{
        "query": {
          "filter": {
            "taxRegionId": "0115fa48-7167-46e1-a93f-e0d308124546"
          },
          "sort": [
            {
              "fieldName": "updatedDate",
              "order": "DESC"
            }
          ],
          "cursorPaging": {
            "limit": 2
          }
        }
      }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.billing.manualTaxMappings.queryManualTaxMappings(query)
 Description: Retrieves a list of manual tax mappings based on the provided query criteria.  Use this method to find manual tax mappings by tax group, tax region, or other filter criteria. You can also sort and paginate the results. This is useful for managing large numbers of tax mappings or finding mappings that apply to specific regions or tax groups.  To learn how to query manual tax mappings, 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).
 # 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: ManualTaxMappingQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - 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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 50
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | 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
   - field: taxRate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: taxType | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: taxName | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: jurisdiction | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: jurisdictionType | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: taxGroupId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
   - field: taxRegionId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
   - field: description | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
   - field: exemptRates.taxExemptGroupId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: none | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryManualTaxMappingsResponse>
  - name: manualTaxMappings | type: array<ManualTaxMapping> | description: Manual tax mappings that match the query criteria.  | validation: maxItems 100
     - name: _id | type: string | description: Manual tax mapping GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the manual tax mapping is updated. To prevent conflicting changes, the current revision must be passed when updating the manual tax mapping.  Ignored when creating a manual tax mapping.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the manual tax mapping was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the manual tax mapping was last updated.  | read-only: true 
     - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment.  | validation: format GUID
     - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply.  | validation: format GUID
     - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination.  Specified as a decimal string representing a fraction, not a percentage. For example, `"0.05"` is 5%, `"0.1"` is 10%, and `"0.08"` is 8%. Don't pass a number (`0.05`), an integer (`5`), or a percentage string (`"5%"`). Up to 6 decimal places are supported.  | validation: decimalValue {"maxScale":6,"gte":"0"}
     - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate.  | validation: maxLength 1000
     - name: taxType | type: string | description: Type of tax being applied, such as `VAT`, `GST`, or `Sales Tax`. This depends on the jurisdiction's tax laws.  | validation: maxLength 200
     - name: taxName | type: string | description: Customer-facing name of the tax, shown at checkout. For example, `STATE TAX`, `GST`, or `VAT`.  Cosmetic only. It doesn't affect the calculated amount. Can be left empty, in which case checkout shows a default label such as `Sales Tax`.  | validation: maxLength 200
     - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`.  | validation: maxLength 200
     - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction where this tax rate applies, such as country, state, county, city, or special district.  
         - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
     - name: exemptRates | type: array<ExemptDetails> | description: Tax exemption details for user-defined exempt groups.  | validation: maxItems 50
        - name: taxExemptGroupId | type: string | description: Tax exempt group GUID.  | validation: format GUID
        - name: taxRate | type: string | description: Tax override rate for given tax mapping.  | validation: decimalValue {"maxScale":6,"gte":"0"}
     - name: extendedFields | type: ExtendedFields | description: Extended fields for storing additional custom data.  
        - 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: pagingMetadata | type: CursorPagingMetadata | description: Pagination 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 Manual Tax Mappings
Find all manual tax mappings for a specific tax region.

```javascript
import { manualTaxMappings } from "@wix/billing";

async function queryManualTaxMappings() {
  const response = await manualTaxMappings.queryManualTaxMappings({
    filter: { taxRegionId: "b2c3d4e5-f6a7-8b9c-0d1e-f2a3b4c5d6e7" },
    cursorPaging: { limit: 50 },
  });
  return response;
}

/* Promise resolves to:
 * {
 *   "manualTaxMappings": [
 *     {
 *       "_id": "c3d4e5f6-a7b8-9c0d-1e2f-a3b4c5d6e7f8",
 *       "taxGroupId": "a1b2c3d4-e5f6-7a8b-9c0d-e1f2a3b4c5d6",
 *       "taxRegionId": "b2c3d4e5-f6a7-8b9c-0d1e-f2a3b4c5d6e7",
 *       "taxRate": "0.080000",
 *       "taxType": "Sales Tax",
 *       "taxName": "STATE TAX"
 *     }
 *   ],
 *   "pagingMetadata": { "count": 1, "cursors": {} }
 * }
 */

```

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

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


async function queryManualTaxMappings(query) {
  const response = await myWixClient.manualTaxMappings.queryManualTaxMappings(query);
};
```

---