OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Mutation → Set Product Option Rules

AI-generated

Summary

Create or update a product option rule in OnPrintShop by sending a ProductOptionRulesInput object to the setProductOptionRules GraphQL mutation. The input can include rule conditions, affected options or attributes, status, sort order, and a delete flag; read current rules first and keep rule ownership clear.

Inputs

  • Safe Mode — Boolean, default false. The provided UI description says this blocks mutations in Complete API; it does not describe a separate effect for this operation.
  • Input (JSON) (required) — A JSON object matching ProductOptionRulesInput. The example includes rule_id, rule_name, rule_type, source and hidden option or attribute IDs, status, custom parameter and quantity conditions, sort_order, condition, disabled_for_admin, and delete. Supply the fields needed to create, update, or delete the rule.

Output shape

A single item containing the mutation result object.

The returned object includes result, message, and rule_id. GraphQL errors are raised as node errors; with Continue On Fail enabled, an error item is returned instead.

Links

Discussion