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:readRead 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.
| Argument | Type | Description |
|---|---|---|
type | string, required | The grid's entity type (Product, Variant, Collection, Media, Blog, Article, Page, MetaobjectEntry with parent_master_id, …). |
channel_id | string | The store whose versions the grid edits (required unless channel_scope is all). |
channel_scope | string, one of all | "all" for the cross-store grid: every item with each of its store versions. |
collection_lookups | boolean | Collections on one store: include leading products. |
collection_master_id | string | Products only: narrow to the members of this collection on the store. |
cursor | string | The next_cursor of the previous page. |
default_variant | boolean | Products on one store: include the default variant. |
exclude_default_variants | boolean | Variants: exclude auto default variants. |
filter | object | Structured 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. |
group | string | Optional leading grouping key. |
group_order | string, one of asc, desc | Grouping direction. |
group_source | string, one of master, projection | Where the grouping key lives. |
order | string, one of asc, desc | Sort direction. |
page_size | integer | Rows per page (clamped to the server max). |
parent_master_id | string | A metaobject definition (for MetaobjectEntry) or a parent to narrow to. |
product_lookups | boolean | Products on one store: include variant names/count and collections. |
projection_fields | array of string | channel_scope "all": narrow each store version to these attribute keys. |
publish_view | string, one of pending-publish, errors | One store only: narrow to the grid's "Pending publish" (saved work Shopify has not seen) or "Failures" (last publish failed on the store) view. |
search | string | Free-text search. |
sort | string | Sort field key. |
sort_source | string, one of master, projection, master_column, projection_column, default_variant | Which side the sort key lives on: "master", "projection" (needs channel_id), "master_column" (created_at/updated_at), or "projection_column" (last_publish_at). |
sort_type | string, one of string, number, date | How sort values compare. |
store_ids | array of string | Restrict by store presence to these store ids (see store_mode). |
store_mode | string, one of any, all, only, none | How 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:readCount 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.
| Argument | Type | Description |
|---|---|---|
type | string, required | The grid's entity type (Product, Variant, Collection, Media, Blog, Article, Page, MetaobjectEntry with parent_master_id, …). |
channel_id | string | The store whose versions the grid edits (required unless channel_scope is all). |
channel_scope | string, one of all | "all" for the cross-store grid: every item with each of its store versions. |
collection_master_id | string | Products only: narrow to the members of this collection on the store. |
exclude_default_variants | boolean | Variants: exclude auto default variants. |
filter | object | Structured 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_id | string | A metaobject definition (for MetaobjectEntry) or a parent to narrow to. |
search | string | Free-text search. |
store_ids | array of string | Restrict by store presence to these store ids (see store_mode). |
store_mode | string, one of any, all, only, none | How 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:writeWrite 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.
| Argument | Type | Description |
|---|---|---|
operations | array of object, required | The 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:readExport 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.
| Argument | Type | Description |
|---|---|---|
format | string, one of csv, xlsx, required | The file format. |
channel_id | string | csv: the store. |
channel_ids | array of string | xlsx: the stores (1–50). |
collection_master_id | string | csv, products: only the members of this collection. |
columns | array of object | csv: the columns, in order. |
exclude_default_variants | boolean | csv, variants: exclude auto default variants. |
filter | object | Structured 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_id | string | csv: a parent to narrow to. |
search | string | csv: free-text search. |
sheets | array of object | xlsx: the worksheets (1–20). |
type | string | csv: the entity type. |
- Extended timeout. 120 s per call — the operation runs server-side orchestration or a live Shopify read.