REST API Reference

Get Started

REST API Reference

PRO Feature – Requires BuddyPress Member Reviews Pro addon

Overview

The Member Reviews REST API provides programmatic access to review data, ratings, and moderation features. Build mobile apps, external dashboards, or headless WordPress sites with full review functionality.

Base URL: /wp-json/bupr/v1/

Authentication

The API supports three authentication methods:

Cookie Authentication

Use WordPress cookie authentication for logged-in sessions. Requires nonce for write operations.

Best for: Admin interfaces, same-origin requests

Setup: Include X-WP-Nonce header with REST API nonce

Application Passwords

Create application-specific passwords for API access without exposing main credentials.

Best for: Mobile apps, third-party integrations

Setup:

  1. Go to Users → Profile
  2. Scroll to Application Passwords
  3. Enter app name and click Add New
  4. Use Basic Auth with username and generated password

JWT/OAuth (Third-Party Plugins)

Install JWT or OAuth plugins for token-based authentication.

Best for: Multi-user applications, distributed systems

Setup: Install a JWT/OAuth plugin compatible with WordPress REST API

Endpoints

GET /reviews

List all reviews with filtering and pagination.

Parameters:

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger10Reviews per page (max: 100)
member_idintegerFilter by reviewed member ID
author_idintegerFilter by review author ID
statusstringapprovedFilter by status: approved, pending, spam
verifiedbooleanFilter by verification status
min_ratingfloatMinimum rating (1.0-5.0)
date_startstringStart date (ISO 8601: 2024-01-01)
date_endstringEnd date (ISO 8601: 2024-12-31)
orderbystringdateSort by: date, rating, random
orderstringdescSort direction: asc, desc

Example Request:

GET /wp-json/bupr/v1/reviews?member_id=5&verified=true&per_page=20
Authorization: Basic base64(username:app_password)

Example Response:

{
  "reviews": [
    {
      "id": 123,
      "member_id": 5,
      "member_name": "John Doe",
      "author_id": 42,
      "author_name": "Jane Smith",
      "rating": 4.5,
      "title": "Excellent collaboration",
      "content": "John was professional and delivered quality work.",
      "criteria": [
        {
          "label": "Communication",
          "type": "stars",
          "value": 5,
          "weight": 1.5
        },
        {
          "label": "Quality",
          "type": "stars",
          "value": 4,
          "weight": 2.0
        }
      ],
      "is_verified": true,
      "verification_type": "admin",
      "is_featured": false,
      "is_anonymous": false,
      "status": "approved",
      "date_created": "2024-01-15T10:30:00",
      "date_modified": "2024-01-15T10:30:00"
    }
  ],
  "pagination": {
    "total": 45,
    "pages": 3,
    "page": 1,
    "per_page": 20
  }
}

GET /reviews/{id}

Retrieve a single review with full details.

Parameters:

ParameterTypeDescription
idintegerReview ID (required)

Example Request:

GET /wp-json/bupr/v1/reviews/123
Authorization: Basic base64(username:app_password)

Example Response:

{
  "id": 123,
  "member_id": 5,
  "member_name": "John Doe",
  "rating": 4.5,
  "title": "Excellent collaboration",
  "content": "John was professional and delivered quality work on time.",
  "criteria": [
    {
      "label": "Communication",
      "type": "stars",
      "value": 5,
      "weight": 1.5
    }
  ],
  "is_verified": true,
  "verification_type": "admin",
  "is_featured": false,
  "is_anonymous": false,
  "status": "approved",
  "date_created": "2024-01-15T10:30:00",
  "date_modified": "2024-01-15T10:30:00"
}

POST /reviews

Create a new review.

Permissions: User must be logged in and have permission to review the target member.

Request Body:

{
  "member_id": 5,
  "rating": 4.5,
  "title": "Great experience",
  "content": "Highly professional and skilled.",
  "criteria": [
    {
      "label": "Communication",
      "value": 5
    },
    {
      "label": "Quality",
      "value": 4
    }
  ],
  "is_anonymous": false
}

Example Response:

{
  "id": 124,
  "status": "pending",
  "message": "Review submitted successfully. Awaiting approval."
}

PATCH /reviews/{id}

Update an existing review.

Permissions: Review author or administrator.

Request Body:

