Skip to content
Developer

MassNotification

Chat and notifications3 EndpointsNotification / MassNotification

Add a new MassUserNotification

POST/api/notification/mass_notification

Request body application/json

  • dataMassUserNotification
    Show fields (16)
    • send_pushboolean

      Whether push notifications should be sent.

    • send_mailboolean

      Whether e-mails should be sent.

    • send_letterboolean

      Whether letters should be sent.

    • send_smsboolean

      Whether SMS messages should be sent.

    • send_whatsappboolean

      Whether WhatsApp messages should be sent.

    • reference_class_namestring

      Class name of the records the notification refers to.

    • reference_idsarray<string>

      IDs of the records the notification refers to.

    • textstring

      The headline of the notification

    • long_textstring

      The text of the notification

    • html_textstring

      The html text of the notification, overrides the long text

    • attachmentsarray<Attachment12>

      Attachments of the mass notification.

    • templateFlexibleLatexTemplate3

      Template used for the mass notification.

    • save_as_attachmentboolean

      Whether the notification is saved as an attachment.

    • check_for_duplicatesboolean

      Whether duplicate recipients are checked.

    • create_questionnaire_draftboolean

      If true, a MediaQuestionnaireAnswer draft is created (or reused) for each referenced BaseEventSignUp recipient, and its fill link is exposed as a template placeholder.

    • questionnaire_draft_questionnaireMediaQuestionnaire3

      The result-list questionnaire the per-recipient drafts are created for.

Responses

200Add a new MassUserNotificationMassUserNotification2

