OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Complete API → Notify User

AI-generated

Summary

Send a notification to a user (user, admin, or workflow) in the OnPrintShop system via the Complete API's notifyUser mutation.

Inputs

  • Usertype (required) — Type of user to notify; must be one of 'user', 'admin', or 'workflow'.
  • Input (required) — Notification content and options supplied as a JSON object or fields, including optional attachments, Bcc, Cc, message type, body, and subject.
  • Cust ID — Optional customer ID to specify the target user for the notification.
  • Safe Mode — Choose whether to block mutations in Complete API; defaults to false.
  • Input Mode — Choose between entering notification details as individual fields or a raw JSON object; defaults to fields.
  • Partial Response — Defines error handling behavior on partial failures: 'fail' to fail on errors or 'returnData' to get partial data.
  • Return Fields Mode — Determines if all response fields are returned or only selected fields.
  • Return Fields — Selection of which response fields to include, such as ID, message, and result.

Output shape

a list of notification result objects representing the server response for each notification sent.

The output contains the result, message, and ID for each notification sent. If the API returns errors, they will be presented as exceptions unless 'Partial Response' is set to allow partial data. Use 'Safe Mode' cautiously as it controls mutation execution. Input data can be provided either as separate fields or a JSON object for flexibility.

Examples

Example 1: Notifying a user with a basic message

Set 'Usertype' to 'user'; provide notification 'Input' fields such as 'subject' and 'body'; optionally specify 'Cust ID' to target a specific user.

Example 2: Sending a notification as JSON

Switch 'Input Mode' to 'JSON Object' and provide the full 'Input' JSON defining notification parameters; set 'Usertype' appropriately.

Links

Discussion