Info Pages
List Info Pages
List every merchant info page (About us, Terms and conditions, Returns policy, Contact us, or any page the merchant writes), drafts included, in display order (`sort_order`, then oldest first). Each page carries its Markdown `body` and the `path` the portal serves it at.
Create Info Page
Create an info page at the end of the list. `title` is required; everything else is optional. A blank or omitted `slug` is made from the title (lowercase, hyphenated, never a reserved word, suffixed `-2`, `-3`… when taken). `visibility` defaults to `public` and `is_published` to false (a draft).
Update Info Page
Update an info page. Only the fields sent change, so `{'is_published': true}` alone publishes it. A blank `slug` keeps the stored one.
Delete Info Page
Delete an info page permanently. Menu and footer links to it stop resolving. An unknown page id answers 404.
Reorder Info Pages
Reorder the info pages. `ids` (required, 1–50 distinct page ids) lists pages in their new order; any page not listed keeps its relative order after them. Returns every page in the new order. An id that no longer exists answers 422.
Preview Info Page
Render a page body exactly as the portal will show it. `body` (required key, nullable, max 50,000 characters) is Markdown: raw HTML is stripped, unsafe links (e.g. `javascript:`) are dropped, and only headings (a `#` heading renders as h2), paragraphs, emphasis, lists, quotes, code, rules, tables and http/https/mailto/tel links survive. Links to a portal path (for example `[Terms](/pages/terms)`) are made absolute links into this portal, and in-page `#anchor` links are kept. An empty body returns `html: null`.
List Info Pages
List the published info pages a visitor may open, in the merchant's order: public pages for everyone, plus buyers-only pages when the request carries a valid portal buyer token (or a live staff view-as token). No token is needed; an invalid or expired token is treated as signed out, never as an error. Drafts are never listed.
Get Info Page
Get one published info page with its body rendered to sanitised HTML (never the Markdown source). A buyers-only page needs a valid portal buyer token and answers 401 (`reason: sign_in_required`) without one; an invalid or expired token is treated as signed out. A draft or unknown slug answers 404 (`reason: page_not_found`). Markdown links to a portal path (for example `[Terms](/pages/terms)`) come back as absolute links into this portal; in-page `#anchor` links are kept.