OnPrintShop Product Builder icon

OnPrintShop Product Builder

Create and maintain OnPrintShop products, categories, prices, sizes, pages, SKUs, and master options

Actions62

Mutation → Set Product Option Rules

AI-generated

Summary

Set or update product option rules on the OnPrintShop product builder by providing a detailed JSON input that defines rule properties and conditions.

Inputs

  • Safe Mode — Boolean flag to block mutations in Complete API or reduce nested response fields in legacy actions; defaults to false.
  • Input (JSON) (required) — A JSON object representing the product option rule to create or update, including fields like rule ID, name, type, source options, hide options, status, parameters, conditions, and disabling flags.

Output shape

a JSON response confirming the creation or update of the product option rule, mirroring the structure of the input rule object with status information

Requires providing a full ProductOptionRulesInput JSON object; safe mode influences mutation execution and response detail; the operation reads existing rules to maintain clear rule ownership.

Examples

Example 1: Create or update a product option rule controlling visibility of options based on specific parameter conditions using a structured JSON input.

The JSON input must include keys such as rule_id, rule_name, rule_type, condition, and optional arrays for conditions like opt_textbox_conditions to specify how options are controlled.

Links

Discussion