OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Complete API → Set Department

AI-generated

Summary

Set or update an OnPrintShop department using provided department input fields to create or modify department details for a tenant store.

Inputs

  • Input (JSON) (required) — Provide DepartmentInput object including fields such as corporate_id, name, email_to, status, and other optional department attributes to create or update a department.
  • Safe Mode — When enabled, blocks mutations to prevent changes in Complete API mode or reduces nested response complexity in legacy mode.
  • Partial Response — Select whether to fail on errors or return partial data if some updates fail.
  • Return Fields Mode — Choose between returning all available fields or a custom selection after the department is set.
  • Return Fields — Select specific fields (ID, Message, Result) to include in the response when using custom return mode.

Output shape

a list of result objects for each department set operation

Each response object includes fields like result, message, and id reflecting the outcome of the create or update department mutation. Supports batching multiple items; response list flat with one object per item. Handles errors by failing or returning partial data based on configuration.

Examples

Example 1: Update a department with specific fields

Set the Input (JSON) field with department properties (e.g., corporate_id, name), leave Safe Mode off, and expect the mutation result with department ID and message.

Links

Discussion