auto_write
theme

Saves an edit to a product page's draft: rewrite copy, reorder modules, change a layout variant or heading, or hide a mo

Changed on

Saves an edit to a product page's draft: rewrite copy, reorder modules, change a layout variant or heading, or hide a module. Send the whole modules list as the page read returned it, changed. Reviews, guarantees and related products keep the store's own data whatever is sent (only their order, heading and hidden flag move). A published page stays as it is until it is published again. A page is {modules:[...]} in reading order. Module types: highlights {items:[{icon,title,text}]}, story {variant:"alternating"|"stacked", rows:[{title,text,image?}]}, specs {items:[{label,value}]}, size_fit {text}, usage {steps:[...]}, faq {items:[{q,a}]}, gallery {variant:"grid"|"carousel", items:[{image,alt?,caption?}]} (2-12 https images), video {url, caption?} (YouTube, Vimeo or an https .mp4/.webm/.mov file), and the store-filled reviews, guarantees, pairs_with. Images and videos are supplied: a Creative Engine result, a file the merchant shares (stored first with the product page media tool, which returns the public url to use) or the merchant's own image host; story rows take an image too. Every module may carry heading and hidden:true. Plain text only.

post/api/v1/tools/product_page_update

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopestheme:write

Headers

Idempotency-Key, string

Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.

Request body

object required
product, string required

The product: its Magistry id, its Shopify id or gid, or its handle.

page, object required

The page: {modules:[...]}.

idempotency_key, string required

Required. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.

Response

Tool result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision