REST API Extended – Overview
Note: This article relates to the REST API Extended pro add-on.
The REST API Extended add-on opens a whole new world of flexibility when it comes to leveraging the services you rely on to run your affiliate program on the web.
There are only two requirements to use the REST API Extended pro add-on:
- WordPress 4.4+
- PHP 5.6+
Prior to AffiliateWP 1.9, integrating third-party services typically took one of two common paths:
- Via inclusion as a core-supported integration, configurable via Affiliates → Integrations
- Via inclusion of custom code or installing official or third-party add-ons
The key downside of both of those paths was that the code (in most cases) needed to live directly adjacent to AffiliateWP to be able to interact with it. That meant installing any number of add-ons on each site to get the desired functionality.
With the launch of a REST API in AffiliateWP, this requirement largely disappears. In fact, REST endpoints inherently encourage the idea of extending AffiliateWP from outside of the WordPress sphere.
A great example of this in action is the Zapier add-on, which currently makes it possible for events like adding new affiliates or referrals, generating payouts and more to trigger events on third-party services. Soon, the Zapier add-on will allow for two-way interaction too, such as triggering events in AffiliateWP when a third-party service does something. Exciting!
The possibilities enabled with this extended API are nearly endless. A few examples of possible applications include:
- Visit and referral tracking from external websites, including non-WordPress sites
- Referral tracking in custom and non-WordPress eCommerce systems
- Synchronization of affiliate accounts across multiple databases and servers
- Automatically updating affiliate accounts when changes are made from external applications
- Creating referral records for affiliates each time an order is processed in an external payment processor
- Custom affiliate areas hosted outside of WordPress