Skip to the content

The REST API

The admin screens and the browser extension talk to the plugin through its REST API.

Everything the admin does goes through routes under /wp-json/selldigits-affiliator/v1/. The admin's routes need a signed-in user and check the same role and Premium rules as the menu: a route that a screen needs a manager for needs a manager. The browser extension uses them with an Application Password. A few public routes receive the click and view reports that your pages send, and ignore anything that looks like a crawler or a flood.

These routes answer only to a logged-in browser. A WordPress Application Password is refused on them, except on the two the browser extension uses to find and add a product. A script or another service uses the SellDigits API instead (Premium), which has its own keys, limits and documentation.

The routes are the admin's own plumbing and are not a documented, stable interface: for your own code use the PHP functions and hooks, which are.

Type a word, such as "price", "disclosure" or "shortcode".