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:write

Create 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.

ArgumentTypeDescription
typestring, one of Product, Variant, Collection, Blog, Article, Page, requiredWhat to create.
attributesobjectShared attributes, e.g. {"Internal Name": "Blue Hoodie"}.
channel_attributesobjectPer-store attributes keyed by store id.
channel_idsarray of stringThe stores to create a version on (a Variant defaults to every store its product is on).
parent_master_idstringThe 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:write

Declare 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.

ArgumentTypeDescription
product_idstring, requiredThe product id.
storesobject, requiredThe option per store, keyed by store id.
variantsarray of objectOptional 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:write

Create 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.

ArgumentTypeDescription
channel_idstring, requiredThe store id.
master_idstring, requiredThe item id.
attributesobjectThe new version's attributes.
source_projection_idstringCopy 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:write

Define 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.

ArgumentTypeDescription
keystring, requiredThe key.
namestring, requiredThe display name.
owner_typestring, requiredWhich entity carries it: Product, Variant, Collection, Blog, or Article.
category_constraintsarray of stringTaxonomy category ids the definition is constrained to (products).
channel_idsarray of stringThe stores to add the definition to.
descriptionstringA description.
namespacestringThe namespace (default "custom").
optionsobject
typestringThe Shopify metafield type (single_line_text_field, number_integer, list.metaobject_reference, …).
validationsarray of objectShopify validations.
  • Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.

create_metaobject_definition_v1

create_metaobject_definition_v1pim:write

Define 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.

ArgumentTypeDescription
field_definitionsarray of object, requiredThe fields (at least one).
namestring, requiredThe display name.
typestring, requiredThe machine type key (no spaces).
channel_idsarray of stringThe stores to add the definition to (empty = PIM-only).
descriptionstringA description.
publishablebooleanWhether entries can be published (default true).
translatablebooleanWhether entries are translatable.
  • Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.

create_metaobject_entry_v1

create_metaobject_entry_v1pim:write

Create 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.

ArgumentTypeDescription
channel_idsarray of string, requiredThe stores to create the entry on (at least one).
definition_idstring, requiredThe metaobject definition's id.
namestring, requiredThe entry's display name.
handlestringThe 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:write

Define 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.

ArgumentTypeDescription
applies_tostring, one of Product, Variant, Collection, Media, Blog, Article, requiredWhich entity kind carries it.
namestring, requiredThe field name.
slugstring, requiredThe slug (starts with a letter; lowercase letters, digits, underscores).
typestring, requiredThe custom-field type (text, number, select, multi_select, boolean, date, reference kinds, formula, …).
descriptionstringA description.
formulastringThe formula, for the formula type.
optionsarray of stringThe choices, for select types.
target_keystringOptional 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:write

Create 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.

ArgumentTypeDescription
namestring, requiredThe market name.
regionsarray of string, requiredCountry codes the market covers (at least one).
channel_idsarray of stringThe stores to create the market on (default: all).
currencystringOptional three-letter currency code.
  • Drafts only. Changes land in Peak PIM; nothing reaches Shopify until a publish.

create_catalog_v1

create_catalog_v1pim:write

Create 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.

ArgumentTypeDescription
currencystring, requiredThree-letter currency code.
market_idstring, requiredThe market's id.
titlestring, requiredThe catalog title.
auto_publishbooleanWhether the catalog publishes automatically (default true).
channel_idsarray of stringThe stores to create it on (default: every store the market is on).
price_adjustmentstringOptional 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:write

Duplicate 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.

ArgumentTypeDescription
idstring, requiredThe item to duplicate (a product, collection, or metaobject entry).
target_channel_idsarray of string, requiredThe stores to duplicate into (at least one).
include_barcodesbooleanKeep variant barcodes (default true).
include_collection_sourcesbooleanCollections: replay the source definition (default true).
include_collectionsbooleanProducts: add the copy to the collections that hand-pick the source (default true).
include_mediabooleanCarry the media attachments (default true).
include_sales_channelsbooleanKeep the sales-channel selection (default: products keep, collections strip).
include_skusbooleanKeep variant SKUs, with a copy suffix (default true).
include_translationsbooleanClone the translations as pending drafts (default false).
new_handlestringThe copy's handle (slug-normalized; suffixed where taken).
new_statusstring, one of draft, active, archivedA duplicated product's status (default draft).
new_titlestringThe copy's title (default: the source title prefixed per store).
progress_tokenstringCaller-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:read

Read 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).

ArgumentTypeDescription
progress_tokenstring, requiredThe token passed to duplicate_master_v1.