Calendar
Create all missing calendar entries of the given year
POST/api/opendata/calendar_generate/{entityType}/{year}
Used by the UI to fill an empty calendar. The requested year is created directly so the user sees the result immediately, the remaining years are created by the background command.
Path parameters
entityTyperequiredstring | |
yearrequiredstring |
Responses
200Creates the missing calendar days and returns a small summary
curl --request POST \
--url https://your-instance.iw-erp.de/api/opendata/calendar_generate/42/42const options = {method: 'POST'};
fetch('https://your-instance.iw-erp.de/api/opendata/calendar_generate/42/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/opendata/calendar_generate/42/42"
response = requests.post(url)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-instance.iw-erp.de/api/opendata/calendar_generate/42/42');
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/opendata/calendar_generate/42/42"),
};
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/opendata/calendar_generate/42/42")
.post(null)
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/opendata/calendar_generate/42/42"
req, _ := http.NewRequest("POST", url, nil)
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/sys_calendar_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
final result = await SysCalendarController.generate('42', '42');
if (result.success) {
print(result.data);
}Returns a list of regions that can be selected for the public holiday import entries.
GET/api/opendata/calendar_holiday_regions
Responses
200Returns the selectable holiday regions
curl --request GET \
--url https://your-instance.iw-erp.de/api/opendata/calendar_holiday_regionsconst options = {method: 'GET'};
fetch('https://your-instance.iw-erp.de/api/opendata/calendar_holiday_regions', 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/opendata/calendar_holiday_regions"
response = requests.get(url)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/opendata/calendar_holiday_regions');
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/opendata/calendar_holiday_regions"),
};
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/opendata/calendar_holiday_regions")
.get()
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/opendata/calendar_holiday_regions"
req, _ := http.NewRequest("GET", url, nil)
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/sys_calendar_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
final result = await SysCalendarController.getHolidayRegions();
if (result.success) {
print(result.data);
}Import the public holidays of the given year and region into the calendar
POST/api/opendata/calendar_holiday_import/{entityType}/{year}
The work time settings and - for the main calendar - the event settings that should be applied to every holiday are part of the request.
Path parameters
entityTyperequiredstring | |
yearrequiredstring |
Responses
200Imports the public holidays and returns the changed days
curl --request POST \
--url https://your-instance.iw-erp.de/api/opendata/calendar_holiday_import/42/42const options = {method: 'POST'};
fetch('https://your-instance.iw-erp.de/api/opendata/calendar_holiday_import/42/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/opendata/calendar_holiday_import/42/42"
response = requests.post(url)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-instance.iw-erp.de/api/opendata/calendar_holiday_import/42/42');
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/opendata/calendar_holiday_import/42/42"),
};
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/opendata/calendar_holiday_import/42/42")
.post(null)
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/opendata/calendar_holiday_import/42/42"
req, _ := http.NewRequest("POST", url, nil)
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/sys_calendar_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
final result = await SysCalendarController.importHolidays('42', '42', region: '…');
if (result.success) {
print(result.data);
}Set the working time flags of every day in a date range (U09: school holiday periods)
POST/api/opendata/calendar_range/{entityType}
Missing days are created. Days that already carry flags are only replaced when
overwrite is true (default). clear = true removes the flags of the range instead.
Path parameters
entityTyperequiredstring |
Responses
200Updates the days of the range and returns a small summary
curl --request POST \
--url https://your-instance.iw-erp.de/api/opendata/calendar_range/42const options = {method: 'POST'};
fetch('https://your-instance.iw-erp.de/api/opendata/calendar_range/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/opendata/calendar_range/42"
response = requests.post(url)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-instance.iw-erp.de/api/opendata/calendar_range/42');
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/opendata/calendar_range/42"),
};
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/opendata/calendar_range/42")
.post(null)
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/opendata/calendar_range/42"
req, _ := http.NewRequest("POST", url, nil)
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/sys_calendar_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
final result = await SysCalendarController.updateRange('42', from: '…', to: '…');
if (result.success) {
print(result.data);
}Set the working time flags of every day in a date range (U09: school holiday periods)
PUT/api/opendata/calendar_range/{entityType}
Missing days are created. Days that already carry flags are only replaced when
overwrite is true (default). clear = true removes the flags of the range instead.
Path parameters
entityTyperequiredstring |
Responses
200Updates the days of the range and returns a small summary
curl --request PUT \
--url https://your-instance.iw-erp.de/api/opendata/calendar_range/42const options = {method: 'PUT'};
fetch('https://your-instance.iw-erp.de/api/opendata/calendar_range/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/opendata/calendar_range/42"
response = requests.put(url)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-instance.iw-erp.de/api/opendata/calendar_range/42');
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/opendata/calendar_range/42"),
};
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/opendata/calendar_range/42")
.put(null)
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/opendata/calendar_range/42"
req, _ := http.NewRequest("PUT", url, nil)
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.put(
Uri.parse('https://your-instance.iw-erp.de/api/opendata/calendar_range/42'),
headers: {},
);
print(response.body);Set the working time flags of every day in a date range (U09: school holiday periods)
PATCH/api/opendata/calendar_range/{entityType}
Missing days are created. Days that already carry flags are only replaced when
overwrite is true (default). clear = true removes the flags of the range instead.
Path parameters
entityTyperequiredstring |
Responses
200Updates the days of the range and returns a small summary
curl --request PATCH \
--url https://your-instance.iw-erp.de/api/opendata/calendar_range/42const options = {method: 'PATCH'};
fetch('https://your-instance.iw-erp.de/api/opendata/calendar_range/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/opendata/calendar_range/42"
response = requests.patch(url)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PATCH', 'https://your-instance.iw-erp.de/api/opendata/calendar_range/42');
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/opendata/calendar_range/42"),
};
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/opendata/calendar_range/42")
.patch(null)
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/opendata/calendar_range/42"
req, _ := http.NewRequest("PATCH", url, nil)
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/opendata/calendar_range/42'),
headers: {},
);
print(response.body);