OnPrintShop Inventory icon

OnPrintShop Inventory

Read and update product stock, product stock lists, and master-option stock

Product → Get Stock

AI-generated

Summary

Read stock records for products or product options, with optional product filtering and pagination. Select which stock fields OPS should return; include stock identifiers and option or location details when needed for later stock updates.

Inputs

  • Safe Mode — Defaults to false. In legacy actions, enabled Safe Mode reduces nested response fields; the property description also says it blocks mutations in the Complete API.
  • Stock Type (required) — Choose Product to read size-based stock, or Product Option to read stock for size-and-option combinations.
  • Product ID — OPS product ID to filter the stock records. Omit it for a broad Product Option stock read.
  • Query Parameters — Optional pagination: Limit (default 50) sets the maximum results, and Offset (default 0) sets how many records to skip.
  • Stock Fields Mode — Choose Custom Selection (default), All Fields, or No Fields to control the fields sent to OPS. Root GraphQL reads usually require at least one field.
  • Stock Fields — In Custom Selection mode, choose fields such as stock_id, product_id, product_name, size_id, size_title, credited_stock, debited_stock, current_stock, option_details, and location. Include stock_id for writes, option_details for combinations, and location for warehouse or shelf placement.

Output shape

A list of stock records returned by OPS.

Records contain the selected stock fields. Limit and Offset control pagination; the supplied source pack only shows the node entry module, so it does not specify further response details.

Examples

Example 1: fetch-stock

Fetch stock with OPS credentials, then paginate through stock records and request explicit fields for reliable mapping; this read-only node example uses the Product stock type, no Product ID filter, a limit of 100 with offset 0, and fields for stock ID, product ID, size ID/title, current stock, and location. The stock fields are the reliable mapping to Update Stock IDs and quantities, with stock_id recommended for writes and location needed for warehouse or shelf targeting; use stockType product_option plus option_details when the stock combination includes a product option. Product ID is only a filter here and may be omitted for broader Product Option reads. Safe Mode stays disabled because this is a read-only lookup; it does not independently protect a later Update Stock node, which needs its own mutation controls and safeguards. Both returned fields and pagination are exposed in the node output, so downstream nodes should map fields from each individual stock record rather than assume one aggregate response.

Links

Discussion