Tools
Entity creation
Eleven write tools that mint new entities through the same workflows the interface uses: products, variants, collections, blogs, articles and pages (with per-store versions), a product's option dimensions, store-specific versions of existing items, metafield and metaobject definitions, metaobject entries, custom-field definitions, markets and their catalogs, and duplication with its progress read. Creation normally lands as a draft. Two workflows also reach Shopify: duplication publishes the copy, and adding a product option republishes already-published store versions.
create_master_v1
create_master_v1pim:writeCreate one item as a DRAFT the way the interface does: the shared item with its attributes, then one per-store version per store in channel_ids carrying that store's attributes (channel_attributes[store id], e.g. Title, Status, Handle). A Product also gets its default variant; add option dimensions with create_product_option_v1 and further variants with type "Variant" + parent_master_id (a variant's option values are attributes named "Option: <option name>" on its per-store attributes; variants are fanned out to the parent's stores server-side). An Article needs parent_master_id = its blog. Blog, Article, and Page need the account's online-store content capability to be listed and published. A store whose version could not be created is reported in failed_channel_ids — the item still exists. Publish afterwards with publish_master_v1.
| Argument | Type | Description |
|---|---|---|
type | string, one of Product, Variant, Collection, Blog, Article, Page, required | What to create. |
attributes | object | Shared attributes, e.g. {"Internal Name": "Blue Hoodie"}. |
channel_attributes | object | Per-store attributes keyed by store id. |
channel_ids | array of string | The stores to create a version on (a Variant defaults to every store its product is on). |
parent_master_id | string | The parent: the product for a Variant, the blog for an Article. |
- 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.
create_product_option_v1
create_product_option_v1pim:writeDeclare one option dimension (Size, Color, …) on a product, per store — the initial option configuration variants need. Each store gets the option's name and values (up to three dimensions per store); existing variants on that store receive the first value, and the optional variants directives rename existing variants or mint new ones per value. Already-published stores are republished for the new dimension, which is why this tool reaches Shopify; a store that refuses it stays pending.
| Argument | Type | Description |
|---|---|---|
product_id | string, required | The product id. |
stores | object, required | The option per store, keyed by store id. |
variants | array of object | Optional variant directives: rename existing variants or mint new ones per value (the interface's option wizard shape). |
- 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.
create_projection_v1
create_projection_v1pim:writeCreate the per-store version of an existing item on one store it is not on yet — a product (its variants follow), collection, file, definition, market, catalog, blog, article, page, or metaobject entry — as a DRAFT. source_projection_id copies another store's version as the starting point (attributes adapted to the target store, references remapped, and for a collection its source definition). A variant needs its product on that store first. Publish afterwards with publish_master_v1.
| Argument | Type | Description |
|---|---|---|
channel_id | string, required | The store id. |
master_id | string, required | The item id. |
attributes | object | The new version's attributes. |
source_projection_id | string | Copy this existing store version as the starting point. |
- Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.
create_metafield_definition_v1
create_metafield_definition_v1pim:writeDefine a new metafield (namespace.key, name, Shopify type, owner type, validations, taxonomy category constraints, capability options) as a DRAFT on the selected stores. Owner types: Product, Variant, Collection, and — with the online-store content capability — Blog, Article. A definition with the same namespace.key for that owner answers 409. Publish it with publish_master_v1 before writing values to it.
| Argument | Type | Description |
|---|---|---|
key | string, required | The key. |
name | string, required | The display name. |
owner_type | string, required | Which entity carries it: Product, Variant, Collection, Blog, or Article. |
category_constraints | array of string | Taxonomy category ids the definition is constrained to (products). |
channel_ids | array of string | The stores to add the definition to. |
description | string | A description. |
namespace | string | The namespace (default "custom"). |
options | object | |
type | string | The Shopify metafield type (single_line_text_field, number_integer, list.metaobject_reference, …). |
validations | array of object | Shopify validations. |
- Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.
create_metaobject_definition_v1
create_metaobject_definition_v1pim:writeDefine a new structured-content type (a type key without spaces, a name, at least one field definition with key/name/type) as a DRAFT on the selected stores — or PIM-only when channel_ids is empty. A same-type definition answers 409. Publish it with publish_master_v1; then add records with create_metaobject_entry_v1.
| Argument | Type | Description |
|---|---|---|
field_definitions | array of object, required | The fields (at least one). |
name | string, required | The display name. |
type | string, required | The machine type key (no spaces). |
channel_ids | array of string | The stores to add the definition to (empty = PIM-only). |
description | string | A description. |
publishable | boolean | Whether entries can be published (default true). |
translatable | boolean | Whether entries are translatable. |
- Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.
create_metaobject_entry_v1
create_metaobject_entry_v1pim:writeCreate a record under a metaobject definition as a DRAFT on the given stores (each store must already carry the definition), with a name and an optional handle (derived from the name otherwise; a handle already used under the definition answers 409). Fill its fields afterwards with update_projection_attributes_v1 (keys mo:<field key>) and publish with publish_master_v1.
| Argument | Type | Description |
|---|---|---|
channel_ids | array of string, required | The stores to create the entry on (at least one). |
definition_id | string, required | The metaobject definition's id. |
name | string, required | The entry's display name. |
handle | string | The handle (defaults to a slug of the name). |
- Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.
create_custom_field_definition_v1
create_custom_field_definition_v1pim:writeDefine a new PIM-only custom field: a name, a slug (letters, digits, underscores — immutable afterwards), the entity kind it applies to (Product, Variant, Collection, Media; Blog and Article with the online-store content capability), a supported type, options for select types, a formula for the formula type, and an optional mf: target key. Values are then written per store under custom:<slug>. Never published to Shopify.
| Argument | Type | Description |
|---|---|---|
applies_to | string, one of Product, Variant, Collection, Media, Blog, Article, required | Which entity kind carries it. |
name | string, required | The field name. |
slug | string, required | The slug (starts with a letter; lowercase letters, digits, underscores). |
type | string, required | The custom-field type (text, number, select, multi_select, boolean, date, reference kinds, formula, …). |
description | string | A description. |
formula | string | The formula, for the formula type. |
options | array of string | The choices, for select types. |
target_key | string | Optional mf:<namespace>.<key> the computed value is written to. |
- Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.
create_market_v1
create_market_v1pim:writeCreate a Shopify market (name, region country codes, optional currency) as a DRAFT on the selected stores (default: every store). Publish it with publish_master_v1; then add catalogs with create_catalog_v1.
| Argument | Type | Description |
|---|---|---|
name | string, required | The market name. |
regions | array of string, required | Country codes the market covers (at least one). |
channel_ids | array of string | The stores to create the market on (default: all). |
currency | string | Optional three-letter currency code. |
- Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.
create_catalog_v1
create_catalog_v1pim:writeCreate a catalog (price list + publication) attached to a market as a DRAFT on the selected stores (default: every store the market is on): a title, a required currency, an optional percentage price adjustment, and whether it auto-publishes. The catalog's market is queued for publish; pending_publish_failed in the result means the catalog exists but the market must be published by hand — do not retry the create.
| Argument | Type | Description |
|---|---|---|
currency | string, required | Three-letter currency code. |
market_id | string, required | The market's id. |
title | string, required | The catalog title. |
auto_publish | boolean | Whether the catalog publishes automatically (default true). |
channel_ids | array of string | The stores to create it on (default: every store the market is on). |
price_adjustment | string | Optional signed percentage adjustment (e.g. "-10"). |
- Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.
duplicate_master_v1
duplicate_master_v1pim:writeDuplicate a product, collection, or metaobject entry into the selected stores with the interface's own options: a new title and handle, a product's status (default draft), whether to carry media, SKUs, barcodes, translations (default off), a collection's sources, a product's hand-picked collection memberships, and the sales-channel selection. NOTE: like the interface, the copy is PUBLISHED to the target stores as part of the duplicate — this reaches Shopify. Mint a progress_token (8–64 letters, digits, dashes) and poll get_duplicate_progress_v1 with it while the call runs. The result reports the new item, publish outcome, and what could not be carried.
| Argument | Type | Description |
|---|---|---|
id | string, required | The item to duplicate (a product, collection, or metaobject entry). |
target_channel_ids | array of string, required | The stores to duplicate into (at least one). |
include_barcodes | boolean | Keep variant barcodes (default true). |
include_collection_sources | boolean | Collections: replay the source definition (default true). |
include_collections | boolean | Products: add the copy to the collections that hand-pick the source (default true). |
include_media | boolean | Carry the media attachments (default true). |
include_sales_channels | boolean | Keep the sales-channel selection (default: products keep, collections strip). |
include_skus | boolean | Keep variant SKUs, with a copy suffix (default true). |
include_translations | boolean | Clone the translations as pending drafts (default false). |
new_handle | string | The copy's handle (slug-normalized; suffixed where taken). |
new_status | string, one of draft, active, archived | A duplicated product's status (default draft). |
new_title | string | The copy's title (default: the source title prefixed per store). |
progress_token | string | Caller-minted token to poll progress with (8–64 chars of letters, digits, dashes). |
- 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.
get_duplicate_progress_v1
get_duplicate_progress_v1pim:readRead the live step progress of an in-flight duplicate by the progress_token given to duplicate_master_v1: each step (entity, variants, images, sources, translations, publish, collections) with its status, and whether the run finished. Answers 404 until the run has started writing progress, and again once the record expires (10 minutes).
| Argument | Type | Description |
|---|---|---|
progress_token | string, required | The token passed to duplicate_master_v1. |