{
  "rating": 5.0,
  "title": "Updated title",
  "content": "Updated review content.",
  "criteria": [
    {
      "label": "Communication",
      "value": 5
    }
  ]
}

Example Response:

{
  "id": 123,
  "status": "updated",
  "message": "Review updated successfully."
}

DELETE /reviews/{id}

Delete a review permanently.

Permissions: Review author or administrator.

Example Response:

{
  "id": 123,
  "status": "deleted",
  "message": "Review deleted successfully."
}

GET /members/{id}/reviews

Get all reviews for a specific member.

Parameters:

ParameterTypeDefaultDescription
idintegerMember ID (required)
pageinteger1Page number
per_pageinteger10Reviews per page
statusstringapprovedFilter by status

Example Response:

{
  "member_id": 5,
  "member_name": "John Doe",
  "reviews": [
    {
      "id": 123,
      "rating": 4.5,
      "title": "Excellent collaboration",
      "author_name": "Jane Smith",
      "date_created": "2024-01-15T10:30:00"
    }
  ],
  "pagination": {
    "total": 12,
    "pages": 3,
    "page": 1,
    "per_page": 5
  }
}

GET /members/{id}/rating

Get aggregate rating statistics for a member.

Example Response:

{
  "member_id": 5,
  "member_name": "John Doe",
  "aggregate_rating": 4.3,
  "total_reviews": 12,
  "verified_reviews": 8,
  "rating_distribution": {
    "5": 6,
    "4": 4,
    "3": 1,
    "2": 1,
    "1": 0
  },
  "criteria_averages": [
    {
      "label": "Communication",
      "average": 4.5
    },
    {
      "label": "Quality",
      "average": 4.2
    }
  ]
}

POST /reviews/{id}/verify

Verify a review (admin only).

Permissions: Administrator or moderator.

Example Response:

{
  "id": 123,
  "is_verified": true,
  "verification_type": "admin",
  "message": "Review verified successfully."
}

POST /reviews/{id}/approve

Approve a pending review (admin only).

Permissions: Administrator or moderator.

Example Response:

{
  "id": 123,
  "status": "approved",
  "message": "Review approved successfully."
}

POST /reviews/{id}/feature

Feature or unfeature a review (admin only).

Permissions: Administrator.

Example Response:

{
  "id": 123,
  "is_featured": true,
  "message": "Review featured successfully."
}

Response Format

All responses follow a consistent JSON structure:

Success Response:

{
  "data": {},
  "status": "success"
}

Error Response:

{
  "code": "error_code",
  "message": "Human-readable error message",
  "status": 400
}

Error Handling

Common error codes:

CodeStatusDescription
rest_forbidden401Authentication required
rest_forbidden_context403Insufficient permissions
rest_invalid_param400Invalid request parameter
bupr_review_not_found404Review ID does not exist
bupr_member_not_found404Member ID does not exist
bupr_cannot_review403User cannot review this member
bupr_already_reviewed409User already reviewed this member
bupr_invalid_rating400Rating outside 1-5 range

Example Error Response:

{
  "code": "bupr_already_reviewed",
  "message": "You have already reviewed this member.",
  "data": {
    "status": 409,
    "existing_review_id": 123
  }
}

Rate Limiting

Default rate limits apply:

  • Authenticated users: 1000 requests/hour
  • Unauthenticated users: 100 requests/hour

Rate limit headers included in responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1642516800

Use Cases

Mobile App

Build native iOS/Android apps with review functionality:

  • Display member profiles with ratings
  • Submit new reviews from mobile
  • Push notifications for review approvals
  • Offline support with API caching

External Dashboard

Create custom analytics dashboards:

  • Aggregate rating trends over time
  • Export review data to CSV/Excel
  • Generate PDF reports
  • Integration with BI tools

Headless WordPress

Build decoupled frontends using React/Vue/Next.js:

  • Fetch reviews via API
  • Client-side filtering and sorting
  • Real-time updates via webhooks
  • Progressive web app support

Third-Party Integrations

Connect reviews to external platforms:

  • Sync reviews to CRM systems
  • Post reviews to social media
  • Email digest automation
  • Zapier/Make.com workflows

Technical Details

  • Implements WordPress REST API standards
  • Supports JSON and form-encoded requests
  • CORS enabled for cross-origin requests
  • Schema validation for all inputs
  • Respects WordPress privacy settings

Support

Need help with the REST API?

Last updated: February 13, 2026