> 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

# UpdateReferralProgram

# Package: referralProgram

# Namespace: ReferralPrograms

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/referral-program/referral-program/update-referral-program?apiView=SDK.md

## Permission Scopes:
Manage Referrals: SCOPE.DC-REFERRALS.MANAGE-REFERRALS

## Introduction

Updates a referral program. Supports partial updates.

Revision number, which increments by 1 each time the referral program is updated.
To prevent conflicting changes, the current revision must be passed when updating the referral program.

---

## REST API

### Schema

```
 Method: updateReferralProgram
 Description: Updates a referral program. Supports partial updates.  Revision number, which increments by 1 each time the referral program is updated. To prevent conflicting changes, the current revision must be passed when updating the referral program.
 URL: https://www.wixapis.com/_api/referral-programs/v1/program
 Method: PATCH
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  referralProgram, referralProgram.revision
 Method parameters: 
   param name: referralProgram | type: ReferralProgram   | required: true 
        - name: name | type: string | description: Referral program name.  | validation: minLength 2, maxLength 50
        - name: revision | type: string | description: Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current `revision` must be passed when updating the program. | required: true | validation: format int64, immutable
        - name: referredFriendReward | type: Reward | description: Reward configuration for the referred friend. Specifies the reward given to a new customer who was referred to the business.  
           - ONE-OF: 
              - name: couponOptions | type: Coupon | description: Options for coupon reward type.  
                 - ONE-OF: 
                    - name: fixedAmountOptions | type: FixedAmountDiscount | description: Options for fixed amount discount.  
                       - name: amount | type: number | description: Amount of the discount as a fixed value.  | validation: minimum 0.01
                    - name: percentageOptions | type: PercentageDiscount | description: Options for percentage discounts.  
                       - name: percentage | type: number | description: Percentage of discount.  | validation: minimum 0, maximum 100
                 - ONE-OF: 
                    - name: minimumSubtotal | type: number | description: Limit the coupon to carts with a subtotal above this number.  
                    - name: scope | type: CouponScope | description: Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).  
                       - name: namespace | type: string | description: Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)  
                       - name: group | type: Group | description: Coupon scope's applied group, for example, Event or ticket in Wix Events.  
                          - name: name | type: string | description: Name of the group.  
                          - name: entityId | type: string | description: Entity GUID of the group.  
                 - name: name | type: string | description: Coupon name.  | validation: minLength 1, maxLength 50
                 - name: discountType | type: DiscountType | description: Coupon discount type.  
                         - enum:
                         -     UNKNOWN: Unknown discount type.
                         -     FIXED_AMOUNT: Discount as a fixed amount.
                         -     PERCENTAGE: Discount as a percentage.
                         -     FREE_SHIPPING: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
                 - name: limitedToOneItem | type: boolean | description: Whether the coupon is limited to one item. If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item. Coupons with a bookings `scope.namespace` are always limited to one item.  
                 - name: appliesToSubscriptions | type: boolean | description: Whether the coupon applies to subscription products.  
                 - name: discountedCycleCount | type: integer | description: Specifies the amount of discounted cycles for a subscription item.  - Can only be set when `scope.namespace = pricingPlans`. - If `discountedCycleCount` is empty, the coupon applies to all available cycles. - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.  Max: `999`  | validation: format int32
              - name: loyaltyPointsOptions | type: LoyaltyPoints | description: Options for the Loyalty points reward type.  
                 - name: amount | type: integer | description: Number of loyalty points to give.  | validation: minimum 1, maximum 9999999
           - name: type | type: Type | description: Type of the reward.  
                 - enum:
                 -     UNKNOWN: Unknown reward type.
                 -     COUPON: Coupon reward type.
                 -     LOYALTY_POINTS: Loyalty points reward type.
                 -     NOTHING: No reward type.
        - name: referringCustomerReward | type: Reward | description: Reward configuration for the referring customer. Specifies the reward given to an existing customer who referred a new customer to the business.  
        - name: successfulReferralActions | type: array<Action> | description: List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item.  | validation: maxItems 100
             - enum:
             -     UNKNOWN: Unknown action.
             -     STORE_ORDER_PLACED: Referred friend ordered and paid for an order in a store.
             -     PLAN_ORDERED: Referred friend ordered and paid for a plan.
             -     TICKET_ORDERED: Referred friend ordered and paid for a ticket.
             -     SESSION_BOOKED: Referred friend booked and paid for a session.
             -     RESTAURANT_ORDER_PLACED: Referred friend placed and paid for a restaurant order.
             -     ONLINE_PROGRAM_JOINED: Referred friend joined an online program.
        - name: emails | type: Emails | description: Configures email notifications for the referral program.  
           - name: encourageToReferFriends | type: array<App> | description: Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled.  
                 - enum:
                 -     UNKNOWN: Unknown app.
                 -     STORES: Send an email to customers who've placed an order with stores.
                 -     PRICING_PLANS: Send an email to customers who've placed an order with pricing plans.
                 -     EVENTS: Send an email to customers who've placed an order with events.
                 -     BOOKINGS: Send an email to customers who've placed an order with bookings.
                 -     RESTAURANTS: Send an email to customers who've placed an order with restaurants.
                 -     ONLINE_PROGRAMS: Send an email to customers who've joined an online program.
           - name: notifyCustomersAboutReward | type: boolean | description: Whether to send email notifications to referring customers when they receive a referral reward. If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).  
 Return type: UpdateReferralProgramResponse
  - name: referralProgram | type: ReferralProgram | description: Updated referral program.  
     - name: name | type: string | description: Referral program name.  | validation: minLength 2, maxLength 50
     - name: status | type: ProgramStatus | description:   | read-only: true 
         - enum:
         -     UNKNOWN: Unknown program status.
         -     DRAFT: Referral program is in a draft state and is being modified. It is not yet active.
         -     ACTIVE: Referral program is active.
         -     PAUSED: Referral program is paused.
     - name: revision | type: string | description: Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current `revision` must be passed when updating the program.  | validation: format int64, immutable
     - name: createdDate | type: string | description: Date and time the program was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the program was last updated.  | read-only: true | validation: format date-time
     - name: referredFriendReward | type: Reward | description: Reward configuration for the referred friend. Specifies the reward given to a new customer who was referred to the business.  
        - ONE-OF: 
           - name: couponOptions | type: Coupon | description: Options for coupon reward type.  
              - ONE-OF: 
                 - name: fixedAmountOptions | type: FixedAmountDiscount | description: Options for fixed amount discount.  
                    - name: amount | type: number | description: Amount of the discount as a fixed value.  | validation: minimum 0.01
                 - name: percentageOptions | type: PercentageDiscount | description: Options for percentage discounts.  
                    - name: percentage | type: number | description: Percentage of discount.  | validation: minimum 0, maximum 100
              - ONE-OF: 
                 - name: minimumSubtotal | type: number | description: Limit the coupon to carts with a subtotal above this number.  
                 - name: scope | type: CouponScope | description: Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).  
                    - name: namespace | type: string | description: Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)  
                    - name: group | type: Group | description: Coupon scope's applied group, for example, Event or ticket in Wix Events.  
                       - name: name | type: string | description: Name of the group.  
                       - name: entityId | type: string | description: Entity GUID of the group.  
              - name: name | type: string | description: Coupon name.  | validation: minLength 1, maxLength 50
              - name: discountType | type: DiscountType | description: Coupon discount type.  
                     - enum:
                     -     UNKNOWN: Unknown discount type.
                     -     FIXED_AMOUNT: Discount as a fixed amount.
                     -     PERCENTAGE: Discount as a percentage.
                     -     FREE_SHIPPING: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
              - name: limitedToOneItem | type: boolean | description: Whether the coupon is limited to one item. If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item. Coupons with a bookings `scope.namespace` are always limited to one item.  
              - name: appliesToSubscriptions | type: boolean | description: Whether the coupon applies to subscription products.  
              - name: discountedCycleCount | type: integer | description: Specifies the amount of discounted cycles for a subscription item.  - Can only be set when `scope.namespace = pricingPlans`. - If `discountedCycleCount` is empty, the coupon applies to all available cycles. - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.  Max: `999`  | validation: format int32
           - name: loyaltyPointsOptions | type: LoyaltyPoints | description: Options for the Loyalty points reward type.  
              - name: amount | type: integer | description: Number of loyalty points to give.  | validation: minimum 1, maximum 9999999
        - name: type | type: Type | description: Type of the reward.  
             - enum:
             -     UNKNOWN: Unknown reward type.
             -     COUPON: Coupon reward type.
             -     LOYALTY_POINTS: Loyalty points reward type.
             -     NOTHING: No reward type.
     - name: referringCustomerReward | type: Reward | description: Reward configuration for the referring customer. Specifies the reward given to an existing customer who referred a new customer to the business.  
     - name: successfulReferralActions | type: array<Action> | description: List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item.  | validation: maxItems 100
         - enum:
         -     UNKNOWN: Unknown action.
         -     STORE_ORDER_PLACED: Referred friend ordered and paid for an order in a store.
         -     PLAN_ORDERED: Referred friend ordered and paid for a plan.
         -     TICKET_ORDERED: Referred friend ordered and paid for a ticket.
         -     SESSION_BOOKED: Referred friend booked and paid for a session.
         -     RESTAURANT_ORDER_PLACED: Referred friend placed and paid for a restaurant order.
         -     ONLINE_PROGRAM_JOINED: Referred friend joined an online program.
     - name: emails | type: Emails | description: Configures email notifications for the referral program.  
        - name: encourageToReferFriends | type: array<App> | description: Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled.  
             - enum:
             -     UNKNOWN: Unknown app.
             -     STORES: Send an email to customers who've placed an order with stores.
             -     PRICING_PLANS: Send an email to customers who've placed an order with pricing plans.
             -     EVENTS: Send an email to customers who've placed an order with events.
             -     BOOKINGS: Send an email to customers who've placed an order with bookings.
             -     RESTAURANTS: Send an email to customers who've placed an order with restaurants.
             -     ONLINE_PROGRAMS: Send an email to customers who've joined an online program.
        - name: notifyCustomersAboutReward | type: boolean | description: Whether to send email notifications to referring customers when they receive a referral reward. If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).  
     - name: premiumFeatures | type: PremiumFeatures | description: Indicates which premium features are available for the current account.  | read-only: true 
        - name: referralProgram | type: boolean | description: Whether the site owner has access to the referral program feature.  | read-only: true 


```

