Categories: Endpoint
Categories
Manage product categories with hierarchy support.
Overview
| Operation | Method | Endpoint | Scope |
|---|---|---|---|
| Export | GET | /xpanel/xoport/export/json/categories | categories:read |
| Import | POST | /xpanel/xoport/import/json/categories | categories:write |
| Update | PUT | /xpanel/xoport/import/json/categories | categories:write |
| Delete | DELETE | /xpanel/xoport/delete/json/categories/{id} | categories:delete |
Export (GET)
Query Parameters
| Parameter | Type | Description |
|---|---|---|
/categories/{id} | Path | Single 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_id | int | Only subcategories of this ID |
seo_string | Text | NEW v2.122.11 Category under a shop URL, exact match on the full path |
recursive | 0/1 | Only with parent_id: 1 returns the entire subtree instead of just the direct children. Default 0; no effect without parent_id |
status | int | Only categories with this status: 1 active, 0 inactive. Without the parameter, all categories |
language | Language | In 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 |
limit | int | Max. 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 |
offset | int | Start 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 IDparent_id- Parent category (0 = root)status- Active (1) or inactive (0)sort_order- Sort orderrestricted_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 wellcategories_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 importdate_added,last_modified,tagcloud,lft,rgt,path- read-onlylanguages{}- Per language:categories_name,categories_heading,categories_short_description,categories_description,title_tag,desc_tag,keywords_tag,seo_name,seo_text, pluscategories_id,language_id, andlanguage_code; read-onlyseo_string(URL of the category) andcpath
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.
| Endpoint | Description | Example |
|---|---|---|
GET /categories/productlist | All categories with products | Complete mapping |
GET /categories/productlist?categories_id={id} | Single category | ?categories_id=73 |
GET /categories/productlist?status=1 | Active categories only | Without the parameter: all |
GET /categories/productlist?include_inactive_products=1 | Inactive products as well | Default: active only |
GET /categories/productlist?language=de | Language filter | Category 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}/productlist | Exactly this category v2.122.13 | /categories/73/productlist |
GET /categories/{von}:{bis}/productlist | Categories in the ID range v2.122.13 | /categories/70:80/productlist |
GET /categories/{von}:/productlist | Categories from this ID onward v2.122.13 | /categories/70:/productlist |
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.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 400FILTER_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=5returns category 5 as before. An empty?categories_id=does not count. - ⚠️ Breaking change compared with v2.122.12:
/categories/5/productlist?categories_id=7and/categories/5:10/productlist?categories_id=5previously 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.
categories:read.