Contents
On this page
List Categories - Plugixa Testimonial
GET /plugixatestimonial/v1/categories
List categories one page at a time, each with the number of testimonials in it.
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/categories?orderby=display_order&order=ASC
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
search |
string |
Text found in the name or the description. Same as filter[search]. |
|
status |
string |
publish, draft or trash. Without it, every category except trash is listed. |
Plus the list parameters every paged list accepts. orderby accepts id, name, slug, display_order and created_at; anything else falls back to display_order.
Responses
200 OK. data.items is one page of categories.
{
"success": true,
"message": "",
"data": {
"items": [
{
"id": "3",
"language_code": null,
"translation_group": null,
"name": "Agencies",
"slug": "agencies",
"description": "Feedback from agency clients.",
"display_order": "0",
"created_at": "2026-11-12 09:30:00",
"status": "publish",
"testimonial_count": "12"
}
],
"total": 1,
"state": {
"filter": {},
"limit": 20,
"offset": 0,
"orderby": "display_order",
"order": "ASC"
}
}
}
| Field | Type | Meaning |
|---|---|---|
data.items[].id |
string |
The category’s id |
data.items[].name |
string |
The name |
data.items[].slug |
string |
Unique across categories |
data.items[].description |
string|null |
Plain text |
data.items[].display_order |
string |
Position in the manual order |
data.items[].status |
string |
publish, draft or trash |
data.items[].created_at |
string|null |
Site-time datetime |
data.items[].testimonial_count |
string |
Testimonials linked to it, in any status |
data.total |
integer |
Categories matching the filters, before paging |
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/categories?orderby=display_order&order=ASC" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'orderby' => 'display_order',
'order' => 'ASC',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixatestimonial/v1/categories?' . $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({ orderby: 'display_order', order: 'ASC' });
const response = await fetch(`https://your-site.example/wp-json/plugixatestimonial/v1/categories?${query}`, {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share