Show fields (20)
  • idinteger

    Primary key of the mass notification. Internal ID.

  • processedboolean

    Whether the mass notification has been processed.

  • send_pushboolean

    Whether push notifications should be sent.

  • send_mailboolean

    Whether e-mails should be sent.

  • send_letterboolean

    Whether letters should be sent.

  • send_smsboolean

    Whether SMS messages should be sent.

  • send_whatsappboolean

    Whether WhatsApp messages should be sent.

  • reference_class_namestring

    Class name of the records the notification refers to.

  • reference_idsarray<string>

    IDs of the records the notification refers to.

  • textstring

    The headline of the notification

  • long_textstring

    The text of the notification

  • html_textstring

    The html text of the notification, overrides the long text

  • attachmentsarray<Attachment22>

    Attachments of the mass notification.

    Show fields (26)
    • idinteger

      Primary key of the attachment. Internal ID.

    • filenamestring

      Original file name.

    • filesizestring

      Size of the file in bytes.

    • mimetypestring

      MIME type of the file.

    • createdbyusernamestring

      Name of the user who uploaded the file, as text.

    • createdstring (date-time)

      Point in time the attachment was created.

    • googleidstring

      ID of the file in Google Drive.

    • googledownloadlinkstring

      Download link of the file in Google Drive.

    • scopestring

      Scope that controls who can see the attachment.

    • ocr_document_typestring

      Document type recognized by OCR.

    • ocr_from_namestring

      Sender name recognized by OCR.

    • ocr_from_companystring

      Sender company recognized by OCR.

    • ocr_from_addressstring

      Sender address recognized by OCR.

    • ocr_from_emailstring

      Sender e-mail address recognized by OCR.

    • ocr_from_phonestring

      Sender phone number recognized by OCR.

    • ocr_to_namestring

      Recipient name recognized by OCR.

    • ocr_to_companystring

      Recipient company recognized by OCR.

    • ocr_to_addressstring

      Recipient address recognized by OCR.

    • ocr_to_emailstring

      Recipient e-mail address recognized by OCR.

    • ocr_to_phonestring

      Recipient phone number recognized by OCR.

    • ocr_summarystring

      Summary of the document created by OCR.

    • ocr_statusstring

      OCR processing status: null=not processed, pending, processing, done, error

    • ocr_errorstring

      Reason of the last failed or incomplete OCR run, null when it went through

    • ocr_processed_atstring (date-time)

      Point in time OCR processing finished.

    • virus_checkedboolean

      1 once the virus scan has passed for this file. The scan runs in the background (AttachmentVirusScanCommand), so a freshly uploaded file starts at 0 and stays there until it was really checked. An infected file never reaches 1 - it is deleted instead. UIs use this to decide whether a file may be handed to a user, so it must stay false until proven otherwise.

    • virus_checked_atstring (date-time)

      When the virus scan passed. Null while the file is still waiting.

  • templateFlexibleLatexTemplate

    Template used for the mass notification.

    Show fields (35)
    • predefinedboolean

      True for templates shipped by the servercontrolpanel (PredefinedFlexibleTemplateMap). Their IDs are referenced by code, so the UI offers to duplicate ("Vorlage anpassen") instead of editing them.

    • data_typestring

      Data type (reference class key) the template is rendered and checked with. For predefined templates (tag IW_PFLT) this is the data type of the code that uses them.

    • data_type_labelstring

      Human readable name of the assigned data type, null for tags that are not a known data type.

    • template_modestring

      Serialized mode so clients do not have to know that null means standard.

    • last_check_statusstring

      Summary of the last template check for list views, the full result is admin detail only.

    • idstring

      Primary key of the template. Internal ID. Used as a string identifier.

    • namestring

      Name of the template.

    • tagstring

      Tag used to group templates.

    • mass_messageboolean

      Whether the template is used for mass messages.

    • default_store_as_pdfboolean

      Whether the generated document is stored as PDF by default.

    • security_scopestring

      Scope that controls who can use the template.

    • security_user_access_typeinteger

      Access type required to use the template.

    • param1string

      Value of parameter 1 used in the template.

    • param2string

      Value of parameter 2 used in the template.

    • param3string

      Value of parameter 3 used in the template.

    • param4string

      Value of parameter 4 used in the template.

    • param5string

      Value of parameter 5 used in the template.

    • param6string

      Value of parameter 6 used in the template.

    • param7string

      Value of parameter 7 used in the template.

    • param8string

      Value of parameter 8 used in the template.

    • param9string

      Value of parameter 9 used in the template.

    • param10string

      Value of parameter 10 used in the template.

    • default_value_param1string

      Default value of parameter 1.

    • default_value_param2string

      Default value of parameter 2.

    • default_value_param3string

      Default value of parameter 3.

    • default_value_param4string

      Default value of parameter 4.

    • default_value_param5string

      Default value of parameter 5.

    • default_value_param6string

      Default value of parameter 6.

    • default_value_param7string

      Default value of parameter 7.

    • default_value_param8string

      Default value of parameter 8.

    • default_value_param9string

      Default value of parameter 9.

    • default_value_param10string

      Default value of parameter 10.

    • deletedboolean

      This property is used to mark an entity as deleted / archived

    • createdstring (date-time)

      Point in time the entity was created.

    • updatedstring (date-time)

      Point in time the entity was last updated.

  • save_as_attachmentboolean

    Whether the notification is saved as an attachment.

  • check_for_duplicatesboolean

    Whether duplicate recipients are checked.

  • create_questionnaire_draftboolean

    If true, a MediaQuestionnaireAnswer draft is created (or reused) for each referenced BaseEventSignUp recipient, and its fill link is exposed as a template placeholder.

  • questionnaire_draft_questionnaireMediaQuestionnaire

    The result-list questionnaire the per-recipient drafts are created for.

    Show fields (34)
    • idinteger

      Primary key of the questionnaire. Internal ID.

    • questionnaire_typestring

      Type of the questionnaire, for example registration or survey.

    • tokenstring

      Public token of the questionnaire. Used instead of the ID.

    • public_copyrightstring

      Copyright text shown with the questionnaire.

    • public_language_codestring

      Language of the questionnaire, for example de.

    • complexity_levelinteger

      Complexity level of the questionnaire.

    • public_authorstring

      Author shown to the public.

    • show_free_textboolean

      Show a free text field.

    • show_attachmentboolean

      Show an upload field for attachments.

    • require_attachmentboolean

      An attachment must be uploaded.

    • with_paginationboolean

      Show the questionnaire page by page.

    • one_entry_per_personboolean

      If true, only one entry per person is allowed - only for logged-in users and table results

    • require_addressboolean

      The address must be entered.

    • require_contactboolean

      Contact details must be entered.

    • require_ageboolean

      The age must be entered.

    • require_grade_levelboolean

      The school grade level must be entered.

    • start_timestring (date-time)

      Start of the availability of the questionnaire.

    • end_timestring (date-time)

      End of the availability of the questionnaire.

    • age_groupstring

      Age group the questionnaire is intended for.

    • min_ageinteger

      Minimum age in years.

    • max_ageinteger

      Maximum age in years.

    • min_grade_levelinteger

      Minimum school grade level.

    • max_grade_levelinteger

      Maximum school grade level.

    • age_toleranceinteger

      Years by which the age may be outside the range and still be accepted.

    • group_allowedboolean

      Whether the questionnaire is limited to a group.

    • allow_self_registerboolean

      Whether people can register themselves to answer the questionnaire.

    • allow_self_download_result_templateboolean

      Whether answerers can download their own result.

    • clarification_enabledboolean

      Second loop after the AI comparison: answers the AI does not rate as fulfilled become clarification points (MediaQuestionnaireClarification) that are discussed with the customer and decided before the result template is created. Without it the result template follows the AI comparison directly.

    • createdstring (date-time)

      Point in time the entity was created.

    • updatedstring (date-time)

      Point in time the entity was last updated.

    • deletedboolean

      This property is used to mark an entity as deleted / archived

    • image_urlstring

      URL of the image of the entity.

    • namestring

      Name of the entity.

    • slug_identifierstring

      Slug used in URLs of the entity.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/notification/mass_notification \
  --header 'content-type: application/json' \
  --header 'x-iw-jwt-token: <TOKEN>' \
  --data '
{
  "data": {
    "send_mail": true,
    "reference_class_name": "Beispiel",
    "text": "Text",
    "long_text": "Text",
    "html_text": "Text",
    "send_push": true
  }
}
'
Response 200 application/json
{
  "id": 42,
  "send_mail": true,
  "reference_class_name": "Beispiel",
  "text": "Text",
  "long_text": "Text",
  "html_text": "Text",
  "processed": true,
  "send_push": true,
  "send_letter": true,
  "send_sms": true
}

Get a list of SimpleReference

GET/api/notification/mass_notification/simple_references

Query parameters

classNamerequiredstringThe className to get the references for. e.g. person

Responses

200Get a list of SimpleReferencearray<SimpleReference>

Show fields (3)
  • class_namestring
  • idstring
  • namestring
Request
curl --request GET \
  --url 'https://your-instance.iw-erp.de/api/notification/mass_notification/simple_references?className=string' \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
[
  {
    "class_name": "Beispiel",
    "id": "42",
    "name": "Beispiel"
  }
]

Return the list of Twig placeholders available for a given reference class or for one of the settings backed mail templates. Used by the template editor / mass-notification editor and by the mail template settings screens to power click-to-insert chips.

GET/api/notification/mass_notification/placeholders

Exactly one of className / templateKey has to be given.

Query parameters

classNamestringFQCN or short name of the reference class (e.g. 'CRMPerson' or full FQCN).
templateKeystringSettings key of a mail template (e.g. 'templates_mail_ticket_created_txt_twig').

Responses

default

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/notification/mass_notification/placeholders \
  --header 'x-iw-jwt-token: <TOKEN>'