Contents
On this page

List Approved Testimonials - Plugixa Testimonial

GET /plugixatestimonial/v1/frontend/testimonials

Read approved testimonials, one page at a time, as a headless front end would.

Public: no authentication. Only approved testimonials, and only display fields: no status, author ids, view counts or submitter e-mail.

Note. Every call adds one to view_count of the testimonials it returns (at most once a minute for the same set, on sites with a persistent object cache). Results are cached, and the cache is cleared by any write to this API.

limit caps the total, not the pages. With a saved shortcode whose limit is 10 and per_page=8, total is 10 and total_pages 2, but page 2 still returns up to 8 rows: rows 9 to 16.

Request

GET https://your-site.example/wp-json/plugixatestimonial/v1/frontend/testimonials?shortcode_id=7&per_page=8

Query parameters

Name Type Default Description
shortcode_id integer 0 A saved shortcode whose categories, featured_only, min_rating, order and limit apply. 0 for all approved testimonials in manual order.
page integer 1 Page to return, from 1.
per_page integer 8 Rows per page, 1 to 100.

With WPML or Polylang active, rows are those of the visitor’s current language, plus default-language rows that have no translation unless the multilingual fallback is set to hide them.

Responses

200 OK. data.items is one page of approved testimonials.

{
  "success": true,
  "message": "",
  "data": {
    "items": [
      {
        "id": "42",
        "language_code": null,
        "client_name": "Sarah Johnson",
        "client_role": "Marketing Director",
        "client_company": "Northwind Studio",
        "testimonial_text": "<p>Setup took ten minutes and our reviews finally look professional.</p>",
        "rating": "5",
        "client_photo_id": "118",
        "video_url": null,
        "website_url": "https://northwind.example",
        "is_featured": "1",
        "display_order": "0",
        "created_at": "2026-11-12 09:30:00",
        "client_photo_url": "https://your-site.example/wp-content/uploads/2026/11/sarah-150x150.jpg",
        "custom_fields": {
          "project_type": "Website redesign"
        }
      }
    ],
    "total": 1,
    "total_pages": 1,
    "current_page": 1
  }
}
Field Type Meaning
data.items[].id string The testimonial’s id
data.items[].rating string 1 to 5
data.items[].is_featured string 1 or 0
data.items[].client_photo_url string Thumbnail URL, empty without a photo
data.items[].custom_fields object Values of published custom fields shown on the front end only
data.total integer Matching testimonials, capped at the shortcode’s limit
data.total_pages integer Pages at this per_page
data.current_page integer The page returned

Errors

Status Code When
400 rest_invalid_param per_page above 100, or page below 1.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixatestimonial/v1/frontend/testimonials?shortcode_id=7&per_page=8"
<?php
$query = http_build_query([
    'shortcode_id' => '7',
    'per_page'     => '8',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixatestimonial/v1/frontend/testimonials?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const query = new URLSearchParams({ shortcode_id: '7', per_page: '8' });
const response = await fetch(`https://your-site.example/wp-json/plugixatestimonial/v1/frontend/testimonials?${query}`);
const { data } = await response.json();

Quick Links

Share