OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Mutation → Set Product Image Gallery

AI-generated

Summary

Set or update product gallery images for a specified product in OnPrintShop with options to optimize images and define image details.

Inputs

  • Products ID (required) — Numeric ID of the product to which the gallery images belong.
  • Optimize Image — Flag (0 or 1) indicating whether OnPrintShop should optimize the images.
  • Input Mode — Method to provide image data, either as a single JSON array or as fixed collection fields.
  • Input (JSON) (required) — JSON object containing an array of image entries with details like titles, image names, sort order, and status when Input Mode is JSON Array.
  • Images (required) — Multiple image entries each with fields such as gallery ID, image URL accessible to OnPrintShop, title, sort order, and status when Input Mode is Fields.

Output shape

a list of result objects reflecting operation success per image entry

Each returned object contains result indicators and messages for the mutation applied on product gallery images.

Examples

Example 1: Add or update multiple images for a product's gallery

Specify the Products ID, choose the Input Mode (JSON or Fields), provide image details accordingly, and decide whether to optimize images.

Links

Discussion