1. Home
  2. Docs
  3. WooRewards
  4. REST API

REST API

For some reason, you may want to connect a third party application or website to your loyalty program in order to perform different actions. The REST API is provided for that.

WooRewards REST API is for advanced users and developers only. This feature requires programming on the user’s side and should only be used by developers.


Disclaimers

Authentification

WooRewards REST API requires a logged user to exchange data and answer to requests. How you log the user is your responsibility but for security purposes, WooRewards API won’t respond without a logged user.

If you don’t know how to log a user, you can use WooCommerce’s REST API authentification described in this documentation

Permalinks

WooCommerce and WooRewards APIs require the use of permalinks on your website. Go to your website administration, inside Settings → Permalinks and select one of the options different than “Plain”. If you don’t, the API will not respond.


API Settings

You can activate and set up the WooRewards REST API by going to WooRewards → Settings → API

REST API

This section contains the main features of the API.

  • Enable REST API : Check this box and save your settings to enable the REST API. If unchecked, the API won’t respond to any requests.
  • Allow authentication by WooCommerce REST API : If checked, you can use the WooCommerce authentication method (as described in the documentation linked above) to connect users. If you setup any other API authentication method, let that option unchecked.

At the top of the section, there’s also a notice that indicates the url of the API.

User Permissions

In this section, you have to define which users can access the different features and functions of the API. There are different levels of authorizations required, depending on the task performed through the API :

  • Users allowed to read general information : This level of authentication is necessary to access basic information such as loyalty systems or rewards.
  • Users allowed to read user information : This level of authentication is used to access user information, which could be personal information. You must ensure that you follow the personal data regulations of the country you’re in.
  • Users allowed to change user information : This level of authentication is used to access and modify user information, which could be personal information. You must ensure that you follow the personal data regulations of the country you’re in.

For each section, select the user or users allowed to access the relative features. These are the users that you will use to connect to the REST API.


API Functions

Articles

Was this article helpful to you? Yes No

How can we help?