Categories: Endpoint

Endpoint

Categories

Manage product categories with hierarchy support.


Overview

OperationMethodEndpointScope
ExportGET/xpanel/xoport/export/json/categoriescategories:read
ImportPOST/xpanel/xoport/import/json/categoriescategories:write
UpdatePUT/xpanel/xoport/import/json/categoriescategories:write
DeleteDELETE/xpanel/xoport/delete/json/categories/{id}categories:delete

Export (GET)

Query Parameters

ParameterTypeDescription
/categories/{id}PathSingle category: the category itself, as a path segment, not as a query parameter (its children via parent_id). v2.122.12 The segment is an integer; any other segment (/categories/5x, /categories/5.0) results in HTTP 400 INVALID_RANGE
parent_idintOnly subcategories of this ID
seo_stringTextNEW v2.122.11 Category under a shop URL, exact match on the full path
recursive0/1Only with parent_id: 1 returns the entire subtree instead of just the direct children. Default 0; no effect without parent_id
statusintOnly categories with this status: 1 active, 0 inactive. Without the parameter, all categories
languageLanguageIn languages{}, only this language, as a code (de) or ID. Without the parameter, all languages. Since v2.122.10 A language the shop does not have returns HTTP 400 INVALID_FILTER_VALUE
limitintMax. number per page (at most 250). Without limit, up to 250 categories are returned unpaginated; if there are more, the first 50 plus stats.has_more
offsetintStart position; only takes effect with limit or with more than 250 matches

v2.122.12 Leading or trailing whitespace does not count; an empty value means “not set”: ?parent_id=5%00 returns the children of 5 (up to v2.122.11 the filter was dropped and the whole tree came back), likewise on status and recursive; ?language=%20 returns all languages (previously an empty list).

NEW v2.122.11 Shop URL → category: ?seo_string= matches exactly the full path as the shop delivers it, without the host and without the language segment lng/xx/ (use ?language=xx for that; without the parameter, it searches all languages); leading and trailing slashes do not matter. With multiple matches, all are returned; if two categories share a URL, the shop picks one without a fixed order, and the first match is not necessarily the page it delivers. The filter also works with parent_id and status; on /categories/{id} it returns HTTP 400 FILTER_NOT_APPLICABLE. Up to v2.122.10, the name was ignored as UNKNOWN_FILTER and the whole tree was returned.

# Category for https://shop.de/lng/en/fishing-rods/spinning-rods/
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  "https://shop.de/xpanel/xoport/export/json/categories?seo_string=fishing-rods/spinning-rods&language=en"

Rules and error cases: Export API; step by step from URL to ID: SEO History.

Response fields

  • categories_id - Unique ID
  • parent_id - Parent category (0 = root)
  • status - Active (1) or inactive (0)
  • sort_order - Sort order
  • restricted_customer_groups - IDs of customer groups that cannot view the category; [] if no group is restricted. Present on every category (since v2.47.0). If the import restricts a parent category, it also restricts its active subcategories for that group; they then appear here as well
  • categories_image, header_category, header_nav_template, template, sitemap, shop_ids, hide_subcategory_tiles, hide_page_title, show_last_modified, redirect_type, redirect_url, subs_block, tree_block - Category settings, under the same names in the import
  • date_added, last_modified, tagcloud, lft, rgt, path - read-only
  • languages{} - Per language: categories_name, categories_heading, categories_short_description, categories_description, title_tag, desc_tag, keywords_tag, seo_name, seo_text, plus categories_id, language_id, and language_code; read-only seo_string (URL of the category) and cpath

The category columns are returned as the shop has them; a column that an older installation does not have yet is missing from the response.


Import (POST/PUT)

Example Request

curl -X POST "https://shop.de/xpanel/xoport/import/json/categories" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "categories",
    "data": [{
      "parent_id": 0,
      "status": 1,
      "sort_order": 10,
      "languages": {
        "de": {
          "categories_name": "Neue Kategorie",
          "categories_heading": "Neue Kategorie Überschrift"
        }
      }
    }]
  }'

