update_page
Replaces an existing page's stored source with an edited tree (source only; the published build is not refreshed). Validates first.
Instructions
Replaces an existing page's stored source with an edited tree (source only; the published build is not refreshed). Validates first. Concurrency check: the save is refused with page_changed_externally when the page was edited elsewhere since it was last read (base_version, or the version the server recorded), or with unverified_overwrite when an unverified save would delete live element ids; force:true overrides. dry_run defaults to true: it validates, caches the source under a draft_id and returns the masked request; dry_run:false saves. A draft_id from a dry run or a failed/timed-out update re-runs from the cached source. Requires Webcake credentials.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Default false. true saves even when the page changed outside this session, discarding those outside changes. | |
| source | No | The edited page source { page, popup, settings, options, cartConfigs } (object or JSON string). Required unless draft_id is given. The compacted tree from get_page can be edited and sent back AS-IS — sparse nodes are re-hydrated from factory defaults (a full tree also works). | |
| dry_run | No | Default TRUE — validate, cache the source as draft_id, and preview without sending. Set false to actually save. | |
| page_id | No | The page id to update (must be owned by the account). Required unless draft_id is given (the page_id is stored in the draft). | |
| draft_id | No | A draft_id from a previous update_page call (dry_run=true or a timed-out/failed update). Loads the cached source, so the full JSON is not re-sent; covers the dry-run → real call step and retries after a timeout. | |
| base_version | No | The page's source_version as returned by get_page. When it no longer matches the live page, the save is rejected rather than reverting edits made in the Webcake editor meanwhile. Optional — when omitted, the server uses the version it recorded at this session's last read or write of the page. |