### Examples

### Update Referral Program
```curl
curl -X PATCH \
  'https://www.wixapis.com/_api/referral-programs/v1/program' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
        "referralProgram": {
            "name": "Get a 35% discount for each friend your refer",
            "revision": "3"
          }
    }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.referral.programs.updateReferralProgram(referralProgram)
 Description: Updates a referral program. Supports partial updates.  Revision number, which increments by 1 each time the referral program is updated. To prevent conflicting changes, the current revision must be passed when updating the referral program.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  referralProgram, referralProgram.revision
 Method parameters: 
   param name: referralProgram | type: ReferralProgram   | required: true 
        - name: name | type: string | description: Referral program name.  | validation: minLength 2, maxLength 50
        - name: revision | type: string | description: Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current `revision` must be passed when updating the program. | required: true | validation: format int64, immutable
        - name: referredFriendReward | type: Reward | description: Reward configuration for the referred friend. Specifies the reward given to a new customer who was referred to the business.  
           - ONE-OF: 
              - name: couponOptions | type: Coupon | description: Options for coupon reward type.  
                 - ONE-OF: 
                    - name: fixedAmountOptions | type: FixedAmountDiscount | description: Options for fixed amount discount.  
                       - name: amount | type: number | description: Amount of the discount as a fixed value.  | validation: minimum 0.01
                    - name: percentageOptions | type: PercentageDiscount | description: Options for percentage discounts.  
                       - name: percentage | type: number | description: Percentage of discount.  | validation: minimum 0, maximum 100
                 - ONE-OF: 
                    - name: minimumSubtotal | type: number | description: Limit the coupon to carts with a subtotal above this number.  
                    - name: scope | type: CouponScope | description: Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).  
                       - name: namespace | type: string | description: Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)  
                       - name: group | type: Group | description: Coupon scope's applied group, for example, Event or ticket in Wix Events.  
                          - name: name | type: string | description: Name of the group.  
                          - name: entityId | type: string | description: Entity GUID of the group.  
                 - name: name | type: string | description: Coupon name.  | validation: minLength 1, maxLength 50
                 - name: discountType | type: DiscountType | description: Coupon discount type.  
                         - enum:
                         -     UNKNOWN: Unknown discount type.
                         -     FIXED_AMOUNT: Discount as a fixed amount.
                         -     PERCENTAGE: Discount as a percentage.
                         -     FREE_SHIPPING: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
                 - name: limitedToOneItem | type: boolean | description: Whether the coupon is limited to one item. If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item. Coupons with a bookings `scope.namespace` are always limited to one item.  
                 - name: appliesToSubscriptions | type: boolean | description: Whether the coupon applies to subscription products.  
                 - name: discountedCycleCount | type: integer | description: Specifies the amount of discounted cycles for a subscription item.  - Can only be set when `scope.namespace = pricingPlans`. - If `discountedCycleCount` is empty, the coupon applies to all available cycles. - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.  Max: `999`  | validation: format int32
              - name: loyaltyPointsOptions | type: LoyaltyPoints | description: Options for the Loyalty points reward type.  
                 - name: amount | type: integer | description: Number of loyalty points to give.  | validation: minimum 1, maximum 9999999
           - name: type | type: Type | description: Type of the reward.  
                 - enum:
                 -     UNKNOWN: Unknown reward type.
                 -     COUPON: Coupon reward type.
                 -     LOYALTY_POINTS: Loyalty points reward type.
                 -     NOTHING: No reward type.
        - name: referringCustomerReward | type: Reward | description: Reward configuration for the referring customer. Specifies the reward given to an existing customer who referred a new customer to the business.  
        - name: successfulReferralActions | type: array<Action> | description: List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item.  | validation: maxItems 100
             - enum:
             -     UNKNOWN: Unknown action.
             -     STORE_ORDER_PLACED: Referred friend ordered and paid for an order in a store.
             -     PLAN_ORDERED: Referred friend ordered and paid for a plan.
             -     TICKET_ORDERED: Referred friend ordered and paid for a ticket.
             -     SESSION_BOOKED: Referred friend booked and paid for a session.
             -     RESTAURANT_ORDER_PLACED: Referred friend placed and paid for a restaurant order.
             -     ONLINE_PROGRAM_JOINED: Referred friend joined an online program.
        - name: emails | type: Emails | description: Configures email notifications for the referral program.  
           - name: encourageToReferFriends | type: array<App> | description: Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled.  
                 - enum:
                 -     UNKNOWN: Unknown app.
                 -     STORES: Send an email to customers who've placed an order with stores.
                 -     PRICING_PLANS: Send an email to customers who've placed an order with pricing plans.
                 -     EVENTS: Send an email to customers who've placed an order with events.
                 -     BOOKINGS: Send an email to customers who've placed an order with bookings.
                 -     RESTAURANTS: Send an email to customers who've placed an order with restaurants.
                 -     ONLINE_PROGRAMS: Send an email to customers who've joined an online program.
           - name: notifyCustomersAboutReward | type: boolean | description: Whether to send email notifications to referring customers when they receive a referral reward. If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).  
 Return type: PROMISE<UpdateReferralProgramResponse>
  - name: referralProgram | type: ReferralProgram | description: Updated referral program.  
     - name: name | type: string | description: Referral program name.  | validation: minLength 2, maxLength 50
     - name: status | type: ProgramStatus | description:   | read-only: true 
         - enum:
         -     UNKNOWN: Unknown program status.
         -     DRAFT: Referral program is in a draft state and is being modified. It is not yet active.
         -     ACTIVE: Referral program is active.
         -     PAUSED: Referral program is paused.
     - name: revision | type: string | description: Revision number, which increments by 1 each time the program is updated. To prevent conflicting changes, the current `revision` must be passed when updating the program.  | validation: format int64, immutable
     - name: _createdDate | type: Date | description: Date and time the program was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the program was last updated.  | read-only: true 
     - name: referredFriendReward | type: Reward | description: Reward configuration for the referred friend. Specifies the reward given to a new customer who was referred to the business.  
        - ONE-OF: 
           - name: couponOptions | type: Coupon | description: Options for coupon reward type.  
              - ONE-OF: 
                 - name: fixedAmountOptions | type: FixedAmountDiscount | description: Options for fixed amount discount.  
                    - name: amount | type: number | description: Amount of the discount as a fixed value.  | validation: minimum 0.01
                 - name: percentageOptions | type: PercentageDiscount | description: Options for percentage discounts.  
                    - name: percentage | type: number | description: Percentage of discount.  | validation: minimum 0, maximum 100
              - ONE-OF: 
                 - name: minimumSubtotal | type: number | description: Limit the coupon to carts with a subtotal above this number.  
                 - name: scope | type: CouponScope | description: Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values).  
                    - name: namespace | type: string | description: Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)  
                    - name: group | type: Group | description: Coupon scope's applied group, for example, Event or ticket in Wix Events.  
                       - name: name | type: string | description: Name of the group.  
                       - name: entityId | type: string | description: Entity GUID of the group.  
              - name: name | type: string | description: Coupon name.  | validation: minLength 1, maxLength 50
              - name: discountType | type: DiscountType | description: Coupon discount type.  
                     - enum:
                     -     UNKNOWN: Unknown discount type.
                     -     FIXED_AMOUNT: Discount as a fixed amount.
                     -     PERCENTAGE: Discount as a percentage.
                     -     FREE_SHIPPING: Free shipping. If `true`, the coupon applies to all items in all `namespaces`.
              - name: limitedToOneItem | type: boolean | description: Whether the coupon is limited to one item. If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item. Coupons with a bookings `scope.namespace` are always limited to one item.  
              - name: appliesToSubscriptions | type: boolean | description: Whether the coupon applies to subscription products.  
              - name: discountedCycleCount | type: integer | description: Specifies the amount of discounted cycles for a subscription item.  - Can only be set when `scope.namespace = pricingPlans`. - If `discountedCycleCount` is empty, the coupon applies to all available cycles. - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.  Max: `999`  | validation: format int32
           - name: loyaltyPointsOptions | type: LoyaltyPoints | description: Options for the Loyalty points reward type.  
              - name: amount | type: integer | description: Number of loyalty points to give.  | validation: minimum 1, maximum 9999999
        - name: type | type: Type | description: Type of the reward.  
             - enum:
             -     UNKNOWN: Unknown reward type.
             -     COUPON: Coupon reward type.
             -     LOYALTY_POINTS: Loyalty points reward type.
             -     NOTHING: No reward type.
     - name: referringCustomerReward | type: Reward | description: Reward configuration for the referring customer. Specifies the reward given to an existing customer who referred a new customer to the business.  
     - name: successfulReferralActions | type: array<Action> | description: List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item.  | validation: maxItems 100
         - enum:
         -     UNKNOWN: Unknown action.
         -     STORE_ORDER_PLACED: Referred friend ordered and paid for an order in a store.
         -     PLAN_ORDERED: Referred friend ordered and paid for a plan.
         -     TICKET_ORDERED: Referred friend ordered and paid for a ticket.
         -     SESSION_BOOKED: Referred friend booked and paid for a session.
         -     RESTAURANT_ORDER_PLACED: Referred friend placed and paid for a restaurant order.
         -     ONLINE_PROGRAM_JOINED: Referred friend joined an online program.
     - name: emails | type: Emails | description: Configures email notifications for the referral program.  
        - name: encourageToReferFriends | type: array<App> | description: Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled.  
             - enum:
             -     UNKNOWN: Unknown app.
             -     STORES: Send an email to customers who've placed an order with stores.
             -     PRICING_PLANS: Send an email to customers who've placed an order with pricing plans.
             -     EVENTS: Send an email to customers who've placed an order with events.
             -     BOOKINGS: Send an email to customers who've placed an order with bookings.
             -     RESTAURANTS: Send an email to customers who've placed an order with restaurants.
             -     ONLINE_PROGRAMS: Send an email to customers who've joined an online program.
        - name: notifyCustomersAboutReward | type: boolean | description: Whether to send email notifications to referring customers when they receive a referral reward. If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).  
     - name: premiumFeatures | type: PremiumFeatures | description: Indicates which premium features are available for the current account.  | read-only: true 
        - name: referralProgram | type: boolean | description: Whether the site owner has access to the referral program feature.  | read-only: true 


```

### Examples

### updateReferralProgram
```javascript
import { programs } from '@wix/referral';

async function updateReferralProgram(referralProgram) {
  const response = await programs.updateReferralProgram(referralProgram);
};
```

### updateReferralProgram (with elevated permissions)
```javascript
import { programs } from '@wix/referral';
import { auth } from '@wix/essentials';

async function myUpdateReferralProgramMethod(referralProgram) {
  const elevatedUpdateReferralProgram = auth.elevate(programs.updateReferralProgram);
  const response = await elevatedUpdateReferralProgram(referralProgram);
}
```

### updateReferralProgram (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 { programs } from '@wix/referral';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { programs },
  // Include the auth strategy and host as relevant
});


async function updateReferralProgram(referralProgram) {
  const response = await myWixClient.programs.updateReferralProgram(referralProgram);
};
```

---