Tools

Publish monitoring & control

The background publish operations behind publish_master_v1: list them, follow one run's progress and item outcomes, read its recap of published changes and failures, explain an item's per-store failures, inspect the changes an item still owes Shopify (fields and relationships), query publish locks, read completion notifications — all read — plus cooperative cancel and the bulk publish, which are publish-tier.

list_publish_operations_v1

list_publish_operations_v1pim:read

List the account's background publish operations — scope "active" (queued and running, the default) or "recent" (the newest of any status) — each with its status, the stores it targets, progress counts (total, completed, succeeded, failed), the failed items with their reasons, and whether it holds the whole account locked. At most 50.

ArgumentTypeDescription
limitintegerHow many to return (1–50, default 20).
scopestring, one of active, recentWhich operations to list.

get_publish_operation_v1

get_publish_operation_v1pim:read

Get one background publish operation: its status (queued, running, completed, canceled, failed), whether a cancel was requested, the stores it targets, progress counts, the failed items with their reasons, and its timestamps. Poll this after publish_master_v1 or publish_batch_v1 accepted a run.

ArgumentTypeDescription
idstring, requiredThe publish operation id (from publish_master_v1, publish_batch_v1, or list_publish_operations_v1).

get_publish_operation_recap_v1

get_publish_operation_recap_v1pim:read

Get the item-by-item recap of a publish operation, failures first: each item's label and type, its outcome, the per-store split (which stores took it, which refused it and why), and the changes the run pushed — field before/after values per store, including the relationship rows a collection's sources produced (Products added/removed, excluded products/collections added/removed). Capped at 500 items; total reports the run's real size.

ArgumentTypeDescription
idstring, requiredThe publish operation id (from publish_master_v1, publish_batch_v1, or list_publish_operations_v1).

get_publish_failures_v1

get_publish_failures_v1pim:read

For one item, read each store version's last publish outcome: the status, the merchant-facing reason Shopify (or the publish) gave when it failed, the fields held responsible for that failure, whether it still has unpublished changes, and when it last published. The reason wording is the same the detail page shows; a store with no failure reports its status only.

ArgumentTypeDescription
idstring, requiredThe item id (must belong to the token's account; cross-account ids return not found).

get_pending_changes_v1

get_pending_changes_v1pim:read

Inspect what a publish of one item would carry, against the published baseline: the shared (all-store) field changes, and per store the field before/after changes plus the RELATIONSHIP changes still awaiting Shopify — media attachments, hand-picked collection memberships, collection-source edits, catalog and market attachments — with whether the store version was ever published and whether its last publish failed. For a product, the variants that owe changes are included (bounded). Publish-minted identifiers are never listed as changes.

ArgumentTypeDescription
idstring, requiredThe item id (must belong to the token's account; cross-account ids return not found).

query_publish_locks_v1

query_publish_locks_v1pim:read

Ask which of up to 500 items are currently locked by a running publish operation — and why (the item is a publish target, a dependency of one, or its relationships are being reconciled) — plus whether the whole account is locked. A locked item refuses writes with publish_lock_conflict until the operation named finishes.

ArgumentTypeDescription
master_idsarray of string, requiredThe item ids to check (at most 500).

list_publish_notifications_v1

list_publish_notifications_v1pim:read

List the publish-completion notifications the finished operations left for the connected identity: the operation, its status and counts, the stores, the entity it was about, the leading changed fields, and whether it was read. An identity the notifications are not addressed to gets an empty list. At most 50.

ArgumentTypeDescription
limitintegerHow many to return (1–50, default 20).

cancel_publish_operation_v1

cancel_publish_operation_v1pim:publish

Cancel a queued or running publish operation. The worker requests cancellation within a second, aborting in-flight Shopify calls; unreached and interrupted items stay pending, and the run ends as canceled. Nothing already published is undone. Canceling an already-finished operation is a no-op that returns it unchanged.

ArgumentTypeDescription
idstring, requiredThe publish operation id (from publish_master_v1, publish_batch_v1, or list_publish_operations_v1).
  • Extended timeout. 120 s per call — the operation runs server-side orchestration or a live Shopify read.
  • Reaches your stores. Annotated open-world and destructive; the in-app assistant always asks for confirmation before running it.

publish_batch_v1

publish_batch_v1pim:publish

Publish many items LIVE to Shopify as ONE background operation — either master_ids with a shared channel_ids (empty channel_ids = every store each item is on), or targets with each item's own stores (the cross-store grid form). Same accept-and-enqueue admission as publish_master_v1: the result is the accepted operation (poll get_publish_operation_v1, then read its recap); a conflicting running publish answers 409 publish_lock_conflict, and more than 20 active operations are refused. At most 10000 targets.

ArgumentTypeDescription
channel_idsarray of stringThe stores every item publishes to (form A); omit for each item's own stores.
master_idsarray of stringThe items to publish (form A).
targetsarray of objectPer-item stores (form B; replaces master_ids/channel_ids when given).
  • Extended timeout. 120 s per call — the operation runs server-side orchestration or a live Shopify read.
  • Reaches your stores. Annotated open-world and destructive; the in-app assistant always asks for confirmation before running it.