News Endpoint

Endpoint

News

Manage Newsdesk articles, categories, and authors.


Overview

News Articles (Newsdesk)

OperationMethodEndpointScope
ExportGET/xpanel/xoport/export/json/newsdesknews:read
ImportPOST/xpanel/xoport/import/json/newsdesknews:write
UpdatePUT/xpanel/xoport/import/json/newsdesknews:write
DeleteDELETE/xpanel/xoport/delete/json/newsdesknews:delete

News Categories (newsdesk_categories)

OperationMethodEndpointScope
ExportGET/xpanel/xoport/export/json/newsdesk_categoriesnews:read
ImportPOST/xpanel/xoport/import/json/newsdesk_categoriesnews:write
DeleteDELETE/xpanel/xoport/delete/json/newsdesk_categoriesnews:delete

Authors (newsdesk_authors)

OperationMethodEndpointScope
Export (all)GET/xpanel/xoport/export/json/newsdesk_authorsnews:read
Export (single)GET/xpanel/xoport/export/json/newsdesk_author/{id}news:read

Export News Articles

Routes

RouteResult
/export/json/newsdesksAll Articles
/export/json/newsdesk/{id}Exactly one article
/export/json/newsdesks/{id}All articles starting with this ID

Query parameters

ParameterTypeDescription
limitintMaximum number of records
offsetintStart position

There is no server-side restriction on a news category—use the categories_ids field in the response for this.


Field list

Fields per article

FieldTypeDescription
newsdesk_idintArticle ID — required field for PUT requests
newsdesk_statusint1 = published, 0 = inactive
newsdesk_date_availabledatetimePublished from (Y-m-d H:i:s)
newsdesk_date_addeddatetimeCreation date
newsdesk_last_modifieddatetimeLast Modified — Export Only
newsdesk_stickyint1 = pinned to the top
sort_orderintSort order
newsdesk_imagestringArticle image (file name)
newsdesk_authorstringAuthor as free text
author_idintAuthor from the author management system (0 = none)
categories_idsint[]News categories, e.g., [2, 5] — Multiple assignments allowed
languages{}objectLanguage block, key = language code (de, en …)

Since v2.121.0: When creating (POST), the import adds every active language for which no separate block was submitted from the master language (the " de" block, or otherwise the first block submitted). If DeepL translation is set up, it will translate these languages during the next run.

Fields per Language (in the " languages" block)

FieldTypeDescription
newsdesk_article_namestringTitle
newsdesk_article_shorttexthtmlTeaser / Short Text
newsdesk_article_descriptionhtmlArticle Text
newsdesk_image_textstringImage Caption / Alternative Text
newsdesk_article_urlstringExternal link (optional)
newsdesk_article_url_namestringLabel for the external link
seo_namestringURL slug — generated from the title if empty
title_tagstringMeta Title
desc_tagstringMeta description
keywords_tagstringMeta Keywords
newsdesk_article_viewedintView Count — Export Only

Import (POST) and Update (PUT)

curl -X POST "https://shop.de/xpanel/xoport/import/json/newsdesk" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "newsdesk",
    "data": [{
      "newsdesk_status": 1,
      "newsdesk_sticky": 0,
      "sort_order": 0,
      "newsdesk_date_available": "2026-08-12 08:00:00",
      "author_id": 0,
      "categories_ids": [2],
      "languages": {
        "de": {
          "newsdesk_article_name": "Neue Produktlinie",
          "newsdesk_article_shorttext": "

Kurz angerissen …

", "newsdesk_article_description": "

Wir erweitern …

", "title_tag": "Neue Produktlinie | Shop", "desc_tag": "Wir erweitern unser Sortiment." }, "en": { "newsdesk_article_name": "New product line" } } }] }'

To update, send the same structure via PUT and include the newsdesk_id. Only the fields that are sent will be updated—fields not sent remain unchanged.


Notes

  • categories_ids is a full replacement: If the field is sent, all of the article’s previous category assignments are replaced. If it is omitted, they remain unchanged.
  • The category assignment is called categories_ids (array). A newsdesk_categories_id is ignored as an unknown field—the article would be created without a category.
  • If `seo_name` is missing, the slug is automatically generated from ` newsdesk_article_name ` (using `strip_seo()`).
  • If `seo_name` changes during an update, the import automatically sets up a 301 redirect from the old URL (SEO history).
  • After the import, the news cache is cleared, and the DeepL translations of the modified articles are marked for re-translation.
  • Export-only fields (ignored during import): newsdesk_last_modified, newsdesk_article_viewed.