Article Import API


Einführung

Die PressMatrix Article Import API ermöglicht Publishern, artikelbasierte Inhalte für eine Publikation zu erstellen, zu aktualisieren, aufzulisten, abzurufen, zu löschen und zu veröffentlichen. Die technische Endpoint-Ressource heißt stories, und Requests sowie Responses verwenden den story-Envelope.

Die Basis-URL lautet:

https://editor.pressmatrix.com/api/v2/importer

OpenAPI-Spezifikation

OpenAPI YAML herunterladen

Die Spezifikation kann im Swagger Editor geöffnet werden.


Authentifizierung

Alle Endpunkte benötigen tokenbasierte Authentifizierung über den Authorization-Header.

Authorization-Header

Authorization: Token {TOKEN_GENERATED_BY_PMX}

Übersicht

Die API stellt diese Endpunkte bereit:

  • GET /organizations/{organization_id}/publications/{publication_id}/stories
  • POST /organizations/{organization_id}/publications/{publication_id}/stories
  • GET /organizations/{organization_id}/publications/{publication_id}/stories/{story_id}
  • PUT /organizations/{organization_id}/publications/{publication_id}/stories/{story_id}
  • PATCH /organizations/{organization_id}/publications/{publication_id}/stories/{story_id}
  • DELETE /organizations/{organization_id}/publications/{publication_id}/stories/{story_id}
  • POST /organizations/{organization_id}/publications/{publication_id}/stories/{story_id}/publish
  • Name
    organization_id
    Type
    integer
    Description

    PressMatrix-Organization-ID.

  • Name
    publication_id
    Type
    integer
    Description

    PressMatrix-Publication-ID.

  • Name
    story_id
    Type
    integer
    Description

    Artikel-ID in der technischen stories-Ressource.

  • Name
    page
    Type
    integer
    Description

    Optionale Seitennummer für paginierte Listen-Endpunkte.

  • Name
    per
    Type
    integer
    Description

    Optionale Anzahl von Einträgen pro Seite.


Artikelfelder

  • Name
    name
    Type
    string
    Description

    Interner Artikelname. Beim Erstellen erforderlich.

  • Name
    title
    Type
    string
    Description

    Artikeltitel, der Lesern angezeigt wird.

  • Name
    preview
    Type
    string
    Description

    Kurze Artikelzusammenfassung.

  • Name
    content
    Type
    string
    Description

    Artikelinhalt in Markdown.

  • Name
    external_id
    Type
    string
    Description

    Kundenseitiger Identifier. Listenfilter verwenden Teiltreffer.

  • Name
    released_at
    Type
    string
    Description

    Datum und Uhrzeit nach ISO 8601, ab denen der Artikel sichtbar ist.

  • Name
    language
    Type
    string
    Description

    Zweistelliger Sprachcode, zum Beispiel de.

  • Name
    cents
    Type
    integer
    Description

    Preis in der kleinsten Währungseinheit.

  • Name
    currency
    Type
    string
    Description

    Währungscode nach ISO 4217, zum Beispiel EUR.

  • Name
    image
    Type
    file
    Description

    Optionaler Bild-Upload über multipart/form-data. Unterstützte MIME-Typen sind JPEG, PNG und GIF. Die maximale Dateigröße beträgt 5 MB.


POST/organizations/{organization_id}/publications/{publication_id}/stories

Artikel erstellen

Erstellt einen neuen Artikel. JSON eignet sich für reine Metadaten-Artikel, multipart/form-data für Requests mit Bild-Upload.

JSON-Anfrage

curl --location 'https://editor.pressmatrix.com/api/v2/importer/organizations/{organization_id}/publications/{publication_id}/stories' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Token {TOKEN_GENERATED_BY_PMX}' \
  --data '{
    "story": {
      "name": "Example Article",
      "title": "Example Article",
      "preview": "Short article summary.",
      "content": "# Example Article\n\nArticle body in Markdown.",
      "external_id": "article-001",
      "released_at": "2026-07-10T12:00:00Z",
      "cents": 199,
      "currency": "EUR",
      "language": "de",
      "subscription_required": false,
      "purchase_required": false
    }
  }'

Multipart-Anfrage

curl --location 'https://editor.pressmatrix.com/api/v2/importer/organizations/{organization_id}/publications/{publication_id}/stories' \
  --header 'Accept: application/json' \
  --header 'Authorization: Token {TOKEN_GENERATED_BY_PMX}' \
  --form 'story[name]="Example Article"' \
  --form 'story[title]="Example Article"' \
  --form 'story[released_at]="2026-07-10T12:00:00Z"' \
  --form 'story[cents]="199"' \
  --form 'story[currency]="EUR"' \
  --form 'story[language]="de"' \
  --form 'story[image]=@article-image.png'

GET/organizations/{organization_id}/publications/{publication_id}/stories

Artikel auflisten

Gibt eine paginierte Liste der Artikel einer Publikation zurück.

  • Name
    from
    Type
    string
    Description

    Gibt Artikel zurück, die ab diesem ISO-8601-Zeitpunkt erstellt wurden.

  • Name
    to
    Type
    string
    Description

    Gibt Artikel zurück, die bis zu diesem ISO-8601-Zeitpunkt erstellt wurden.

  • Name
    external_id
    Type
    string
    Description

    Filtert nach einem einzelnen External-ID-Wert oder einer kommagetrennten Liste von Werten. Jeder Wert wird als Teiltreffer gesucht.

  • Name
    search
    Type
    string
    Description

    Sucht in Titel, Inhalt und Product-Identifiern.

Anfrage

curl --location 'https://editor.pressmatrix.com/api/v2/importer/organizations/{organization_id}/publications/{publication_id}/stories?search=Example&page=1&per=20' \
  --header 'Accept: application/json' \
  --header 'Authorization: Token {TOKEN_GENERATED_BY_PMX}'

PATCH/organizations/{organization_id}/publications/{publication_id}/stories/{story_id}

Artikel aktualisieren

Verwende PATCH, um einzelne Artikelfelder zu aktualisieren. Verwende PUT, wenn der vollständige Satz von Artikelattributen ersetzt werden soll.

Patch-Anfrage

curl --request PATCH 'https://editor.pressmatrix.com/api/v2/importer/organizations/{organization_id}/publications/{publication_id}/stories/{story_id}' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Token {TOKEN_GENERATED_BY_PMX}' \
  --data '{
    "story": {
      "title": "Updated Example Article",
      "preview": "Updated article summary.",
      "purchase_required": true
    }
  }'

POST/organizations/{organization_id}/publications/{publication_id}/stories/{story_id}/publish

Artikel veröffentlichen

Veröffentlicht einen Artikel, nachdem alle Pflichtfelder und Publishing-Voraussetzungen erfüllt sind.

Anfrage

curl --request POST 'https://editor.pressmatrix.com/api/v2/importer/organizations/{organization_id}/publications/{publication_id}/stories/{story_id}/publish' \
  --header 'Accept: application/json' \
  --header 'Authorization: Token {TOKEN_GENERATED_BY_PMX}'

DELETE/organizations/{organization_id}/publications/{publication_id}/stories/{story_id}

Artikel löschen

Löscht einen Artikel aus den normalen API-Responses.

Anfrage

curl --request DELETE 'https://editor.pressmatrix.com/api/v2/importer/organizations/{organization_id}/publications/{publication_id}/stories/{story_id}' \
  --header 'Accept: application/json' \
  --header 'Authorization: Token {TOKEN_GENERATED_BY_PMX}'