> 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

# GetDonationCampaign

# Package: donations

# Namespace: DonationCampaignService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/get-donation-campaign.md

## Permission Scopes:
Manage Donation Campaigns: SCOPE.DONATIONS.MANAGE-CAMPAIGNS

## Introduction

Retrieves a donation campaign by ID.

---

## REST API

### Schema

```
 Method: getDonationCampaign
 Description: Retrieves a donation campaign by GUID.
 URL: https://www.wixapis.com/donation-campaigns/v2/donation-campaigns/{donationCampaignId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  donationCampaignId
 Method parameters: 
   param name: donationCampaignId | type:   none | required: true 
 Return type: GetDonationCampaignResponse
  - name: donationCampaign | type: DonationCampaign | description: Retrieved donation campaign.  
     - name: id | type: string | description: Donation campaign GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the donation campaign is updated. To prevent conflicting changes, the current `revision` must be specified when updating the donation campaign.  Ignored when creating a donation campaign.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the donation campaign was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the donation campaign was last updated.  | read-only: true | validation: format date-time
     - name: name | type: string | description: Name of the donation campaign.  | validation: minLength 1, maxLength 65
     - name: archived | type: boolean | description: Whether the donation campaign is archived and hidden from site visitors. Archived campaigns can't accept donations.  Default: `false`  
     - name: status | type: Status | description: Current status of the donation campaign.  The status is automatically calculated based on campaign settings and current progress: - `COLLECTING`: Campaign is active and accepting donations - `EXPIRED`: Campaign has passed its end date and `acceptDonationsAfterEndDate` is `false` - `GOAL_REACHED`: Campaign has reached its target amount and `acceptDonationsAfterGoal` is `false`  | read-only: true 
         - enum:
         -     COLLECTING: Campaign is actively accepting donations.
         -     EXPIRED: Campaign has passed its `endDate` and `acceptDonationsAfterEndDate` is `false`.
         -     GOAL_REACHED: Campaign has reached its `targetAmount` and `acceptDonationsAfterGoal` is `false`.
     - name: coverImage | type: Image | description: Cover image for the donation campaign.  
        - name: id | type: string | description: WixMedia image GUID.  | validation: maxLength 256
        - name: url | type: string | description: Image URL.  | validation: format WEB_URL
        - name: height | type: integer | description: Original image height.  | read-only: true 
        - name: width | type: integer | description: Original image width.  | read-only: true 
        - name: altText | type: string | description: Image alt text.  | validation: maxLength 256
        - name: filename | type: string | description: Image filename.  | read-only: true | validation: maxLength 256
     - name: customAmountEnabled | type: boolean | description: Whether donors can specify their own donation amount. If custom amounts are disabled, at least one predefined amount must be provided.  Default: `false`  
     - name: customAmountOptions | type: CustomAmountOptions | description: Optional settings for custom donation amounts.  
        - name: minimum | type: MultiCurrencyPrice | description: Minimum donation amount.  
           - name: amount | type: string | description: Amount.  | validation: decimalValue {"gte":"0","lte":"1000000000000000"}
           - name: convertedAmount | type: string | description: Converted amount.  | read-only: true | validation: decimalValue {"gte":"0","lte":"1000000000000000"}
           - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  | read-only: true 
           - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol.  | read-only: true 
        - name: maximum | type: MultiCurrencyPrice | description: Maximum donation amount.  
     - name: predefinedDonationAmounts | type: array<PredefinedAmount> | description: Predefined donation amounts.  Each amount can include an optional description explaining its impact. For example, "Feed 5 families for a week".  | validation: maxItems 20
        - name: id | type: string | description: Predefined amount GUID. You must provide this GUID when creating or updating campaigns.  | validation: format GUID
        - name: price | type: MultiCurrencyPrice | description: Donation amount.  Currently supports the site's default currency only.  
        - name: description | type: string | description: Description explaining the impact of this donation amount. For example, "Feed 5 families for a week" or "Plant 10 trees".  | validation: maxLength 200
     - name: campaignGoal | type: CampaignGoal | description: Campaign fundraising goal.  
        - name: targetAmount | type: MultiCurrencyPrice | description: Target fundraising amount.  Currently supports the site's default currency only.  
        - name: endDate | type: string | description: Campaign end date in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.  The behavior after this date is controlled by `acceptDonationsAfterEndDate`.  | validation: format date-time
        - name: acceptDonationsAfterEndDate | type: boolean | description: Whether donations are accepted after `endDate`. This field is ignored if `endDate` is not set.  Default: `false`  
        - name: acceptDonationsAfterGoal | type: boolean | description: Whether donations are accepted after reaching `targetAmount`.  Default: `true`  
     - name: commentsEnabled | type: boolean | description: Whether donors can add comments to their donations.  Default: `false`  
     - name: donationFrequencies | type: array<Frequency> | description: Donation frequencies available for this campaign.  At least one frequency must be specified.  | validation: minItems 1, maxItems 4
         - enum:
         -     ONE_TIME: One-time donation.
         -     WEEK: Weekly recurring donation.
         -     MONTH: Monthly recurring donation.
         -     YEAR: Yearly recurring donation.
     - name: askDonorCoverFee | type: boolean | description: Whether to ask donors during checkout if they want to add 2.9% to their donation to cover fees.  When `false`, fees are deducted from the donation amount, meaning the campaign receives less than the donor's original contribution.  When `true`, donors are presented with an option in the checkout UI to add a 2.9% fee on top of their donation. This fee helps offset processing costs, ensuring more of the original donation reaches the campaign. The donor always has the choice — they are never automatically charged the fee.  For recurring donations, if the donor opts to cover fees, the 2.9% fee is applied to each recurring payment (not just the first one).  > **Notes:** > + The 2.9% rate is fixed and cannot be customized by campaign owners. > + This feature works with all payment methods and currencies.  Default: `false`  
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the program definition object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
        - 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: tags | type: Tags | description: Tags assigned to this donation campaign.  
        - 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<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  

 Possible Errors:
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later.


```

