> 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 # BulkUpdateConsentConfigTags # Package: cookieConsentPolicy # Namespace: ConsentConfigsService # Method link: https://dev.wix.com/docs/api-reference/business-management/cookie-consent-policy/consent-configs/bulk-update-consent-config-tags.md ## Permission Scopes: Consent config: SCOPE.CONSENT_CONFIG.MANAGE ## Introduction Updates tags for multiple consent configs. A tag that appears both in the list of `assignTags` and `unassignTags` will be assigned. --- ## REST API ### Schema ``` Method: bulkUpdateConsentConfigTags Description: Updates tags for multiple consent configs. A tag that appears both in the list of `assignTags` and `unassignTags` will be assigned. URL: https://www.wixapis.com/bu/legal/v1/bulk/consent-configs/update-tags Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: ids Method parameters: param name: assignTags | type: Tags | description: Common object for tags. Should be use as in this example: message Foo { string id = 1; ... Tags tags = 5 } example of taggable entity { id: "123" tags: { tags: { tag_ids:["11","22"] }, private_tags: { tag_ids: ["33", "44"] } } } - 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 | description: List of tag GUIDs - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. param name: ids | type: array | description: List of consent config GUIDs to update. | required: true param name: unassignTags | type: Tags | description: Common object for tags. Should be use as in this example: message Foo { string id = 1; ... Tags tags = 5 } example of taggable entity { id: "123" tags: { tags: { tag_ids:["11","22"] }, private_tags: { tag_ids: ["33", "44"] } } } - 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: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. Return type: BulkUpdateConsentConfigTagsResponse - name: results | type: array | description: Consent configs updated by bulk action. - name: itemMetadata | type: ItemMetadata | description: Individual item metadata. - 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: 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 ### Bulk Update Consent Config Tags Update tags on multiple consent configs in a single operation ```curl curl -X POST \ 'https://www.wixapis.com/consent/consent-config/v1/bulk/consent-configs/update-tags' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ --data-binary '{ "ids": [ "334afbf6-5c8b-4b43-9e9e-dd28664ca28f", "445bfcg7-6d9c-5c54-0f0f-ee39775db39g" ], "assignTags": { "tags": ["my-app-tag", "my-other-app-tab"] }, "unassignTags": { "tags": ["old-tag"] } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.cookieConsentPolicy.ConsentConfigsService.bulkUpdateConsentConfigTags(ids, options) Description: Updates tags for multiple consent configs. A tag that appears both in the list of `assignTags` and `unassignTags` will be assigned. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: ids Method parameters: param name: ids | type: array | description: List of consent config GUIDs to update. | required: true param name: options | type: BulkUpdateConsentConfigTagsOptions none - name: assignTags | type: Tags | description: Tags to assign to the consent configs. - 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 | description: List of tag GUIDs - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. - name: unassignTags | type: Tags | description: Tags to unassign from the consent configs. Return type: PROMISE - name: results | type: array | description: Consent configs updated by bulk action. - name: itemMetadata | type: ItemMetadata | description: Individual item metadata. - 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: 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 ### bulkUpdateConsentConfigTags ```javascript import { consentConfig } from '@wix/consent-policy'; async function bulkUpdateConsentConfigTags(ids,options) { const response = await consentConfig.bulkUpdateConsentConfigTags(ids,options); }; ``` ### bulkUpdateConsentConfigTags (with elevated permissions) ```javascript import { consentConfig } from '@wix/consent-policy'; import { auth } from '@wix/essentials'; async function myBulkUpdateConsentConfigTagsMethod(ids,options) { const elevatedBulkUpdateConsentConfigTags = auth.elevate(consentConfig.bulkUpdateConsentConfigTags); const response = await elevatedBulkUpdateConsentConfigTags(ids,options); } ``` ### bulkUpdateConsentConfigTags (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 { consentConfig } from '@wix/consent-policy'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { consentConfig }, // Include the auth strategy and host as relevant }); async function bulkUpdateConsentConfigTags(ids,options) { const response = await myWixClient.consentConfig.bulkUpdateConsentConfigTags(ids,options); }; ``` ---