NewsArticleType
This method will get all MediaNewsArticleDataType Objects
GET/api/media/news_article_type
Query parameters
searchStringstring | text to search for in the list |
orderFieldNamestring | name of the order field |
orderFieldSortstring | sorting modeAllowed: DESCASC |
pageinteger | page of the list |
pageSizeinteger | number of entries for each page |
withMaxPageNumberstring | returns the number of pages available as a header if this is set |
Responses
200Returns a list of MediaNewsArticleDataType objectsarray<MediaNewsArticleDataType>
Show fields (10)
idstringIdentifier of the news article data type. For example news or press release.
namestringName of the news article type.
show_adminbooleanShow the type in the admin app.
show_customerbooleanShow the type in the customer app.
menu_namestringName of the menu entry for the type.
show_admin_menubooleanShow the type in the admin menu.
show_customer_menubooleanShow the type in the customer app menu.
show_customer_descriptionbooleancontrols whether the customer news list shows the description below the headline
deletedbooleanThis property is used to mark an entity as deleted / archived
orderintegerPosition of the entity in the order.
curl --request GET \
--url https://your-instance.iw-erp.de/api/media/news_article_type \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/media/news_article_type', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/media/news_article_type"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/media/news_article_type', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/media/news_article_type"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/media/news_article_type")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/media/news_article_type"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/media_news_article_type_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await MediaNewsArticleTypeController.getAll();
if (result.success) {
print(result.data);
}[
{
"id": "42",
"name": "Beispiel",
"menu_name": "Beispiel",
"show_customer_description": true,
"show_admin": true,
"show_customer": true,
"show_admin_menu": true,
"show_customer_menu": true,
"deleted": true,
"order": 1
}
]Add a new MediaNewsArticleDataType
POST/api/media/news_article_type
Responses
200Add a new MediaNewsArticleDataTypeMediaNewsArticleDataType
Show fields (10)
idstringIdentifier of the news article data type. For example news or press release.
namestringName of the news article type.
show_adminbooleanShow the type in the admin app.
show_customerbooleanShow the type in the customer app.
menu_namestringName of the menu entry for the type.
show_admin_menubooleanShow the type in the admin menu.
show_customer_menubooleanShow the type in the customer app menu.
show_customer_descriptionbooleancontrols whether the customer news list shows the description below the headline
deletedbooleanThis property is used to mark an entity as deleted / archived
orderintegerPosition of the entity in the order.
curl --request POST \
--url https://your-instance.iw-erp.de/api/media/news_article_type \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'POST', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/media/news_article_type', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/media/news_article_type"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-instance.iw-erp.de/api/media/news_article_type', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/media/news_article_type"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/media/news_article_type")
.post(null)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/media/news_article_type"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/media_news_article_type_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
import 'package:iw_erp_api/model/media_news_article_type.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await MediaNewsArticleTypeController.post(MediaNewsArticleType.fromJson({}));
if (result.success) {
print(result.data);
}{
"id": "42",
"name": "Beispiel",
"menu_name": "Beispiel",
"show_customer_description": true,
"show_admin": true,
"show_customer": true,
"show_admin_menu": true,
"show_customer_menu": true,
"deleted": true,
"order": 1
}This method will get a single MediaNewsArticleDataType with the given id
GET/api/media/news_article_type/{identifier}
Path parameters
identifierrequiredstring |
Responses
200Returns a single MediaNewsArticleDataTypeMediaNewsArticleDataType
Show fields (10)
idstringIdentifier of the news article data type. For example news or press release.
namestringName of the news article type.
show_adminbooleanShow the type in the admin app.
show_customerbooleanShow the type in the customer app.
menu_namestringName of the menu entry for the type.
show_admin_menubooleanShow the type in the admin menu.
show_customer_menubooleanShow the type in the customer app menu.
show_customer_descriptionbooleancontrols whether the customer news list shows the description below the headline
deletedbooleanThis property is used to mark an entity as deleted / archived
orderintegerPosition of the entity in the order.
curl --request GET \
--url https://your-instance.iw-erp.de/api/media/news_article_type/42 \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/media/news_article_type/42', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/media/news_article_type/42"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/media/news_article_type/42', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/media/news_article_type/42"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/media/news_article_type/42")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/media/news_article_type/42"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/media_news_article_type_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await MediaNewsArticleTypeController.get('42');
if (result.success) {
print(result.data);
}{
"id": "42",
"name": "Beispiel",
"menu_name": "Beispiel",
"show_customer_description": true,
"show_admin": true,
"show_customer": true,
"show_admin_menu": true,
"show_customer_menu": true,
"deleted": true,
"order": 1
}Update a MediaNewsArticleDataType
PUT/api/media/news_article_type/{identifier}
Path parameters
identifierrequiredstring |
Responses
200Update a MediaNewsArticleDataTypeMediaNewsArticleDataType
Show fields (10)
idstringIdentifier of the news article data type. For example news or press release.
namestringName of the news article type.
show_adminbooleanShow the type in the admin app.
show_customerbooleanShow the type in the customer app.
menu_namestringName of the menu entry for the type.
show_admin_menubooleanShow the type in the admin menu.
show_customer_menubooleanShow the type in the customer app menu.
show_customer_descriptionbooleancontrols whether the customer news list shows the description below the headline
deletedbooleanThis property is used to mark an entity as deleted / archived
orderintegerPosition of the entity in the order.
curl --request PUT \
--url https://your-instance.iw-erp.de/api/media/news_article_type/42 \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'PUT', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/media/news_article_type/42', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/media/news_article_type/42"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.put(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-instance.iw-erp.de/api/media/news_article_type/42', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/media/news_article_type/42"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/media/news_article_type/42")
.put(null)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/media/news_article_type/42"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/media_news_article_type_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
import 'package:iw_erp_api/model/media_news_article_type.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await MediaNewsArticleTypeController.put(MediaNewsArticleType.fromJson({}));
if (result.success) {
print(result.data);
}{
"id": "42",
"name": "Beispiel",
"menu_name": "Beispiel",
"show_customer_description": true,
"show_admin": true,
"show_customer": true,
"show_admin_menu": true,
"show_customer_menu": true,
"deleted": true,
"order": 1
}Update a MediaNewsArticleDataType
PATCH/api/media/news_article_type/{identifier}
Path parameters
identifierrequiredstring |
Responses
200Update a MediaNewsArticleDataTypeMediaNewsArticleDataType
Show fields (10)
idstringIdentifier of the news article data type. For example news or press release.
namestringName of the news article type.
show_adminbooleanShow the type in the admin app.
show_customerbooleanShow the type in the customer app.
menu_namestringName of the menu entry for the type.
show_admin_menubooleanShow the type in the admin menu.
show_customer_menubooleanShow the type in the customer app menu.
show_customer_descriptionbooleancontrols whether the customer news list shows the description below the headline
deletedbooleanThis property is used to mark an entity as deleted / archived
orderintegerPosition of the entity in the order.
curl --request PATCH \
--url https://your-instance.iw-erp.de/api/media/news_article_type/42 \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'PATCH', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/media/news_article_type/42', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/media/news_article_type/42"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.patch(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PATCH', 'https://your-instance.iw-erp.de/api/media/news_article_type/42', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/media/news_article_type/42"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/media/news_article_type/42")
.patch(null)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/media/news_article_type/42"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with package:http (no controller in the iw_erp_api package)
import 'package:http/http.dart' as http;
final response = await http.patch(
Uri.parse('https://your-instance.iw-erp.de/api/media/news_article_type/42'),
headers: {'x-iw-jwt-token': '<TOKEN>'},
);
print(response.body);{
"id": "42",
"name": "Beispiel",
"menu_name": "Beispiel",
"show_customer_description": true,
"show_admin": true,
"show_customer": true,
"show_admin_menu": true,
"show_customer_menu": true,
"deleted": true,
"order": 1
}