Contents
On this page

Get Category - Plugixa Recipe

GET /plugixa-recipe/v1/categories/{id}

Read one category with its recipe count.

Needs a signed-in user who can open Plugixa Recipe: the plugixa_recipe_manage capability, or WordPress’s edit_posts (Contributor and up).

Request

GET https://your-site.example/wp-json/plugixa-recipe/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": "",
    "translation_group": "",
    "name": "Breakfast",
    "slug": "breakfast",
    "description": "Morning dishes.",
    "image_id": null,
    "display_order": "0",
    "created_at": "2026-11-01 08:00:00",
    "recipe_count": 6
  }
}
Field Type Meaning
data.id string The category’s id
data.slug string Unique among categories
data.description string|null Plain text
data.image_id string|null Attachment id. image_url is added when set
data.display_order string Manual position
data.recipe_count integer Recipes linked to it, in any status
data.language_code, data.translation_group string|null For multilingual sites

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/plugixa-recipe/v1/categories/3" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-recipe/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 auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-recipe/v1/categories/3', {
  headers: {
    'Authorization': auth,
  },
});
const { data } = await response.json();

Quick Links

Share