Pages and menus
Sellers write their site’s own pages (about us, guides to a destination, help) in the portal, in each of the site’s languages, and arrange its menus. Your site renders them.
A page
Section titled “A page”GET /v1/public/page takes the page’s slug, which may have slashes
(guides/abu-dhabi), and a locale. A page not published in that language
comes in the site’s default; locale in the answer says which.
curl "https://api.stg.vacationpackagesoman.com/v1/public/page?slug=about&locale=en" \ -H "Tp-Publishable-Key: $TP_KEY"const res = await fetch("https://api.stg.vacationpackagesoman.com/v1/public/page?slug=about&locale=en", { headers: { "Tp-Publishable-Key": process.env.TP_KEY!, },})const answer = await res.json()Answer: 200 OK
{ "id": "2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d", "slug": "about", "locale": "en", "title": "About us", "sections": [ { "type": "hero", "title": "About tourpingo demo", "subtitle": "Invented trips for trying tourpingo's API", "image": null }, { "type": "text", "body": "## Who we are\n\nNobody: tourpingo demo is a made-up seller, for trying the API. A real seller writes this part in the portal, in Markdown." } ], "seo": { "meta_title": "About tourpingo demo", "meta_description": null, "canonical_url": null, "noindex": false }, "updated_at": "2026-09-30T08:12:00.000Z"}A page is a list of sections, each with its type:
type |
What to render |
|---|---|
hero |
A large title and subtitle over an optional photo. |
text |
body, in Markdown. |
trips |
A heading and some of the seller’s trips, in order. |
photo |
A photo with its alt text and an optional caption. |
faq |
Questions and answers. |
cta |
A button: label, and where it goes (href). |
Treat a section type you don’t know as one to skip: more may come. Render
body with a Markdown library that escapes HTML.
seo has the page’s meta_title, meta_description, canonical_url and
noindex; see SEO.
Every page
Section titled “Every page”GET /v1/public/pages lists the published pages by slug, with when each
last changed, for your sitemap. Pages asking search engines not to list
them are left out.
curl "https://api.stg.vacationpackagesoman.com/v1/public/pages" \ -H "Tp-Publishable-Key: $TP_KEY"const res = await fetch("https://api.stg.vacationpackagesoman.com/v1/public/pages", { headers: { "Tp-Publishable-Key": process.env.TP_KEY!, },})const answer = await res.json()Answer: 200 OK
{ "data": [ { "slug": "about", "updated_at": "2026-09-30T08:12:00.000Z" }, { "slug": "guides/abu-dhabi", "updated_at": "2026-09-21T14:40:00.000Z" } ]}GET /v1/public/menus has the header and footer menus in the language
asked for, each link an address on your site (href) with its children.
Links to a page or trip that isn’t published are left out.
curl "https://api.stg.vacationpackagesoman.com/v1/public/menus?locale=en" \ -H "Tp-Publishable-Key: $TP_KEY"const res = await fetch("https://api.stg.vacationpackagesoman.com/v1/public/menus?locale=en", { headers: { "Tp-Publishable-Key": process.env.TP_KEY!, },})const answer = await res.json()Answer: 200 OK
[ { "location": "header", "items": [ { "label": "Desert safaris", "href": "/en/trips?category=desert-safari", "children": [] }, { "label": "About us", "href": "/en/about", "children": [] } ] }, { "location": "footer", "items": [ { "label": "Help", "href": "/en/help", "children": [ { "label": "Refunds", "href": "/en/help#refunds" } ] } ] }]