> 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 # BulkUpdateDonationCampaignTags # Package: donations # Namespace: DonationCampaignService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/bulk-update-donation-campaign-tags.md ## Permission Scopes: Manage Donation Campaigns: SCOPE.DONATIONS.MANAGE-CAMPAIGNS ## Introduction Updates tags on multiple donation campaigns by ID. Use this method to assign or remove tags from specific campaigns. A tag that appears in both assign and unassign lists will be assigned. --- ## REST API ### Schema ``` Method: bulkUpdateDonationCampaignTags Description: Updates tags on multiple donation campaigns by GUID. Use this method to assign or remove tags from specific campaigns. A tag that appears in both assign and unassign lists will be assigned. URL: https://www.wixapis.com/donation-campaigns/v2/bulk/donation-campaigns/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 { option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo"; string id = 1; ... Tags tags = 5 } example of taggable entity { id: "123" tags: { public_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, typically restricted from site members and visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors. param name: ids | type: array | description: Donation campaign GUIDs. | required: true param name: unassignTags | type: Tags | description: Common object for tags. Should be use as in this example: message Foo { option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo"; string id = 1; ... Tags tags = 5 } example of taggable entity { id: "123" tags: { public_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, typically restricted from site members and visitors. - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors. Return type: BulkUpdateDonationCampaignTagsResponse - name: results | type: array | description: Results of the tag update operation. - name: itemMetadata | type: ItemMetadata | description: Metadata about this specific tag update 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: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk 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. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: EMPTY_ASSIGN_AND_UNASSIGN_LISTS | Description: No tags were specified to assign or unassign. HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later. ``` ### Examples ### // @Bulk Update Donation Campaign Tags @description: Updates tags of 2 donation campaigns in one request import { donationCampaigns } from "@wix/donations"; ```curl async function bulkUpdateDonationCampaignTags() { const response = await donationCampaigns.bulkUpdateDonationCampaignTags({ ids: [ "87f8066e-f0e9-41da-b4ca-4bceb2ecdf31", "fb54c2ad-2f71-4c71-bd3c-60ab9f9ea29e", ], assignTags: { publicTags: { tagIds: ["yg555", "p5627"] }, }, unassignTags: { publicTags: { tagIds: ["96gFf"] }, }, }); return response; } ``` ### Bulk Update Donation Campaign Tags Updates tags of 2 donation campaigns in one request ```curl curl -X POST \ 'https://www.wixapis.com/donation-campaigns/v2/bulk/donation-campaigns/update-tags' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "ids": [ "87f8066e-f0e9-41da-b4ca-4bceb2ecdf31", "fb54c2ad-2f71-4c71-bd3c-60ab9f9ea29e" ], "assignTags": { "publicTags": { "tagIds": [ "yg555", "p5627" ] } }, "unassignTags": { "publicTags": { "tagIds": [ "96gFf" ] } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.donations.DonationCampaignService.bulkUpdateDonationCampaignTags(ids, options) Description: Updates tags on multiple donation campaigns by GUID. Use this method to assign or remove tags from specific campaigns. A tag that appears in both assign and unassign lists 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: Donation campaign GUIDs. | required: true param name: options | type: BulkUpdateDonationCampaignTagsOptions none - name: assignTags | type: Tags | description: Tags to assign. If a tag already exists on a campaign, it remains assigned. - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors. - name: unassignTags | type: Tags | description: Tags to unassign. If a tag doesn't exist on a campaign, it's ignored. Return type: PROMISE - name: results | type: array | description: Results of the tag update operation. - name: itemMetadata | type: ItemMetadata | description: Metadata about this specific tag update 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: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk 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. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: EMPTY_ASSIGN_AND_UNASSIGN_LISTS | Description: No tags were specified to assign or unassign. HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later. ``` ### Examples ### bulkUpdateDonationCampaignTags ```javascript import { donationCampaigns } from '@wix/donations'; async function bulkUpdateDonationCampaignTags(ids,options) { const response = await donationCampaigns.bulkUpdateDonationCampaignTags(ids,options); }; ``` ### bulkUpdateDonationCampaignTags (with elevated permissions) ```javascript import { donationCampaigns } from '@wix/donations'; import { auth } from '@wix/essentials'; async function myBulkUpdateDonationCampaignTagsMethod(ids,options) { const elevatedBulkUpdateDonationCampaignTags = auth.elevate(donationCampaigns.bulkUpdateDonationCampaignTags); const response = await elevatedBulkUpdateDonationCampaignTags(ids,options); } ``` ### bulkUpdateDonationCampaignTags (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 { donationCampaigns } from '@wix/donations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { donationCampaigns }, // Include the auth strategy and host as relevant }); async function bulkUpdateDonationCampaignTags(ids,options) { const response = await myWixClient.donationCampaigns.bulkUpdateDonationCampaignTags(ids,options); }; ``` ---