Contents
On this page

List Categories - Plugixa Recipe

GET /plugixa-recipe/v1/categories

List categories with the number of recipes linked to each.

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?orderby=name&order=ASC

Query parameters

Name Type Default Description
search string Matches the name or the description.
filter[language_code] string Only categories in this language.

Plus the list parameters every list accepts. orderby accepts name, created_at (the default) and display_order; anything else sorts by display_order.

Responses

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

{
  "success": true,
  "message": "",
  "data": {
    "items": [
      {
        "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
      }
    ],
    "total": 1,
    "limit": 20,
    "offset": 0
  }
}
Field Type Meaning
data.items[] object A category, as in Get Category
data.items[].recipe_count integer Recipes linked to it, in any status
data.total integer Categories matching the search, before paging

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-recipe/v1/categories?orderby=name&order=ASC" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'orderby' => 'name',
    'order'   => 'ASC',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-recipe/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 auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const query = new URLSearchParams({ orderby: 'name', order: 'ASC' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-recipe/v1/categories?${query}`, {
  headers: {
    'Authorization': auth,
  },
});
const { data } = await response.json();

Quick Links

Share