OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Product → Update Stock

AI-generated

Summary

Update OnPrintShop product stock by adding, removing, or resetting quantities for one or more stock entries. Choose a stock scope and identify entries by stock ID, or use a product SKU where supported; this operation writes inventory.

Inputs

  • Safe Mode — Optional safety setting. Its operation-specific effect is not clear from the updateStock handler.
  • Stock Type — Optionally select Product or Product Option to set the stock scope.
  • Product SKU — Optional SKU used to identify stock entries that omit stock_id; required for legacy SKU-based updates.
  • Stock Details Input (required) — Choose Fields, JSON Object Array, or Legacy Scalar Fields. The legacy mode is retained for saved workflows.
  • Stock Details — In Fields mode, add one or more entries. Each requires a numeric Stock ID, numeric Stock Change, and an Action: Add, Remove, or Reset. Comment and Location are optional.
  • Stock Details (JSON Object Array) (required) — In JSON mode, provide an array of entries with numeric stock_change and action (add, remove, or reset). Each entry needs a numeric stock_id unless Product SKU is provided; comment and location are optional.
  • Legacy Identifier Type (required) — In legacy mode, choose Stock ID or Product SKU. Stock ID mode uses Legacy Stock ID; SKU mode uses Product SKU.
  • Legacy Stock ID (required) — In legacy mode with Stock ID selected, provide a numeric stock ID.
  • Legacy Action (required) — In legacy mode, choose Add, Remove, or Set. Set is translated to the API's reset action.
  • Legacy Stock Quantity (required) — In legacy mode, the quantity to add, remove, or set.
  • Legacy Comment (required) — In legacy mode, the comment included with the stock update.

Output shape

A list of items, normally one result item per input item.

Each successful result contains the API's result, message, id, stock_quantity, and stock_details fields, plus _operation and _stockDetailCount. GraphQL or validation errors fail the operation unless Continue On Fail is enabled, in which case an error item is returned.

Links

Discussion