Any endpoint of this controller requires an administrator logged in on rest API. Check authentication chapter from WordPress rest API handbook for more information.
Get points # Retrieve the given user points balance.
Arguments # user_id
User to retrieve points balance.
points_type
Points type’s slug of points balance to retrieve.
Definition # POST /wp/v2/gamipress/get-points
Example Request # curl -X POST http://website.com/wp-json/wp/v2/gamipress/get-points -d "user_id=1&points_type=gem"
Award points # Award a desired points amount to the given user.
Arguments # user_id
User who points will be awarded.
points
Points amount to award.
points_type
Points type’s slug of points amount to award.
reason
Reason describing this points award (Optional). This text will appear on this points award log entry.
Definition # POST /wp/v2/gamipress/award-points
Example Request # curl -X POST http://website.com/wp-json/wp/v2/gamipress/award-points -d "user_id=1&points=1&points_type=gem&reason=test"
Deduct points # Deduct a desired points amount to the given user.
Arguments # user_id
User who points will be deducted.
points
Points amount to deduct.
points_type
Points type’s slug of points amount to deduct.
reason
Reason describing this points deduction (Optional). This text will appear on this points deduction log entry.
Definition # POST /wp/v2/gamipress/deduct-points
Example Request # curl -X POST http://website.com/wp-json/wp/v2/gamipress/deduct-points -d "user_id=1&points=1&points_type=gem&reason=test"
Doc navigation ← Getting Started Achievements Extended Controller →