Contents
Get Category - Plugixa Testimonial
GET /plugixatestimonial/v1/categories/{id}
Read one category, in any status, with its testimonial count.
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/3
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The category’s id |
Responses
200 OK. data is the category.
{
"success": true,
"message": "",
"data": {
"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"
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
string |
The category’s id |
data.name |
string |
The name |
data.slug |
string |
Unique across categories |
data.description |
string|null |
Plain text |
data.display_order |
string |
Position in the manual order |
data.status |
string |
publish, draft or trash |
data.created_at |
string|null |
Site-time datetime |
data.testimonial_count |
string |
Testimonials linked to it, in any status |
With WPML or Polylang active, data.translations lists { id, language_code } for every row in its translation group.
Errors
| Status | Code | When |
|---|---|---|
404 |
rest_error |
No category with that id. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixatestimonial/v1/categories/3" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixatestimonial/v1/categories/3');
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 response = await fetch('https://your-site.example/wp-json/plugixatestimonial/v1/categories/3', {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share