REST API - Overview

The  REST API add-on provides a complete RESTful JSON API for retrieving, updating, creating, and deleting membership data in Restrict Content Pro.

Requirements

The Restrict Content Pro REST API depends on the WordPress REST API and will not function without it. It also has minimum version requirements for WordPress, PHP, and Restrict Content Pro.

  • WordPress: 4.4 or later
  • Restrict Content Pro: 2.5 or later
  • PHP: 5.3 or later

Endpoint

The RCP REST API is available at /wp-json/rcp/.

If the default wp-json endpoint has been changed, the rcp endpoint will respect that change, so adjust accordingly.

Versioning

Each distinct version of the REST API is accessible via the rcp endpoint. Versions may be deprecated at anytime but at no time will breaking changes be implementing without incrementing the version number. Past versions are expected to be kept available for at least six months beyond the release of the proceeding version.

  • /wp-json/rcp/{version}/{route}

Example: - /wp-json/rcp/v1/{route}

Current version: v1

Authentication

The RCP REST API requires authenticating with a WordPress user account that has the necessary capabilities in order to view, modify, and delete information via the REST API.

Please see the WordPress REST API Authentication documentation to instructions on how to authenticate with the API.