Skip to main content

Publisher Management via the V6 REST-API

Introduction

The V6 REST-API allows administrators to create publishers and retrieve their details. This functionality is currently limited to CREATE and READ operations.

Endpoint

  • For Admins: https://SUBDOMAIN.de/ws/V6/admin/JSON/Publisher


CRUD Operations

POST: Create Publisher (CREATE)

Creates a new publisher and inserts the corresponding data into the global.logins and global.login_settings tables.

Required Parameters:
Parameter Type Description
email String Mandatory, max. 255 characters
salutation String Mandatory, values: mr or mrs
prename String Mandatory, max. 255 characters
surname String Mandatory, max. 255 characters
  • Optional Parameters (Excerpt): company, street, zip, city, telephone, country (ISO 3166 ALPHA-3), billing_sepa_iban, companytype (un for company or priv for private), language_interface (Default: DEU), etc.

Example Request:

Bash
curl -X POST -H "Content-Type: application/json" -H "X-Network-ID: -1" -H "X-Auth-Token: ADMIN_APIUSER_TOKEN" -H "X-Auth-ID: ADMIN_APIUSER_LOGIN_ID" -d '{
  "email": "max.mustermann@example.com",
  "salutation": "mr",
  "prename": "Max",
  "surname": "Mustermann",
  "company": "Musterfirma",
  "street": "Musterstraße 1",
  "zip": "12345",
  "city": "Musterstadt",
  "country": "DEU",
  "billing_sepa_owner": "Max Mustermann",
  "billing_sepa_iban": "DE12345678901234567890",
  "billing_sepa_bic": "GENODEF1M01",
  "language_interface": "DEU",
  "billing_mode": 1,
  "billing_media": 1,
  "country_billing": "DEU",
  "country_publisher": "DEU",
  "billing_limit": 50
}' "https://SUBDOMAIN.de/ws/V6/admin/JSON/Publisher"

Expected Response:

JSON
{
  "id": 123,
  "name": "Max Mustermann",
  "email": "max.mustermann@example.com"
}


GET: Retrieve Publisher (READ)

Returns the details of a specific publisher or a list of publishers.

  • Filter Options: All fields within the table can be used as filters (e.g., email, status, prename, surname).

Example Request (Specific ID):

Bash
curl -X GET -H "Content-Type: application/json" -H "X-Network-ID: -1" -H "X-Auth-Token: ADMIN_APIUSER_TOKEN" -H "X-Auth-ID: ADMIN_APIUSER_LOGIN_ID" "https://SUBDOMAIN.de/ws/V6/admin/JSON/Publisher?id=123"

Example Request with Filters:

Bash
curl -X GET -H "Content-Type: application/json" -H "X-Network-ID: -1" -H "X-Auth-Token: ADMIN_APIUSER_TOKEN" -H "X-Auth-ID: ADMIN_APIUSER_LOGIN_ID" "https://SUBDOMAIN.de/ws/V6/admin/JSON/Publisher?status=1&prename=Max"


Error Handling

Missing Required Fields (POST):

JSON
{ 
  "error": "Missing required field: email" 
}

Publisher Not Found (GET):

JSON
{
  "error": "Publisher not found"
}