Navigation, Sidebars, Footers & Featured Pages

Part of the Content API. Endpoints for the pieces pages share: navigation bars, sidebars, footers and the anna-modern Featured Pages tiles.

/api/v3/content/navigation-bars/

Scopes: navigation:read / navigation:write. A site has one bar per position: top_primary, bottom_primary, top_secondary, bottom_secondary, seller_leads (some are hidden on some designs, matching the admin). Bars are read-only; edit their links.

  • GET /navigation-bars/ and GET /navigation-bars/<id>/ return {"id", "type", "label", "links": [{"id", "type", "url", "anchor_text", "nofollow", "order"}]}.
  • POST /navigation-bars/<id>/links/ adds a link (at the end, or at a zero-based order) and returns the bar.
  • PUT /navigation-bars/<id>/links/ with {"links": [...]} makes the bar’s links exactly that list, in that order. An entry with an id keeps that link (and any fields it omits), so a pure reorder is {"links": [{"id": 12}, {"id": 10}]}; entries without id are created; links not mentioned are deleted. Ids never change.
  • GET/PATCH/DELETE /navigation-bars/<id>/links/<link_id>/ edit one link. PATCH accepts order to move it.

A link is {"type": "custom"|"contact", "url", "anchor_text", "nofollow"}. custom links need url and anchor_text; a contact link renders the site’s contact link and needs neither. type defaults to custom, nofollow to false.

/api/v3/content/sidebars/

Scopes: sidebars:read / sidebars:write.

  • GET /sidebars/ (?name=, ?q=), POST /sidebars/ with {"name", "items"?}.
  • GET/PATCH/DELETE /sidebars/<id>/. Detail responses include used_by, the slugs of pages using the sidebar. PATCH accepts name and/or a full items list. The two built-in sidebars (special: true) cannot be renamed or deleted. Deleting a sidebar that pages use returns 409 unless ?force=true, which detaches it from them.
  • POST /sidebars/<id>/items/ adds an item (at the end, or at order); PUT /sidebars/<id>/items/ with {"items": [...]} reconciles the list the same way navigation links do: entries with id are kept and updated, others created, unmentioned items deleted, ids preserved.
  • GET/PATCH/DELETE /sidebars/<id>/items/<item_id>/ edit one item; PATCH accepts order to move it.

An item is one of:

{"type": "html",
 "html": "<p>Sanitized HTML</p>"}

{"type": "links",
 "header": {"text": "Featured Areas",
            "url": "/areas/"},
 "links": [
   {"url": "/areas/downtown/",
    "anchor": "Downtown"},
   {"anchor": "plain text"}],
 "columns": 2}

header is optional (or null), columns is 1 (default) or 2, and a link without url renders as plain text. PATCH on a links item keeps the parts you do not send.

Footers

/api/v3/content/footers/

Scopes: footers:read / footers:write. Blocks of HTML that pages share; footer 1 is the site default and cannot be deleted.

  • GET /footers/, POST /footers/ with {"content": "<p>...</p>"} (sanitized).
  • GET/PATCH/PUT/DELETE /footers/<id>/. Detail responses include used_by (page slugs). Deleting a footer that pages use returns 409 unless ?force=true, which detaches it.

A footer reads as {"id", "name", "default", "content"}. Attach one to a page with its footer field.

/api/v3/content/featured-pages/

The “Featured Pages” tile block on the anna-modern home page: a titled group of up to twelve tiles, attached to the home page through its tile_group. Scopes: home_page:*.

  • GET /featured-pages/, POST /featured-pages/ with {"title", "blurb"?, "tiles"?}.
  • GET/PATCH/DELETE /featured-pages/<id>/. PATCH takes title, blurb and/or a full tiles list. Deleting the group the home page uses is 409 unless ?force=true.
  • A tile’s link follows the navigation link rule (site-relative path or http/https/mailto/tel URL); image is a file URL without quotes, spaces or parentheses.
  • POST /featured-pages/<id>/tiles/ adds a tile; PUT .../tiles/ with {"tiles": [...]} reconciles the list (entries with id are kept and updated, others created, the rest deleted).
  • GET/PATCH/DELETE .../tiles/<tile_id>/ edit one tile.

A tile is {"id", "title", "link", "cta", "image"}: the name, the page path it links to, the button text, and an optional image URL.