Skip to content

Your store

Every business has one site: its booking page, and its online store once something is for sale online. You edit a draft (pages, brand kit, menus). Nobody sees it until you publish. Tuppence then checks every block and every sentence, freezes the result as the next version and puts it live. Any earlier version can go live again.

  1. Edit the draftPOST /v1/sites/{id}/pages/{page}
  2. PublishPOST /v1/sites/{id}/publish
  3. Liveversion N, store.site_published
  4. Go back…/versions/{n}/revert
Terminal window
curl -sS https://api.tuppence.ai/v1/sites \
-H "Authorization: Bearer $TUPPENCE_SECRET_KEY"

The site is made from your booking page the first time anyone asks, so there is always one. published_version is what the public sees (null before the first publish).

A page has a kind (home, page, product_template, collection_template, cart, checkout, order_status, links or not_found), a title and up to 80 blocks. A page also has a slug (/pages/about-us) and may have its own path (/about).

Terminal window
curl -sS https://api.tuppence.ai/v1/sites/site_…/pages \
-H "Authorization: Bearer $TUPPENCE_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"kind": "page", "slug": "about-us", "path": "/about", "title": "About us",
"blocks": [{"id": "intro", "type": "rich_text",
"props": {"body": [{"type": "paragraph", "content": [{"text": "Made by hand in Whitby."}]}]}}]}'

POST /v1/sites/{id}/pages/{page} changes a draft page (only the fields you send). POST /v1/sites/{id} changes the site’s brand kit and navigation (its header and footer links). All of these change the draft only.

A path the store uses itself (/cart, /checkout, /products/…, /mcp and the like) is refused with the path it clashes with.

POST /v1/sites/{id}/preview_token answers a token and a url, shown once. The URL opens the draft as it is now, never cached and never indexed. Minting another token retires the last.

Terminal window
curl -sS https://api.tuppence.ai/v1/sites/site_…/publish \
-H "Authorization: Bearer $TUPPENCE_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"note": "Spring range"}'

Before anything goes live, Tuppence checks:

CheckRefused with
Every block against its own rules, prices shown all-in among them400, naming the page and the block
Every sentence against your products’ facts (a claim needs evidence)409, naming the sentence, with a link to its block
The version fits in 2 MB400, naming the biggest page

A refused publish changes nothing. Once it passes, the draft is frozen as version N, goes live, and store.site_published is sent. The first publish with a product online also opens the store, and / becomes its home.

POST /v1/sites/{id}/schedule with at (unix seconds, up to a year ahead) checks and freezes the draft now and puts it live at that time. DELETE /v1/sites/{id}/schedule cancels it.

GET /v1/sites/{id}/versions lists every version with live and scheduled_at. POST /v1/sites/{id}/versions/{version}/revert (by id or number) puts an earlier version live again, exactly as it was. The draft is not changed.

Each publish is also on your change history (GET /v1/change_sets?object_type=site), and undoing it puts the version before back live. Once the site has been published again since, the undo is refused with 409 change_set_conflict.

The same steps are tools over MCP and actions for the Tuppence Assistant: get_site, list_site_versions, update_site_page, update_brand_kit, update_navigation, publish_site, schedule_site and revert_site. Edits go to the draft, so nothing an agent writes is live until publish_site. In the assistant, publishing always asks first and shows what changes, page by page.

No tool deletes the site, changes its domains, its trader details or its payment methods. A person does those in the dashboard.

EventWhen
store.site_updatedThe site’s own fields changed
store.site_publishedA version went live (a publish, or a schedule’s time)
store.site_scheduledA publish was scheduled
store.site_revertedAn earlier version went live again

For developers:

For the people who run the store, the help centre’s online store guides:

Docs assistant

Open as a page
Loading the assistant…