Skip to content

Documentation

WooRewards

  1. Home
  2. Docs
  3. WooRewards
  4. Features
  5. API
  6. User’s Points

User’s Points

This documentation is for the WooRewards plugin

Use this API route to get a user’s points in a points reserve used by a points and rewards system. It requires only the user reading permission.

 

GET
/wp-json/woorewards/v1/points/<user_email>/<pool_id>

 

Available parameters

  • Id : Description
  • user_email : (string) – A user email.
  • pool_id : (string) – The points and rewards system identifier.

 

Response

The JSON response is a status object. That object contains at least the following properties:

  • Id : Description
  • id : The points and rewards system identifier as set in the parameters.
  • points : The identifier of the point reserve (since several points and rewards system can share the same points reserve).
  • value : The user’s points amount in this points reserve.

 

Error cases

A 404 error is raised if the points and rewards system identifier cannot be found.

A 404 error is raised if the user cannot be found by email.

Scroll To Top