Contents
On this page

List Testimonials - Plugixa Testimonial

GET /plugixatestimonial/v1/testimonials

List testimonials one page at a time, in any status, with filters for status, category, rating, featured, dates and author.

Any signed-in user with the plugixa_testimonial_edit capability or WordPress’s edit_posts (Contributors and up, by default).

Request

GET https://your-site.example/wp-json/plugixatestimonial/v1/testimonials?status=approved&orderby=rating&order=DESC

Query parameters

Name Type Default Description
search string Text found in the name, the testimonial or the company. Same as filter[search].
status string pending, approved, rejected or draft. Same as filter[status]; send filter[status][] several times for more than one.
filter[categories][] integer[] Testimonials in any of these categories. Send 0 (or uncategorized) for testimonials with no category.
filter[rating_min] integer At least this many stars.
filter[rating_max] integer At most this many stars.
filter[is_featured] integer 1 for featured only, 0 for the rest.
filter[date_from] string Created on or after this day, YYYY-MM-DD.
filter[date_to] string Created on or before this day, YYYY-MM-DD.
filter[author] integer Created by this WordPress user id.

Plus the list parameters every paged list accepts. orderby accepts id, client_name, status, rating, display_order, view_count, is_featured, created_at and modified_at; anything else falls back to created_at. With orderby=display_order and exactly one category in filter[categories][], the order is that category’s own manual order. The top-level category_id parameter is accepted but has no effect here: use filter[categories][].

Responses

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

{
  "success": true,
  "message": "",
  "data": {
    "items": [
      {
        "id": "42",
        "language_code": null,
        "translation_group": 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",
        "status": "approved",
        "is_featured": "1",
        "display_order": "0",
        "source": "manual",
        "external_id": null,
        "view_count": "214",
        "created_at": "2026-11-12 09:30:00",
        "created_by": "1",
        "modified_at": "2026-11-12 10:15:00",
        "modified_by": "1",
        "approved_at": "2026-11-12 09:30:00",
        "approved_by": "1",
        "categories": [
          {
            "id": 3,
            "name": "Agencies",
            "slug": "agencies"
          }
        ],
        "client_photo": {
          "id": 118,
          "url": "https://your-site.example/wp-content/uploads/2026/11/sarah.jpg",
          "thumbnail": "https://your-site.example/wp-content/uploads/2026/11/sarah-150x150.jpg",
          "alt": "",
          "title": "sarah"
        },
        "custom_fields": {
          "project_type": "Website redesign"
        }
      }
    ],
    "total": 1,
    "state": {
      "filter": {
        "status": "approved"
      },
      "limit": 20,
      "offset": 0,
      "orderby": "rating",
      "order": "DESC"
    }
  }
}
Field Type Meaning
data.items[].id string The testimonial’s id
data.items[].client_name string Who gave the testimonial
data.items[].testimonial_text string The testimonial, HTML
data.items[].rating string 1 to 5
data.items[].status string pending, approved, rejected or draft. Only approved is shown on the site
data.items[].is_featured string 1 or 0
data.items[].display_order string Position in the global manual order
data.items[].source string Where it came from: manual, frontend_form, import, or a review source in Pro
data.items[].view_count string Times it was returned by the public list endpoint
data.items[].created_at string Site-time datetime
data.items[].approved_at string|null When it was last approved
data.items[].categories object[] { id, name, slug } for each category, by name
data.items[].client_photo object|null { id, url, thumbnail, alt, title } of the photo, null without one
data.items[].custom_fields object Stored values keyed by field key, {} when there are none
data.total integer Testimonials matching the filters, before paging
data.state object The filters, paging and sorting that were applied

With WPML or Polylang active, each row also has translations: { id, language_code } for every row in its translation group.

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixatestimonial/v1/testimonials?status=approved&orderby=rating&order=DESC" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'status'  => 'approved',
    'orderby' => 'rating',
    'order'   => 'DESC',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixatestimonial/v1/testimonials?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const query = new URLSearchParams({ status: 'approved', orderby: 'rating', order: 'DESC' });
const response = await fetch(`https://your-site.example/wp-json/plugixatestimonial/v1/testimonials?${query}`, {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share