The Referral Program API allows you to create and manage a referral program for a site. With this API, you can incentivize a business's existing customers to bring in new ones, helping to grow a business through word-of-mouth marketing.
With the Referral Program API, you can:
See Wix Referral Program: Adding and Setting Up Your Referral Program for more information on setting up and managing referral program on a Wix site.
The Referral Rewards API supports the following types of rewards:
It's important to note the following points before starting to code:
To use the Programs API, install the @wix/referral
package using npm or Yarn:
or
Then import { programs }
from @wix/referral
:
Activates the referral program, changing its status to ACTIVE
.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Creates new AI-generated social media post suggestions for promoting the referral program.
This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.
Note: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Retrieves pre-generated AI social media post suggestions for promoting the referral program.
This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.
Note: This method retrieves existing suggestions. To generate new ones, use Generate AI Social Media Posts Suggestions.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Retrieves the referral program.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Retrieves information about the enabled premium features for the referral program.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Pauses the referral program, changing its status to PAUSED
.
function pauseReferralProgram(): Promise<PauseReferralProgramResponse>;
import { programs } from "@wix/referral";
async function pauseReferralProgram() {
const response = await programs.pauseReferralProgram();
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.