OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Complete API → Set Assign Options

AI-generated

Summary

Set assignment options for products in OnPrintShop by sending one or more input objects that define various option attributes and settings to the API's setAssignOptions mutation.

Inputs

  • Inputs (required) — One or more AssignOptionsInput objects providing details like attribute IDs, display settings, pricing exclusions, and identifiers such as product option ID or master option ID.
  • Safe Mode — Optional boolean to block mutations in the Complete API context, ensuring safety during execution.
  • Partial Response — Option to either fail on errors or return partial data when some assignments fail.
  • Return Fields Mode — Choose to return all fields or a custom selection (ID, index, message, result) from the API response.
  • Input Mode — Choose between entering fields individually or supplying the full JSON object for inputs.

Output shape

a list of result objects, each indicating the index, outcome (result), message, and ID for each assignment input processed.

The output mirrors the API's response to the setAssignOptions mutation, returning an array with an object per input item, useful for tracking success or failure per assignment.

Examples

Example 1: Assign multiple options to products with specific attributes and display settings.

Provide a JSON array or multiple field sets with product option IDs, attribute IDs, and other option parameters to assign.

Links

Discussion