### Examples

### Get Donation Campaign
Retrieves a donation campaign by its ID

```curl
curl -X GET \
  'https://www.wixapis.com/donation-campaigns/v2/donation-campaigns/87f8066e-f0e9-41da-b4ca-4bceb2ecdf31' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.donations.donationCampaigns.getDonationCampaign(donationCampaignId)
 Description: Retrieves a donation campaign by GUID.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  donationCampaignId
 Method parameters: 
   param name: donationCampaignId | type: string | description: GUID of the donation campaign to retrieve. | required: true | validation: format GUID
 Return type: PROMISE<DonationCampaign>
  - name: _id | type: string | description: Donation campaign GUID.  | read-only: true | validation: format GUID
  - name: revision | type: string | description: Revision number, which increments by 1 each time the donation campaign is updated. To prevent conflicting changes, the current `revision` must be specified when updating the donation campaign.  Ignored when creating a donation campaign.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the donation campaign was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the donation campaign was last updated.  | read-only: true 
  - name: name | type: string | description: Name of the donation campaign.  | validation: minLength 1, maxLength 65
  - name: archived | type: boolean | description: Whether the donation campaign is archived and hidden from site visitors. Archived campaigns can't accept donations.  Default: `false`  
  - name: status | type: Status | description: Current status of the donation campaign.  The status is automatically calculated based on campaign settings and current progress: - `COLLECTING`: Campaign is active and accepting donations - `EXPIRED`: Campaign has passed its end date and `acceptDonationsAfterEndDate` is `false` - `GOAL_REACHED`: Campaign has reached its target amount and `acceptDonationsAfterGoal` is `false`  | read-only: true 
     - enum:
     -     COLLECTING: Campaign is actively accepting donations.
     -     EXPIRED: Campaign has passed its `endDate` and `acceptDonationsAfterEndDate` is `false`.
     -     GOAL_REACHED: Campaign has reached its `targetAmount` and `acceptDonationsAfterGoal` is `false`.
  - name: coverImage | type: string | description: Cover image for the donation campaign.  
  - name: customAmountEnabled | type: boolean | description: Whether donors can specify their own donation amount. If custom amounts are disabled, at least one predefined amount must be provided.  Default: `false`  
  - name: customAmountOptions | type: CustomAmountOptions | description: Optional settings for custom donation amounts.  
     - name: minimum | type: MultiCurrencyPrice | description: Minimum donation amount.  
        - name: amount | type: string | description: Amount.  | validation: decimalValue {"gte":"0","lte":"1000000000000000"}
        - name: convertedAmount | type: string | description: Converted amount.  | read-only: true | validation: decimalValue {"gte":"0","lte":"1000000000000000"}
        - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  | read-only: true 
        - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol.  | read-only: true 
     - name: maximum | type: MultiCurrencyPrice | description: Maximum donation amount.  
  - name: predefinedDonationAmounts | type: array<PredefinedAmount> | description: Predefined donation amounts.  Each amount can include an optional description explaining its impact. For example, "Feed 5 families for a week".  | validation: maxItems 20
     - name: _id | type: string | description: Predefined amount GUID. You must provide this GUID when creating or updating campaigns.  | validation: format GUID
     - name: price | type: MultiCurrencyPrice | description: Donation amount.  Currently supports the site's default currency only.  
     - name: description | type: string | description: Description explaining the impact of this donation amount. For example, "Feed 5 families for a week" or "Plant 10 trees".  | validation: maxLength 200
  - name: campaignGoal | type: CampaignGoal | description: Campaign fundraising goal.  
     - name: targetAmount | type: MultiCurrencyPrice | description: Target fundraising amount.  Currently supports the site's default currency only.  
     - name: endDate | type: Date | description: Campaign end date in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.  The behavior after this date is controlled by `acceptDonationsAfterEndDate`.  
     - name: acceptDonationsAfterEndDate | type: boolean | description: Whether donations are accepted after `endDate`. This field is ignored if `endDate` is not set.  Default: `false`  
     - name: acceptDonationsAfterGoal | type: boolean | description: Whether donations are accepted after reaching `targetAmount`.  Default: `true`  
  - name: commentsEnabled | type: boolean | description: Whether donors can add comments to their donations.  Default: `false`  
  - name: donationFrequencies | type: array<Frequency> | description: Donation frequencies available for this campaign.  At least one frequency must be specified.  | validation: minItems 1, maxItems 4
     - enum:
     -     ONE_TIME: One-time donation.
     -     WEEK: Weekly recurring donation.
     -     MONTH: Monthly recurring donation.
     -     YEAR: Yearly recurring donation.
  - name: askDonorCoverFee | type: boolean | description: Whether to ask donors during checkout if they want to add 2.9% to their donation to cover fees.  When `false`, fees are deducted from the donation amount, meaning the campaign receives less than the donor's original contribution.  When `true`, donors are presented with an option in the checkout UI to add a 2.9% fee on top of their donation. This fee helps offset processing costs, ensuring more of the original donation reaches the campaign. The donor always has the choice — they are never automatically charged the fee.  For recurring donations, if the donor opts to cover fees, the 2.9% fee is applied to each recurring payment (not just the first one).  > **Notes:** > + The 2.9% rate is fixed and cannot be customized by campaign owners. > + This feature works with all payment methods and currencies.  Default: `false`  
  - name: extendedFields | type: ExtendedFields | description: Custom field data for the program definition object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
     - 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: tags | type: Tags | description: Tags assigned to this donation campaign.  
     - 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<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
     - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  

 Possible Errors:
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later.


```

### Examples

### getDonationCampaign
```javascript
import { donationCampaigns } from '@wix/donations';

async function getDonationCampaign(donationCampaignId) {
  const response = await donationCampaigns.getDonationCampaign(donationCampaignId);
};
```

### getDonationCampaign (with elevated permissions)
```javascript
import { donationCampaigns } from '@wix/donations';
import { auth } from '@wix/essentials';

async function myGetDonationCampaignMethod(donationCampaignId) {
  const elevatedGetDonationCampaign = auth.elevate(donationCampaigns.getDonationCampaign);
  const response = await elevatedGetDonationCampaign(donationCampaignId);
}
```

### getDonationCampaign (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 { 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 getDonationCampaign(donationCampaignId) {
  const response = await myWixClient.donationCampaigns.getDonationCampaign(donationCampaignId);
};
```

---