OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Complete API → Set Product Option Rules

AI-generated

Summary

Creates or updates product option rules in OnPrintShop by sending a ProductOptionRulesInput object to the setProductOptionRules GraphQL mutation. Use Fields mode to enter rule properties individually or JSON Object mode to supply the input object directly; Safe Mode blocks this mutation.

Inputs

  • Input Mode — Choose Fields or JSON Object to provide the rule input.
  • Input (required) — A ProductOptionRulesInput object. Fields mode offers rule ID and name, type, source and hidden option or attribute IDs, status, condition, quantity and custom parameter settings, sort order, and an optional delete flag. JSON Object mode accepts the same API input as JSON.
  • Safe Mode — When enabled, blocks mutations in Complete API operations.
  • Partial Response — Choose whether to fail on errors or return partial data; partial results may include failures.
  • Return Fields Mode — Return all mutation response fields or select a custom subset.
  • Return Fields — When Custom Selection is chosen, select response fields: ID, Message, and Result.

Output shape

A single output item containing the mutation result.

The response includes result, message, and rule_id. GraphQL errors raise an operation error unless the node is configured to continue on fail.

Links

Discussion