> 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 # ListDefaultTaxGroupsByAppIds # Package: tax # Namespace: TaxGroups # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-groups/list-default-tax-groups-by-app-ids.md ## Permission Scopes: Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS ## Introduction Retrieves default tax groups for specific apps. --- ## REST API ### Schema ``` Method: listDefaultTaxGroupsByAppIds Description: Retrieves default tax groups for specific apps. URL: https://www.wixapis.com/billing/v1/tax-groups/list-default-tax-groups-by-app-ids Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: appIds Method parameters: param name: appIds | type: array | description: App GUIDs to retrieve default tax groups for. | required: true Return type: ListDefaultTaxGroupsByAppIdsResponse - name: results | type: array | description: Retrieved default tax groups. - name: taxGroupMetadata | type: ItemMetadata | description: Information about success or failure to retrieve default tax groups. - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - 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 was successful for this item. When `false`, the `error` field is populated. - 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: taxGroup | type: TaxGroup | description: Retrieved default tax groups. - name: id | type: string | description: Tax group GUID. - name: name | type: string | description: Tax group name. - 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. - name: createdDate | type: string | description: Date and time the tax group was created. - name: updatedDate | type: string | description: Date and time the tax group was last updated. - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk action metadata. - 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 ### List Default Tax Groups by App IDs Lists all default tax groups for a Wix site that has the Wix Stores app installed. ```curl curl -X POST \ 'https://www.wixapis.com/billing/v1/tax-groups/list-default-tax-groups-by-app-ids' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "appIds": [ // Wix Stores app ID "215238eb-22a5-4c36-9e7b-e7c08025e04e" ] }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.tax.TaxGroups.listDefaultTaxGroupsByAppIds(appIds) Description: Retrieves default tax groups for specific apps. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: appIds Method parameters: param name: appIds | type: array | description: App GUIDs to retrieve default tax groups for. | required: true Return type: PROMISE - name: results | type: array | description: Retrieved default tax groups. - name: taxGroupMetadata | type: ItemMetadata | description: Information about success or failure to retrieve default tax groups. - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - 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 was successful for this item. When `false`, the `error` field is populated. - 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: taxGroup | type: TaxGroup | description: Retrieved default tax groups. - name: _id | type: string | description: Tax group GUID. - name: name | type: string | description: Tax group name. - 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. - name: _createdDate | type: Date | description: Date and time the tax group was created. - name: _updatedDate | type: Date | description: Date and time the tax group was last updated. - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk action metadata. - 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 ### listDefaultTaxGroupsByAppIds ```javascript import { taxGroups } from '@wix/ecom'; async function listDefaultTaxGroupsByAppIds(appIds) { const response = await taxGroups.listDefaultTaxGroupsByAppIds(appIds); }; ``` ### listDefaultTaxGroupsByAppIds (with elevated permissions) ```javascript import { taxGroups } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myListDefaultTaxGroupsByAppIdsMethod(appIds) { const elevatedListDefaultTaxGroupsByAppIds = auth.elevate(taxGroups.listDefaultTaxGroupsByAppIds); const response = await elevatedListDefaultTaxGroupsByAppIds(appIds); } ``` ### listDefaultTaxGroupsByAppIds (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 { 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 listDefaultTaxGroupsByAppIds(appIds) { const response = await myWixClient.taxGroups.listDefaultTaxGroupsByAppIds(appIds); }; ``` ---