Delete (DELETE)

curl -X DELETE "https://shop.de/xpanel/xoport/delete/json/categories/99" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Warning: Only an empty category is deleted. If it has subcategories or products, the shop responds with HTTP 409 (HAS_SUBCATEGORIES or HAS_PRODUCTS) and deletes nothing. The ID goes in the path; without it, for example with ?categories_id=, the response is HTTP 400 MISSING_ID.


Categories Product List NEW v2.12.0

Lightweight endpoint for category→product mapping. Ideal for synchronization tools that only need to know which products are in which categories.

EndpointDescriptionExample
GET /categories/productlistAll categories with productsComplete mapping
GET /categories/productlist?categories_id={id}Single category?categories_id=73
GET /categories/productlist?status=1Active categories onlyWithout the parameter: all
GET /categories/productlist?include_inactive_products=1Inactive products as wellDefault: active only
GET /categories/productlist?language=deLanguage filterCategory name in the language; without the parameter (since v2.122.12 also empty or whitespace only) in the language with the lowest languages_id, usually 1 = English, regardless of the shop’s default language. v2.122.13 Up to v2.122.12, the first row of the language table applied, not necessarily the lowest ID.
GET /categories/{id}/productlistExactly this category v2.122.13/categories/73/productlist
GET /categories/{von}:{bis}/productlistCategories in the ID range v2.122.13/categories/70:80/productlist
GET /categories/{von}:/productlistCategories from this ID onward v2.122.13/categories/70:/productlist
Changed in v2.122.12: The subroute is named exactly productlist. /categories/Productlist, /categories/5/Productlist, and further segments after it result in HTTP 400 INVALID_RANGE. Up to v2.122.11, /categories/5/Productlist silently returned category 5 instead of the product list.
Changed in v2.122.13: The ID or range before productlist is the category filter; ?status=, ?include_inactive_products= and ?language= still apply. Up to v2.122.12, /categories/{id}/productlist, /categories/{von}:{bis}/productlist and /categories/{von}:/productlist ignored the value in the path and returned the product lists of all categories under HTTP 200, for a single ID and for the open range also with the warning RANGE_START_NOT_SINGLE_RECORD.
  • ⚠️ ?categories_id= together with an ID or range in the path results in HTTP 400 FILTER_NOT_APPLICABLE, because the category would be specified twice. Only the same value as the single path ID remains allowed: /categories/5/productlist?categories_id=5 returns category 5 as before. An empty ?categories_id= does not count.
  • ⚠️ Breaking change compared with v2.122.12: /categories/5/productlist?categories_id=7 and /categories/5:10/productlist?categories_id=5 previously returned the category of the parameter, now HTTP 400. Send the category in the path or as a parameter, both together only with the same single ID. In shops before 4.9.174, only the parameter takes effect.
  • Message: Filter(s) categories_id apply to the /categories/productlist list only, not to /categories/{id}/productlist or an id range. Drop the id from the path to use them.

Response format

{
  "success": true,
  "api_version": "2.122.12",
  "type": "categories_productlist",
  "data": [
    {
      "categories_id": 73,
      "categories_name": "Drucker",
      "products_count": 3,
      "products": [
        { "id": 101, "model": "HP-LJ-4050" },
        { "id": 102, "model": "EP-WF-7840" },
        { "id": 103, "model": "BR-HL-L6400" }
      ]
    }
  ],
  "stats": {
    "total": 1,
    "count": 1,
    "timestamp": "2026-10-18 14:00:00"
  }
}

Pagination works as in the category list: without limit, up to 250 categories unpaginated; with more, the first 50 and stats.has_more; with limit and offset as usual.

Tip: The Productlist endpoint is memory-efficient—a single SQL query without loading relations. Perfect for large catalogs with 10,000+ products. Scope: categories:read.