Endpointy (přehled)
Base: https://api.contenta.cz/api/v1/public/sites/<slug>. Hlavička X-Site-Key. Envelope { data }
(u seznamů { data, meta:{nextCursor,hasMore} }).
Čtení (GET)
Sekce “Čtení (GET)”| Endpoint | Vrací — klíčová pole |
|---|---|
/site-config | brand, theme, hero, services, about, gallery, menu, footer, nav[], pages[], modules[], urlPaths, settings, turnstileSiteKey |
/posts · /posts/:slug | slug, title, perex, coverSrc, coverAlt, date, category{slug,name}, author{slug,name,role,photoSrc}; detail navíc bodyHtml, coverInDetail, seo |
/categories | slug, name, href, tagline, description, postCount, accent |
/authors · /authors/:slug | slug, name, role, photoUrl, initials, tagline, bioHtml, credentials[]; detail navíc posts[] |
/glossary/terms · …/:slug | slug, term, aliases[], shortDef, category{slug,name}; detail longDefHtml, sourceUrl, relatedTermSlugs[] |
/glossary/categories | kategorie pojmů |
/pages · /pages/:slug | slug, href, title, updatedAt; detail perex, sections[{title,bodyHtml}], seo |
/jobs · /jobs/:slug | slug, title, perex, jobType, employment, location, remote, status; detail bodyHtml, requirements[], offers[], compensation, contactEmail |
/comments?postSlug= | { count, comments[{ id, authorName, body, isStaff, createdAt, replies[] }] } |
/search-index | agregát všech kindů pro klientský fulltext |
/redirects | přesměrování (na edge / _redirects) |
Redakční (profil EDITORIAL): /articles(/:slug), /magazine(/:slug), /interviews(/:slug),
/eshops(/:slug), /brands(/:slug), /updates.
Odeslání (POST)
Sekce “Odeslání (POST)”| Endpoint | Pole (výběr) |
|---|---|
/comments | postSlug, authorName, authorEmail, body, parentId?, website |
/forms/contact | name, email, subject?, body(≥10), website? |
/forms/lead | name, email, phone?, company?, message(≥10), consent:true, turnstileToken?, website? |
/forms/newsletter | email, consent:true, website? |
/forms/job-application | name, email, jobSlug, message, consent:true, website? |
/forms/error-report | articleSlug, body(≥10), email?, page?, website? |
Tělo obsahu
Sekce “Tělo obsahu”bodyHtml a sections[].bodyHtml jsou vždy hotové, sanitizované HTML → set:html. Nemusíš
parsovat žádné bloky.