OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Mutation → Set Product Category

AI-generated

Summary

Create or update OnPrintShop product catalog categories, with support for submitting one category or a batch in a single mutation. Choose JSON Array mode to provide the ProductCategoryInput objects directly, or Fields mode to build category entries in the UI.

Inputs

  • Safe Mode — Boolean toggle. The operation’s mutation handler does not read this value, so it does not alter category writes.
  • Input Mode — Choose JSON Array or Fields for entering category data.
  • Inputs (JSON Object Array) (required) — In JSON Array mode, provide an array of category objects, such as [{"category_id":0,"category_name":"Prints","parent_id":-1,"status":"1"}]. Supports multiple categories. Category fields can include IDs and names, image/icon values, descriptions, SEO fields, parent_id, status, delete, sort_order, and external_ref.
  • Categories — In Fields mode, add one or more categories with a category ID and name, optional image/icon URLs, and additional category fields such as parent ID, descriptions, status, sort order, and SEO metadata. Image and icon URL fields are described as direct URLs accessible to OnPrintShop; processing runs in the background, so keep the URLs available until it completes.

Output shape

A single n8n output containing the mutation result object.

The result includes the API’s index, result, message, id, and external_ref fields. A JSON input must be an array; bare objects and wrapper objects are rejected. GraphQL errors are raised as node errors, or emitted as an {"error":"..."} item when Continue On Fail is enabled.

Links

Discussion