Pick what you want to build and follow the path. Each one starts with a recipe or a single call and links to the reference pages you need next.
Most Loyalty integrations follow one of the paths below. They run on your server and authenticate with your GUID and API key (see Authentication). The exceptions are marked: the v3.0 endpoints use a Yotpo access token, and Product Potential Points needs no credentials.
Award points for orders from a custom or headless store
Send customers and orders from your platform so customers earn points against your active campaigns, and record refunds so points are adjusted.
- Start with: Record an order and award points (recipe).
- Go deeper: Create a customer record and Refund an order (recipes). Points are awarded asynchronously, and orders dated far in the past may not earn points.
- Reference: Create/Update Customer Records, Create Order, Create Refund.
Show points, tier and history on a customer account page
Show a customer's balance, VIP tier, progress toward the next tier and point history in your own UI.
- Start with: Fetch Customer Details with
with_history=true(andwith_referral_code=truefor their referral link stats). - Go deeper: Get Active Campaigns with
with_status=trueshows the customer's progress on each way to earn. Fetch VIP Tiers gives every tier's thresholds. To keep a copy in sync, poll Fetch All Recently Updated Customers. - Reference: Fetch Customer Details, Get Active Campaigns, Fetch VIP Tiers, Fetch Active Redemption Options.
Show the points a product earns on product pages
Show "Earn 30 points" on a product page, using your earning rules and, for a logged-in customer, their VIP multiplier. These are v3.0 endpoints.
- Start with: Product Potential Points (no credentials needed).
- Go deeper: Authenticated Product Potential Points applies the customer's tier multiplier and segment restrictions. Generate its
X-Customer-Tokenon your server. - Reference: both pages above.
Award points for custom actions
Reward actions outside of purchases, such as completing a survey or installing your app.
- Start with: Record a custom action (recipe).
- Go deeper: Get Active Campaigns lists each Custom Action campaign's
action_name, which your call must match. To correct a balance by hand, use Adjust a Customer's Point Balance. - Reference: Record Customer Action, Adjust a Customer's Point Balance.
Let customers redeem points for rewards
List the rewards a customer can afford, redeem one, and give them the coupon code.
- Start with: Redeem points for a reward (recipe).
- Go deeper: Send
delay_points_deduction: trueto deduct points only when the coupon is used at checkout. For rewards that use your own codes, upload them with Upload Coupon Codes. To return points for a cancelled coupon, use Approve Redemption Cancellation. To list issued coupons, use Reward Instances (v3.0, access token). - Reference: Fetch Active Redemption Options, Create Redemption, Get Redemption Code Data.
Run a referral program
Register a customer as a referrer, get their referral link, and send invitations to friends.
- Start with: Run a referral flow (recipe).
- Reference: Identify Referrer, Send Referral Emails.
Manage VIP tiers
Read your tier structure, and move customers between tiers.
- Start with: Fetch VIP Tiers.
- Go deeper: Stores on the current VIP tiers program can read the program and assign a customer to a tier with the v3.0 VIP Tiers API (access token). To remove a customer from an action-based tier, use Remove a Customer from an Action Based VIP Tier.
- Reference: Fetch VIP Tiers, Get VIP Tiers Program, Push Customer to Tier.
React to loyalty events
Trigger emails or update your CRM when a customer earns points, redeems, or changes tier.
- Start with: Intro to Webhook Events.
- Go deeper: webhook topics and payloads are documented in the Core API's Loyalty Webhook Events, and registration in About webhook events.
Handle privacy requests
Answer a customer's data access or deletion request.
- Start with: Data exists to check whether Loyalty holds data for an email.
- Go deeper: User data emails an export to your Loyalty account's email address. Anonymize user anonymizes the customer's personal data.
- Reference: Data exists, User data, Anonymize user.