> 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 # BulkCreateManualTaxMappings # Package: tax # Namespace: ManualTaxMappingService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/manual-tax-mappings/bulk-create-manual-tax-mappings.md ## Permission Scopes: Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS ## Introduction Creates up to 100 manual tax mappings in a single request. Use this method when you need to set up tax mappings for multiple tax group and region combinations at once, such as when initially configuring tax rates for a new business or importing mappings from an external system. --- ## REST API ### Schema ``` Method: bulkCreateManualTaxMappings Description: Creates up to 100 manual tax mappings in a single request. Use this method when you need to set up tax mappings for multiple tax group and region combinations at once, such as when initially configuring tax rates for a new business or importing mappings from an external system. URL: https://www.wixapis.com/billing/v1/bulk/manual-tax-mappings/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: manualTaxMappings, manualTaxMappings.taxGroupId, manualTaxMappings.taxRegionId, manualTaxMappings.taxRate Method parameters: param name: manualTaxMappings | type: array | description: Manual tax mappings to create. | required: true - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. | required: true - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. | required: true - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). | required: true - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). param name: returnEntity | type: returnEntity | description: Whether to return the created manual tax mapping entities in the response. Default: `false` Return type: BulkCreateManualTaxMappingsResponse - name: results | type: array | description: Results of the bulk create operation, including created manual tax mappings and metadata. - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual 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. - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - 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: ManualTaxMapping | description: Created manual tax mapping. Only present if `returnEntity` was set to `true` in the request. - name: id | type: string | description: Manual tax mapping 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. - name: createdDate | type: string | description: Date and time the manual tax mapping was created. - name: updatedDate | type: string | description: Date and time the manual tax mapping was last updated. - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk create operation. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### Bulk Create Manual Tax Mappings Creates multiple custom tax rate mappings in a single request for efficient setup or data import ```curl curl -X POST \ 'https://www.wixapis.com/billing/v1/bulk/manual-tax-mappings/create' \ -H 'Content-type: application/json' \ -H 'Authorization: ' \ -d '{ "manualTaxMappings": [ { "taxGroupId": "f1a7350b-7275-43f1-9846-672123a67d7b", "taxRegionId": "05255459-e414-4fdc-8c94-c6dbdc8c2f44", "taxRate": "0.1" }, { "taxGroupId": "cb2a5db7-19a3-4423-8d20-9f3c66c19721", "taxRegionId": "08ca6b20-1daf-46f2-95fa-851ca62db98d", "taxRate": "0.2" } ] }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.tax.ManualTaxMappingService.bulkCreateManualTaxMappings(manualTaxMappings, options) Description: Creates up to 100 manual tax mappings in a single request. Use this method when you need to set up tax mappings for multiple tax group and region combinations at once, such as when initially configuring tax rates for a new business or importing mappings from an external system. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: manualTaxMappings, manualTaxMappings.taxGroupId, manualTaxMappings.taxRegionId, manualTaxMappings.taxRate Method parameters: param name: manualTaxMappings | type: array | description: Manual tax mappings to create. | required: true - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. | required: true - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. | required: true - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). | required: true - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). param name: options | type: BulkCreateManualTaxMappingsOptions none - name: returnEntity | type: boolean | description: Whether to return the created manual tax mapping entities in the response. Default: `false` Return type: PROMISE - name: results | type: array | description: Results of the bulk create operation, including created manual tax mappings and metadata. - name: itemMetadata | type: ItemMetadata | description: Metadata for the individual 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. - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - 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: ManualTaxMapping | description: Created manual tax mapping. Only present if `returnEntity` was set to `true` in the request. - name: _id | type: string | description: Manual tax mapping 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. - name: _createdDate | type: Date | description: Date and time the manual tax mapping was created. - name: _updatedDate | type: Date | description: Date and time the manual tax mapping was last updated. - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata for the bulk create operation. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### bulkCreateManualTaxMappings ```javascript import { manualTaxMappings } from '@wix/billing'; async function bulkCreateManualTaxMappings(manualTaxMappings,options) { const response = await manualTaxMappings.bulkCreateManualTaxMappings(manualTaxMappings,options); }; ``` ### bulkCreateManualTaxMappings (with elevated permissions) ```javascript import { manualTaxMappings } from '@wix/billing'; import { auth } from '@wix/essentials'; async function myBulkCreateManualTaxMappingsMethod(manualTaxMappings,options) { const elevatedBulkCreateManualTaxMappings = auth.elevate(manualTaxMappings.bulkCreateManualTaxMappings); const response = await elevatedBulkCreateManualTaxMappings(manualTaxMappings,options); } ``` ### bulkCreateManualTaxMappings (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 { 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 bulkCreateManualTaxMappings(manualTaxMappings,options) { const response = await myWixClient.manualTaxMappings.bulkCreateManualTaxMappings(manualTaxMappings,options); }; ``` ---