Contents
On this page

Export Testimonials as JSON - Plugixa Testimonial

GET /plugixatestimonial/v1/import-export/export/json

Download testimonials as a JSON file, with categories and custom field values nested.

Administrators only: the user needs WordPress’s manage_options capability. No plugin capability opens this route.

Note. In 1.1.1 lang is always empty and translation_group is not the real group: it is the stored group id forced to a number, usually 0. Do not rely on either to rebuild translations.

Request

GET https://your-site.example/wp-json/plugixatestimonial/v1/import-export/export/json?status=approved

Query parameters

Name Type Default Description
ids[] integer[] Export exactly these testimonials. When sent, every filter is ignored.
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.
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.

With no parameter, every testimonial in every status and language is exported, newest first. There is no paging. See Import and export.

Responses

200 OK. The body is the JSON file.

{
  "version": "1.0",
  "exported_at": "2026-11-12T09:30:00Z",
  "plugin": "plugixa-testimonial",
  "count": 1,
  "testimonials": [
    {
      "id": 42,
      "lang": "",
      "translation_group": 0,
      "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,
      "video_url": "",
      "website_url": "https://northwind.example",
      "status": "approved",
      "is_featured": true,
      "source": "manual",
      "categories": [
        {
          "id": 3,
          "name": "Agencies",
          "slug": "agencies"
        }
      ],
      "custom_fields": {
        "project_type": "Website redesign"
      },
      "created_at": "2026-11-12 09:30:00"
    }
  ]
}
Field Type Meaning
exported_at string UTC, ISO 8601
count integer Testimonials in the file
testimonials[].rating integer 1 to 5
testimonials[].is_featured boolean Featured or not
testimonials[].categories object[] { id, name, slug }
testimonials[].created_at string Site-time datetime

The response is the file itself, not the JSON envelope, sent as an attachment named testimonials-export-YYYY-MM-DD.json (UTC date) with caching turned off. The file is what Upload Import File reads back.

Errors

Status Code When
404 rest_error “No testimonials to export”: nothing matched.

Plus the errors every endpoint can return.

Examples

curl -sg "https://your-site.example/wp-json/plugixatestimonial/v1/import-export/export/json?status=approved" \
  -u "admin:$WP_APP_PASSWORD" \
  -o testimonials.json
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixatestimonial/v1/import-export/export/json?status=approved');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
file_put_contents('testimonials.json', curl_exec($ch));
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixatestimonial/v1/import-export/export/json?status=approved', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const file = await response.blob();

Quick Links

Share