Any endpoint of this controller requires an administrator logged in on rest API.
Check authentication chapter from WordPress rest API handbook for more information.
Table of contents
Award points
Award a desired points amount to the given user.
Arguments
| User who points will be awarded. Accepts the user username, email or ID. |
| User who points will be awarded (deprecated, use “user” parameter instead). |
| Points amount to award. |
| Points type’s slug of points amount to award. |
| 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=1&points=1&points_type=gem&reason=test"
Deduct points
Deduct a desired points amount to the given user.
Arguments
| User who points will be deducted. Accepts the user username, email or ID. |
| User who points will be deducted (deprecated, use “user” parameter instead). |
| Points amount to deduct. |
| Points type’s slug of points amount to deduct. |
| 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=1&points=1&points_type=gem&reason=test"