Categories: Endpoint
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 | categories:delete |
Export (GET)
Query Parameters
| Parameter | Type | Description |
|---|---|---|
categories_id | int | Export a single category |
parent_id | int | Only subcategories of this ID |
limit | int | Max. number (Default: 100) |
offset | int | Start position |
Response fields
categories_id- Unique IDparent_id- Parent category (0 = root)categories_status- Active (1) or inactive (0)sort_order- Sort orderlanguages{}- Per language: name, heading, short_description, description, title_tag, desc_tag
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?categories_id=99" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Warning: This also deletes all subcategories and removes product assignments!
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 | Default filter |
GET /categories/productlist?include_inactive_products=1 | Inactive products as well | Default: active only |
GET /categories/productlist?language=de | Language filter | Category name in language |
Response format
{
"type": "categories_productlist",
"api_version": "2.12.0",
"pagination": { "total": 42, "limit": 50, "offset": 0 },
"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" }
]
}
]
}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.