SignupQuestionnaireSend
Send a MediaQuestionnaire to the signups of an event.
POST/api/event/{identifier}/send_questionnaire
Creates a MassUserNotification (referenceClassName=BaseEventSignUp, referenceIds=[signup ids], createQuestionnaireDraft=true) and schedules the processing cron. The mail body defaults to a sensible invitation text that renders the public fill link when no custom text/template is supplied (see NotificationHelper default-body fallback).
Request body (JSON, wrapped in a "data" key as per the form block prefix):
- questionnaire: id of the MediaQuestionnaire (required)
- excludeWaiting: bool, default true
- onlyConfirmed: bool, default false
- sendMail: bool, default true
- text: string, optional custom subject
- longText: string, optional custom body
Path parameters
identifierrequiredstring |
Responses
default
Request
curl --request POST \
--url https://your-instance.iw-erp.de/api/event/42/send_questionnaire \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'POST', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/event/42/send_questionnaire', 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/event/42/send_questionnaire"
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/event/42/send_questionnaire', [
'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/event/42/send_questionnaire"),
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/event/42/send_questionnaire")
.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/event/42/send_questionnaire"
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 package:http (no controller in the iw_erp_api package)
import 'package:http/http.dart' as http;
final response = await http.post(
Uri.parse('https://your-instance.iw-erp.de/api/event/42/send_questionnaire'),
headers: {'x-iw-jwt-token': '<TOKEN>'},
);
print(response.body);