Badges
Badges
Knowledge Base
-
WooRewards
0
- MyRewards (Free Version) 5
- Getting Started 2
- Tutorials 4
- Features 12
-
Actions
23
- Spend Money
- Place an order
- Place a first order
- Buy Specific Products
- Buy in categories
- Product Review
- User registration
- Birthday
- Visit a post, page or url
- Send a referral email
- Referee registration
- Referee spends money
- Referee Orders
- Referee buys products
- Referee buys in categories
- Share on social networks
- Visitor clicks a social share
- Receive Badges
- Registration Anniversary
- Post a comment
- Click an image
- Publish a post
- Recurrent Visit
- Rewards 11
- WooCommerce Display 4
- Emails 7
- Shortcodes 7
- API 8
- Developer Resources 2
-
Add-Ons
12
- The Newsletter Plugin Subscription
- MC4WP Mailchimp subscription
- Points and Rewards System Limitation
- Referrals Information
- Points History Excel Export
- Points for Coupon
- Settings Migration
- Subscription Coupon Reward
- Partial Refund Reward
- The Scheduler
- Delayed and Recurring Points
- Points Synchronization
- Play Together 2
- Translations and WPML 2
- Changelog 1
- Knowledge Base
- WooRewards
- API
- Badges
This documentation is for the WooRewards plugin
Read the list of badges
Use the standard WordPress REST API to read the badges.
See WordPress documentation for more information.
Get a user’s badges
Use this API route to get a user’s badges. It requires only the user reading permission.
Available parameters
- user_email : (string) – A user email.
Response
The JSON response is an array of status object. That object contains at least the following properties:
- badge_id : The badge’s identifier.
- assign_date : The date the user got it.
Error cases
A 403 error is raised if logged in user is not the requested one or has no capabilities to read other user’s data.
A 404 error is raised if the user cannot be found by email.
Get the users that own a given badge
Use this API route to get a user’s badges. It requires the user reading permission.
Available parameters
- badge_id : (int) – A post identifier.
Response
The JSON response is an array of user’s identifier.
Error cases
A 403 error is raised if logged in user has no capabilities to read other user’s data.
A 404 error is raised if the badge cannot be found.
Get a badge rarity information
Use this API route to get a badge’s statistics. It requires the general reading permission.
Available parameters
- badge_id : (int) – A post identifier.
Response
The JSON response is a status object. That object contains at least the following properties:
- rarity : The rarity level name.
- percentage : (float) The percentage value is the max percentage of users owning the badge to get the corresponding rarity.
Error cases
A 404 error is raised if the badge cannot be found.