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/categoriescategories:delete

Export (GET)

Query Parameters

ParameterTypeDescription
categories_idintExport a single category
parent_idintOnly subcategories of this ID
limitintMax. number (Default: 100)
offsetintStart position

Response fields

  • categories_id - Unique ID
  • parent_id - Parent category (0 = root)
  • categories_status - Active (1) or inactive (0)
  • sort_order - Sort order
  • languages{} - 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.

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 OnlyDefault filter
GET /categories/productlist?include_inactive_products=1Inactive products as wellDefault: active only
GET /categories/productlist?language=deLanguage filterCategory 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.