Tools

Bulk editing & export

The bulk-edit grid as tools: its filtered, sorted, cursor-paged population and count (read), general bulk patches with per-item outcomes (write), and CSV / XLSX export of a selected dataset returned as a file. Publish a selection as one operation with publish_batch_v1.

list_bulk_edit_rows_v1

list_bulk_edit_rows_v1pim:read

Read the same filtered, sorted population the bulk-edit grid shows: full-detail items with their version on one store (or, with channel_scope "all", every store version), keyset-paged — send back next_cursor as cursor; changing sort/group/search invalidates a cursor. Optional lookups add a product's variant names and collections, a collection's leading products, or the default variant. Rows are drafts; edit them with bulk_patch_v1 and publish with publish_batch_v1.

ArgumentTypeDescription
typestring, requiredThe grid's entity type (Product, Variant, Collection, Media, Blog, Article, Page, MetaobjectEntry with parent_master_id, …).
channel_idstringThe store whose versions the grid edits (required unless channel_scope is all).
channel_scopestring, one of all"all" for the cross-store grid: every item with each of its store versions.
collection_lookupsbooleanCollections on one store: include leading products.
collection_master_idstringProducts only: narrow to the members of this collection on the store.
cursorstringThe next_cursor of the previous page.
default_variantbooleanProducts on one store: include the default variant.
exclude_default_variantsbooleanVariants: exclude auto default variants.
filterobjectStructured filter. A condition the server cannot apply (unknown operator, blank value on a value-taking operator, a store-scoped condition without a store) is SKIPPED rather than rejected, so verify the population before trusting a count.
groupstringOptional leading grouping key.
group_orderstring, one of asc, descGrouping direction.
group_sourcestring, one of master, projectionWhere the grouping key lives.
orderstring, one of asc, descSort direction.
page_sizeintegerRows per page (clamped to the server max).
parent_master_idstringA metaobject definition (for MetaobjectEntry) or a parent to narrow to.
product_lookupsbooleanProducts on one store: include variant names/count and collections.
projection_fieldsarray of stringchannel_scope "all": narrow each store version to these attribute keys.
publish_viewstring, one of pending-publish, errorsOne store only: narrow to the grid's "Pending publish" (saved work Shopify has not seen) or "Failures" (last publish failed on the store) view.
searchstringFree-text search.
sortstringSort field key.
sort_sourcestring, one of master, projection, master_column, projection_column, default_variantWhich side the sort key lives on: "master", "projection" (needs channel_id), "master_column" (created_at/updated_at), or "projection_column" (last_publish_at).
sort_typestring, one of string, number, dateHow sort values compare.
store_idsarray of stringRestrict by store presence to these store ids (see store_mode).
store_modestring, one of any, all, only, noneHow store_ids applies: "any" (on at least one, default), "all" (on every listed store), "only" (on exactly those), "none" (on none of them).

count_bulk_edit_rows_v1

count_bulk_edit_rows_v1pim:read

Count the items a bulk-edit population holds, with exactly the same filter arguments as list_bulk_edit_rows_v1 (paging arguments are irrelevant). Answers 504 when the count takes too long — narrow the filter.

ArgumentTypeDescription
typestring, requiredThe grid's entity type (Product, Variant, Collection, Media, Blog, Article, Page, MetaobjectEntry with parent_master_id, …).
channel_idstringThe store whose versions the grid edits (required unless channel_scope is all).
channel_scopestring, one of all"all" for the cross-store grid: every item with each of its store versions.
collection_master_idstringProducts only: narrow to the members of this collection on the store.
exclude_default_variantsbooleanVariants: exclude auto default variants.
filterobjectStructured filter. A condition the server cannot apply (unknown operator, blank value on a value-taking operator, a store-scoped condition without a store) is SKIPPED rather than rejected, so verify the population before trusting a count.
parent_master_idstringA metaobject definition (for MetaobjectEntry) or a parent to narrow to.
searchstringFree-text search.
store_idsarray of stringRestrict by store presence to these store ids (see store_mode).
store_modestring, one of any, all, only, noneHow store_ids applies: "any" (on at least one, default), "all" (on every listed store), "only" (on exactly those), "none" (on none of them).

bulk_patch_v1

bulk_patch_v1pim:write

Write up to 500 attribute edits in one call, each on one shared item ("master" + its id) or one store version ("projection" + the version id, which carries the store; translation versions included). A value is always the final string to store — an empty string clears the field; find/replace, append, and copy-from-another-store are computed by the caller (resolve cross-store reference values with resolve_references_v1 first). Validation runs per edit (numeric fields, protected keys, option tuples, price lists, reserved SEO keys) and PARTIAL SUCCESS IS NORMAL: the result lists every edit with ok or its reason, in input order. Drafts only — publish with publish_batch_v1. Refused as a whole with 409 when any target is locked by a running publish.

ArgumentTypeDescription
operationsarray of object, requiredThe edits (1–500).
  • Extended timeout. 120 s per call — the operation runs server-side orchestration or a live Shopify read.
  • Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.

export_bulk_edit_v1

export_bulk_edit_v1pim:read

Export a filtered dataset as a downloadable file returned with the result: format "csv" exports one entity type on one store (type, channel_id, columns, optional filter/search/collection_master_id/parent_master_id); format "xlsx" exports one workbook across one or more stores (channel_ids) with one worksheet per sheet (type Product, Variant, or Collection; its own columns, filter, search). The whole filtered population is exported — a file over the 8 MiB attachment budget is refused, so narrow the selection or columns. An export template's field selection (list_import_export_templates_v1) maps onto columns.

ArgumentTypeDescription
formatstring, one of csv, xlsx, requiredThe file format.
channel_idstringcsv: the store.
channel_idsarray of stringxlsx: the stores (1–50).
collection_master_idstringcsv, products: only the members of this collection.
columnsarray of objectcsv: the columns, in order.
exclude_default_variantsbooleancsv, variants: exclude auto default variants.
filterobjectStructured filter. A condition the server cannot apply (unknown operator, blank value on a value-taking operator, a store-scoped condition without a store) is SKIPPED rather than rejected, so verify the population before trusting a count.
parent_master_idstringcsv: a parent to narrow to.
searchstringcsv: free-text search.
sheetsarray of objectxlsx: the worksheets (1–20).
typestringcsv: the entity type.
  • Extended timeout. 120 s per call — the operation runs server-side orchestration or a live Shopify read.