Fetch a Menu Tree - a hierarchical collection of records assembled from a Data Storage using parentKey and position defaults, with each node rendered through a Detail Block.
Optional starting node. When provided, items contains a single entry - the node with this key, plus its descendants. Without a key, items contains every root-level node (records with no parent).
See Headers on the overview for the full set. Trees honour fs-context, fs-domain, fs-version, and fs-secret (only when the project has fetch keys configured).
The response body wraps the tree in an items array. When called without a key, this array lists every root-level node (records with no parent); when called with one, it holds only the matching node - still wrapped in a list, for shape consistency with the unkeyed call. Each node’s subtree is carried on its own $items field.
Other fields come from the tree’s Detail Block - they vary per project. The example shown uses a block with name and a Route field called link.
A single response is capped at 1,250 nodes total. When a level wouldn’t fit within the budget, the entire level is omitted (partial levels are never returned) and a warning is included in the response header.
curl -X POST 'https://fetch-<project-token>.frontic.com/tree/<tree-slug>?key=<starting-node>&depth=2' \ -H 'fs-context: <context-key>'
fs-secret missing or wrong (only when the project has fetch keys configured)
404
Tree slug doesn’t exist, or key doesn’t match a node
422
FETCH_API_LIMIT_EXCEEDED - project’s plan limit for Fetch API requests exceeded
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Frontic Docs","description":"Frontic - an AI platform for shipping shopping experiences in a fraction of the time, with double the fun.","colors":{"primary":"#a855f7","light":"#c084fc","dark":"#8b5cf6"},"logo":{"light":"https://mintcdn.com/frontic/QEEg-J3fIyHJ_Wyh/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=QEEg-J3fIyHJ_Wyh\u0026q=85\u0026s=36391b9f3546193a73f97d7b6ee40463","dark":"https://mintcdn.com/frontic/QEEg-J3fIyHJ_Wyh/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=QEEg-J3fIyHJ_Wyh\u0026q=85\u0026s=704f0d073af32f152eab7ab9e4229a9b"},"favicon":"https://mintcdn.com/frontic/QEEg-J3fIyHJ_Wyh/logo/light.svg?fit=max\u0026auto=format\u0026n=QEEg-J3fIyHJ_Wyh\u0026q=85\u0026s=add2ba40542c32e89fccea55bbd2afbd","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"key","name":"Authorization"},"server":"https://ingest-{integration-id}.frontic.com"}},"appearance":{"default":"dark","strict":false},"navbar":{"links":[{"href":"mailto:support@frontic.com","label":"Support"},{"href":"https://www.frontic.com","label":"Website"}],"primary":{"type":"button","label":"Log In","href":"https://app.frontic.com"}},"footer":{"socials":{"github":"https://github.com/frontic","linkedin":"https://www.linkedin.com/company/102853312"},"links":[{"header":"Resources","items":[{"label":"Changelog","href":"https://frontic.com/changelog"},{"label":"Status","href":"https://status.frontic.com"}]},{"header":"Company","items":[{"label":"Website","href":"https://www.frontic.com"},{"label":"Support","href":"mailto:support@frontic.com"}]}]},"search":{"prompt":"Search Frontic docs..."},"styling":{"codeblocks":{"theme":"css-variables"},"latex":false},"integrations":{"posthog":{"apiKey":"phc_4DuVaMwZYdzCq7HW2hyorMIALyLvxWvC2STOIk8z1lr","apiHost":"https://eu.posthog.com"}},"contextual":{"options":["copy","chatgpt","claude","mcp","cursor"],"display":"header"},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"frontic","hasAudioNarration":false,"actualSubdomain":"frontic","customDomains":["docs.frontic.com"],"gitSource":{"type":"github","owner":"frontic","repo":"docs","deployBranch":"main","isPrivate":true,"contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae7c42deeb506b36f78cabb","collectionId":"1bbaa1b1-930b-4c2d-b260-45171d33ed14","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae7c42deeb506b36f78cabb"},"feedback":{"agentFeedback":true},"entitlements":{},"buildId":"6ae7c42deeb506b36f78cabb","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Documentation","count":52},{"language":"default","tag":"Connectors","count":24},{"language":"default","tag":"Reference","count":24},{"language":"default","tag":"Fetch API","count":9},{"language":"default","tag":"Build in Frontic","count":8},{"language":"default","tag":"Context Base","count":7},{"language":"default","tag":"Essentials","count":7},{"language":"default","tag":"Project Settings","count":7},{"language":"default","tag":"Ingest API","count":6},{"language":"default","tag":"API Builder","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@keyframes glow-float-1{0%,to{transform:translate(0,0) scale(1)}50%{transform:translate(30px,20px) scale(1.1)}}@keyframes glow-float-2{0%,to{transform:translate(0,0) scale(1)}50%{transform:translate(-20px,30px) scale(1.15)}}@keyframes glow-float-3{0%,to{transform:translate(0,0) scale(1)}50%{transform:translate(20px,-20px) scale(1.05)}}:root{--frontic-purple:#a042ff;--frontic-purple-secondary:#784dcb;--frontic-purple-light:#c084fc;--frontic-violet:#8b5cf6;--frontic-dark-bg:#131117}html.dark{background:#0a0a0f}html.dark body{background:0 0}html.dark body::after,html.dark body::before,html.dark::before{content:\"\";position:fixed;border-radius:50%;filter:blur(112px);opacity:.5;pointer-events:none;z-index:-1}html.dark body::before{top:-10%;left:10%;width:600px;height:600px;background:radial-gradient(circle,rgba(160,66,255,.4) 0,transparent 70%);animation:glow-float-1 8s ease-in-out infinite}html.dark body::after{top:30%;right:5%;width:500px;height:500px;background:radial-gradient(circle,rgba(120,77,203,.35) 0,transparent 70%);animation:glow-float-2 10s ease-in-out infinite}html.dark::before{bottom:10%;left:30%;width:400px;height:400px;background:radial-gradient(circle,rgba(168,85,247,.25) 0,transparent 70%);animation:glow-float-3 9s ease-in-out infinite}html:not(.dark){background:#fafafa;--mint-background:#faf5ff;--mint-foreground:#111827;--mint-color-text:#111827;--mint-color-background:#faf5ff;--mint-token-constant:#7c3aed;--mint-token-string:#059669;--mint-token-comment:#9ca3af;--mint-token-keyword:#a855f7;--mint-token-parameter:#6366f1;--mint-token-function:#8b5cf6;--mint-token-string-expression:#059669;--mint-token-punctuation:#6b7280;--mint-token-link:#a855f7}html:not(.dark) body{background:0 0}html:not(.dark) body::after,html:not(.dark) body::before{content:\"\";position:fixed;border-radius:50%;filter:blur(100px);pointer-events:none;z-index:-1}html:not(.dark) body::before{top:-10%;left:10%;width:600px;height:600px;background:radial-gradient(circle,rgba(160,66,255,.15) 0,transparent 70%);animation:glow-float-1 8s ease-in-out infinite}html:not(.dark) body::after{top:40%;right:5%;width:500px;height:500px;background:radial-gradient(circle,rgba(120,77,203,.12) 0,transparent 70%);animation:glow-float-2 10s ease-in-out infinite}.prose,[class*=content],body,main,nav:not([class*=top]){background:0 0!important}html.dark #sidebar{background:linear-gradient(180deg,rgba(160,66,255,.03) 0,transparent 100%)!important}#sidebar,#sidebar-content{box-shadow:none!important}html.dark header,html.dark nav{border-bottom-color:rgba(160,66,255,.1)!important}html.dark .code-group{border-top:1px solid rgba(160,66,255,.15)!important;border-radius:8px!important}html:not(.dark) .code-group{border:1px solid rgba(160,66,255,.1)!important;border-radius:8px!important;background-color:#faf5ff!important;color:#111827!important}pre{border:0!important}html.dark{--mint-background:#1a1625;--mint-foreground:#e5e7eb;--mint-color-text:#e5e7eb;--mint-color-background:#1a1625;--mint-token-constant:#c4b5fd;--mint-token-string:#6ee7b7;--mint-token-comment:#6b7280;--mint-token-keyword:#c084fc;--mint-token-parameter:#a5b4fc;--mint-token-function:#a78bfa;--mint-token-string-expression:#6ee7b7;--mint-token-punctuation:#9ca3af;--mint-token-link:#c084fc}html:not(.dark) :not(pre)>code{background-color:rgba(160,66,255,.08)!important;color:#6b21a8!important}html:not(.dark) .code-group [role=tab][aria-selected=true],html:not(.dark) .codeblock-dark [role=tab][aria-selected=true],html:not(.dark) button[aria-label*=opy] svg{color:#7c3aed!important}html:not(.dark) .code-group [role=tab]{color:#6b7280!important}html:not(.dark) .code-group [role=tab]:hover>div:first-child{background-color:rgba(160,66,255,.1)!important;color:#7c3aed!important}html:not(.dark) .code-group [role=tab][aria-selected=true]>div:last-child{background-color:#7c3aed!important}html:not(.dark) .codeblock-dark,html:not(.dark) .codeblock-dark [data-component-part=code-block-root]{background-color:#faf5ff!important;color:#111827!important}html:not(.dark) .codeblock-dark [data-fade-overlay=true]{--fade-color-light:#faf5ff!important;--fade-color-dark:#faf5ff!important}[role=listbox],[role=menu],[role=tooltip]{background-color:#fff!important;color:#1f2937!important;border:1px solid rgba(160,66,255,.15);border-radius:8px;box-shadow:0 12px 28px -8px rgba(0,0,0,.18);backdrop-filter:blur(8px)}html.dark [role=listbox],html.dark [role=menu],html.dark [role=tooltip]{background-color:#1a1625!important;color:#e5e7eb!important;border-color:rgba(160,66,255,.25);box-shadow:0 12px 28px -8px rgba(0,0,0,.6)}[role=tooltip] *{color:inherit!important}[class*=navbar]::after,[class*=sidebar]::after,[class*=sidebar]::before,[class*=topbar]::after,header::after,nav[class*=side]::after,nav[class*=side]::before,nav[class*=top]::after{background:0 0!important;background-image:none!important;background-color:transparent!important;display:none!important}[class*=sidebar]>div:first-child{background:0 0!important;background-color:transparent!important;background-image:none!important}#sidebar-content .sticky.top-0{background:0 0!important;background-image:none!important;background-color:transparent!important}[data-nav-tag=Preview]{color:#2563eb!important;background-color:rgba(37,99,235,.1)!important}html.dark [data-nav-tag=Preview]{color:#60a5fa!important;background-color:rgba(96,165,250,.15)!important}[data-nav-tag=New]{color:#16a34a!important;background-color:rgba(22,163,74,.1)!important}html.dark [data-nav-tag=New]{color:#4ade80!important;background-color:rgba(74,222,128,.15)!important}"}],"page":{"pagePath":"reference/fetch-api/menu-tree","slug":"/reference/fetch-api/menu-tree","pageMetadata":{"title":"Fetch a Tree","api":"POST https://fetch-{project-token}.frontic.com/tree/{slug}","playground":"simple","description":null,"href":"/reference/fetch-api/menu-tree"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Fetch a `,_jsx(_components.a,{href:`/api-builder/trees`,children:`Menu Tree`}),` - a hierarchical collection of records assembled from a `,_jsx(_components.a,{href:`/data-integration/data-storages`,children:`Data Storage`}),` using `,_jsx(_components.code,{children:`parentKey`}),` and `,_jsx(_components.code,{children:`position`}),` defaults, with each node rendered through a `,_jsx(_components.a,{href:`/api-builder/blocks`,children:`Detail Block`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`project-token`,type:`string`,required:true,id:`param-project-token`,children:_jsx(_components.p,{children:`Your project’s Fetch token, embedded in the subdomain.`})}),`\n`,_jsx(ParamField,{path:`slug`,type:`string`,required:true,id:`param-slug`,children:_jsxs(_components.p,{children:[`The tree’s slug, e.g. `,_jsx(_components.code,{children:`\u003ctree-slug>`}),`. Per project - see your tree’s detail view in the API Builder.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{query:`key`,type:`string`,id:`param-key`,children:_jsxs(_components.p,{children:[`Optional starting node. When provided, `,_jsx(_components.code,{children:`items`}),` contains a single entry - the node with this key, plus its descendants. Without a key, `,_jsx(_components.code,{children:`items`}),` contains every root-level node (records with no parent).`]})}),`\n`,_jsx(ParamField,{query:`depth`,type:`integer`,id:`param-depth`,children:_jsxs(_components.p,{children:[`Optional level limit. Controls how many levels of `,_jsx(_components.code,{children:`$items`}),` are included. Without it, all levels are returned (subject to the 1,250-node cap).`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/reference/fetch-api#headers`,children:`Headers`}),` on the overview for the full set. Trees honour `,_jsx(_components.code,{children:`fs-context`}),`, `,_jsx(_components.code,{children:`fs-domain`}),`, `,_jsx(_components.code,{children:`fs-version`}),`, and `,_jsx(_components.code,{children:`fs-secret`}),` (only when the project has fetch keys configured).`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`The response body wraps the tree in an `,_jsx(_components.code,{children:`items`}),` array. When called without a `,_jsx(_components.code,{children:`key`}),`, this array lists every root-level node (records with no parent); when called with one, it holds only the matching node - still wrapped in a list, for shape consistency with the unkeyed call. Each node’s subtree is carried on its own `,_jsx(_components.code,{children:`$items`}),` field.`]}),`\n`,_jsxs(ResponseField,{name:`items`,type:`array`,required:true,id:`param-items`,children:[_jsx(_components.p,{children:`The tree’s top-level nodes.`}),_jsxs(Expandable,{title:`Node properties`,children:[_jsx(ParamField,{path:`key`,type:`string`,required:true,id:`param-key-1`,children:_jsx(_components.p,{children:`The node’s identifier, taken from the storage record’s primary field.`})}),_jsx(ParamField,{path:`$items`,type:`array`,required:true,id:`param-items-1`,children:_jsx(_components.p,{children:`Child nodes, same shape as the parent. Empty on leaves.`})}),_jsx(ParamField,{path:`...`,type:`any`,id:`param`,children:_jsxs(_components.p,{children:[`Other fields come from the tree’s `,_jsx(_components.a,{href:`/api-builder/blocks`,children:`Detail Block`}),` - they vary per project. The example shown uses a block with `,_jsx(_components.code,{children:`name`}),` and a `,_jsx(_components.a,{href:`/api-builder/blocks#route`,children:`Route field`}),` called `,_jsx(_components.code,{children:`link`}),`.`]})})]})]}),`\n`,_jsxs(_components.p,{children:[`A single response is capped at `,_jsx(_components.strong,{children:`1,250 nodes total`}),`. When a level wouldn’t fit within the budget, the entire level is omitted (partial levels are never returned) and a warning is included in the response header.`]}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`status-codes`,children:`Status codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`200`})}),_jsx(_components.td,{children:`Tree (or subtree) returned`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fs-secret`}),` missing or wrong (only when the project has fetch keys configured)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsxs(_components.td,{children:[`Tree slug doesn’t exist, or `,_jsx(_components.code,{children:`key`}),` doesn’t match a node`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FETCH_API_LIMIT_EXCEEDED`}),` - project’s plan limit for Fetch API requests exceeded`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"css-variables"},"config":{},"pageMetadata":{"title":"Fetch a Tree","api":"POST https://fetch-{project-token}.frontic.com/tree/{slug}","playground":"simple","description":null,"href":"/reference/fetch-api/menu-tree"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Fetch a `,_jsx(_components.a,{href:`/api-builder/trees`,children:`Menu Tree`}),` - a hierarchical collection of records assembled from a `,_jsx(_components.a,{href:`/data-integration/data-storages`,children:`Data Storage`}),` using `,_jsx(_components.code,{children:`parentKey`}),` and `,_jsx(_components.code,{children:`position`}),` defaults, with each node rendered through a `,_jsx(_components.a,{href:`/api-builder/blocks`,children:`Detail Block`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`project-token`,type:`string`,required:true,id:`param-project-token`,children:_jsx(_components.p,{children:`Your project’s Fetch token, embedded in the subdomain.`})}),`\n`,_jsx(ParamField,{path:`slug`,type:`string`,required:true,id:`param-slug`,children:_jsxs(_components.p,{children:[`The tree’s slug, e.g. `,_jsx(_components.code,{children:`\u003ctree-slug>`}),`. Per project - see your tree’s detail view in the API Builder.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{query:`key`,type:`string`,id:`param-key`,children:_jsxs(_components.p,{children:[`Optional starting node. When provided, `,_jsx(_components.code,{children:`items`}),` contains a single entry - the node with this key, plus its descendants. Without a key, `,_jsx(_components.code,{children:`items`}),` contains every root-level node (records with no parent).`]})}),`\n`,_jsx(ParamField,{query:`depth`,type:`integer`,id:`param-depth`,children:_jsxs(_components.p,{children:[`Optional level limit. Controls how many levels of `,_jsx(_components.code,{children:`$items`}),` are included. Without it, all levels are returned (subject to the 1,250-node cap).`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/reference/fetch-api#headers`,children:`Headers`}),` on the overview for the full set. Trees honour `,_jsx(_components.code,{children:`fs-context`}),`, `,_jsx(_components.code,{children:`fs-domain`}),`, `,_jsx(_components.code,{children:`fs-version`}),`, and `,_jsx(_components.code,{children:`fs-secret`}),` (only when the project has fetch keys configured).`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`The response body wraps the tree in an `,_jsx(_components.code,{children:`items`}),` array. When called without a `,_jsx(_components.code,{children:`key`}),`, this array lists every root-level node (records with no parent); when called with one, it holds only the matching node - still wrapped in a list, for shape consistency with the unkeyed call. Each node’s subtree is carried on its own `,_jsx(_components.code,{children:`$items`}),` field.`]}),`\n`,_jsxs(ResponseField,{name:`items`,type:`array`,required:true,id:`param-items`,children:[_jsx(_components.p,{children:`The tree’s top-level nodes.`}),_jsxs(Expandable,{title:`Node properties`,children:[_jsx(ParamField,{path:`key`,type:`string`,required:true,id:`param-key-1`,children:_jsx(_components.p,{children:`The node’s identifier, taken from the storage record’s primary field.`})}),_jsx(ParamField,{path:`$items`,type:`array`,required:true,id:`param-items-1`,children:_jsx(_components.p,{children:`Child nodes, same shape as the parent. Empty on leaves.`})}),_jsx(ParamField,{path:`...`,type:`any`,id:`param`,children:_jsxs(_components.p,{children:[`Other fields come from the tree’s `,_jsx(_components.a,{href:`/api-builder/blocks`,children:`Detail Block`}),` - they vary per project. The example shown uses a block with `,_jsx(_components.code,{children:`name`}),` and a `,_jsx(_components.a,{href:`/api-builder/blocks#route`,children:`Route field`}),` called `,_jsx(_components.code,{children:`link`}),`.`]})})]})]}),`\n`,_jsxs(_components.p,{children:[`A single response is capped at `,_jsx(_components.strong,{children:`1,250 nodes total`}),`. When a level wouldn’t fit within the budget, the entire level is omitted (partial levels are never returned) and a warning is included in the response header.`]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`curl`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`curl`}),_jsx(_components.span,{style:{color:`var(--mint-token-string, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string, #297a3a)`},children:` -X`}),_jsx(_components.span,{style:{color:`var(--mint-token-string, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string, #297a3a)`},children:` POST`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'https://fetch-\u003cproject-token>.frontic.com/tree/\u003ctree-slug>?key=\u003cstarting-node>\u0026depth=2'`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-string, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string, #297a3a)`},children:` -H`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` 'fs-context: \u003ccontext-key>'`})]}),`\n`]})})})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200 OK`,numberOfLines:`27`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`27`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"shop\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"Shop\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"link\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"shop\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"/en/shop\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"\u003cyour-shop>/en/shop\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"href\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"https://\u003cyour-shop>/en/shop\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"$items\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"women\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"Women\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"link\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"shop/women\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"/en/shop/women\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"\u003cyour-shop>/en/shop/women\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"href\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"https://\u003cyour-shop>/en/shop/women\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` \"$items\"`}),_jsx(_components.span,{style:{color:`var(--mint-token-punctuation, #171717)`,\"--shiki-dark\":`var(--mint-token-punctuation, #171717)`},children:`:`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`status-codes`,children:`Status codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`200`})}),_jsx(_components.td,{children:`Tree (or subtree) returned`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fs-secret`}),` missing or wrong (only when the project has fetch keys configured)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsxs(_components.td,{children:[`Tree slug doesn’t exist, or `,_jsx(_components.code,{children:`key`}),` doesn’t match a node`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FETCH_API_LIMIT_EXCEEDED`}),` - project’s plan limit for Fetch API requests exceeded`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"css-variables"},"config":{},"pageMetadata":{"title":"Fetch a Tree","api":"POST https://fetch-{project-token}.frontic.com/tree/{slug}","playground":"simple","description":null,"href":"/reference/fetch-api/menu-tree"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Query Parameters","slug":"query-parameters","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Status codes","slug":"status-codes","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"curl","html":"\u003cpre class=\"shiki shiki-themes css-variables css-variables\" style=\"background-color:var(--mint-background);--shiki-dark-bg:var(--mint-background);color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-function, #0068d6);--shiki-dark:var(--mint-token-function, #0068d6)\">curl\u003c/span>\u003cspan style=\"color:var(--mint-token-string, #297a3a);--shiki-dark:var(--mint-token-string, #297a3a)\"> -X\u003c/span>\u003cspan style=\"color:var(--mint-token-string, #297a3a);--shiki-dark:var(--mint-token-string, #297a3a)\"> POST\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> 'https://fetch-\u0026#x3C;project-token>.frontic.com/tree/\u0026#x3C;tree-slug>?key=\u0026#x3C;starting-node>\u0026#x26;depth=2'\u003c/span>\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-string, #297a3a);--shiki-dark:var(--mint-token-string, #297a3a)\"> -H\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> 'fs-context: \u0026#x3C;context-key>'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 OK","html":"\u003cpre class=\"shiki shiki-themes css-variables css-variables\" style=\"background-color:var(--mint-background);--shiki-dark-bg:var(--mint-background);color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"27\">\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"items\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"key\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"shop\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"name\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"Shop\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"link\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"slug\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"shop\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"path\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"/en/shop\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"url\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"\u0026#x3C;your-shop>/en/shop\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"href\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"https://\u0026#x3C;your-shop>/en/shop\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> }\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"$items\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"key\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"women\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"name\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"Women\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"link\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"slug\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"shop/women\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"path\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"/en/shop/women\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"url\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"\u0026#x3C;your-shop>/en/shop/women\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"href\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-token-string-expression, #297a3a);--shiki-dark:var(--mint-token-string-expression, #297a3a)\"> \"https://\u0026#x3C;your-shop>/en/shop/women\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> }\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-token-keyword, #bd2864);--shiki-dark:var(--mint-token-keyword, #bd2864)\"> \"$items\"\u003c/span>\u003cspan style=\"color:var(--mint-token-punctuation, #171717);--shiki-dark:var(--mint-token-punctuation, #171717)\">:\u003c/span>\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:var(--mint-foreground);--shiki-dark:var(--mint-foreground)\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Fetch a Tree","path":"/tree/{slug}","servers":[{"url":"https://fetch-{project-token}.frontic.com"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"Authorization":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{"key":{"schema":[{"type":"string","description":"Optional starting node. When provided, `items` contains a single entry - the node with this key, plus its descendants. Without a key, `items` contains every root-level node (records with no parent)."}]},"depth":{"schema":[{"type":"integer","description":"Optional level limit. Controls how many levels of `$items` are included. Without it, all levels are returned (subject to the 1,250-node cap)."}]}},"header":{},"cookie":{},"path":{"project-token":{"schema":[{"type":"string","description":"Your project’s Fetch token, embedded in the subdomain.","required":true}]},"slug":{"schema":[{"type":"string","description":"The tree’s slug, e.g. `\u003ctree-slug>` . Per project - see your tree’s detail view in the API Builder.","required":true}]}}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"items":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"The tree’s top-level nodes.","required":true}]}}],"examples":{"example":{"value":{"items":[{}]}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"frontic","siteName":"Frontic Docs","title":"Fetch a Tree - Frontic Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-01T22:42:14.440Z","originalFileLocation":"reference/fetch-api/menu-tree.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Frontic Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Fetch a Tree - Frontic Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Frontic Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.frontic.com/reference/fetch-api/menu-tree\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://frontic.mintlify.app/_mintlify/api/og/v2?division=Fetch+API\u0026amp;title=Fetch+a+Tree\u0026amp;theme=206c460697bb939e13b9c293\u0026amp;signature=6504f87627dd70ade953d88a061f5103dcba8103cce700cbd327f91ccd9274c4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Fetch a Tree - Frontic Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://frontic.mintlify.app/_mintlify/api/og/v2?division=Fetch+API\u0026amp;title=Fetch+a+Tree\u0026amp;theme=206c460697bb939e13b9c293\u0026amp;signature=6504f87627dd70ade953d88a061f5103dcba8103cce700cbd327f91ccd9274c4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/frontic/J-QaW07dTW_FQ00e/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Frontic Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#a855f7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.frontic.com/reference/fetch-api/menu-tree\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/fetch-api/menu-tree.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.frontic.com/#organization\",\"name\":\"Frontic Docs\",\"url\":\"https://docs.frontic.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/frontic/QEEg-J3fIyHJ_Wyh/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=QEEg-J3fIyHJ_Wyh\u0026q=85\u0026s=36391b9f3546193a73f97d7b6ee40463\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.frontic.com#website\",\"name\":\"Frontic Docs\",\"url\":\"https://docs.frontic.com\",\"publisher\":{\"@id\":\"https://docs.frontic.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.frontic.com/reference/fetch-api/menu-tree#webpage\",\"url\":\"https://docs.frontic.com/reference/fetch-api/menu-tree\",\"name\":\"Fetch a Tree\",\"dateModified\":\"2026-11-01T22:42:14.440Z\",\"isPartOf\":{\"@id\":\"https://docs.frontic.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.frontic.com/reference/fetch-api/menu-tree#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.frontic.com/reference/fetch-api/menu-tree#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Fetch API\",\"item\":\"https://docs.frontic.com/reference/fetch-api\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fetch a Tree\",\"item\":\"https://docs.frontic.com/reference/fetch-api/menu-tree\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.frontic.com/reference/fetch-api/menu-tree#apireference\",\"headline\":\"Fetch a Tree\",\"name\":\"Fetch a Tree\",\"url\":\"https://docs.frontic.com/reference/fetch-api/menu-tree\",\"mainEntityOfPage\":{\"@id\":\"https://docs.frontic.com/reference/fetch-api/menu-tree#webpage\"},\"dateModified\":\"2026-11-01T22:42:14.440Z\",\"publisher\":{\"@id\":\"https://docs.frontic.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.frontic.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Frontic Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Frontic Docs","nav":{"global":{},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/essentials/what-is-frontic"}]},{"tab":"Connectors","pages":[{"title":"Connectors","href":"/connectors/overview"}]},{"tab":"Reference","groups":[{"group":"Overview","pages":[{"title":"Overview","icon":"compass","href":"/reference/overview"}]},{"group":"CLI \u0026 SDKs","pages":[{"title":"Frontic CLI","icon":"terminal","href":"/reference/frontic-cli"},{"title":"Client SDK","icon":"laptop-code","href":"/reference/client-sdk"},{"title":"Nuxt Module","icon":"vuejs","href":"/reference/nuxt-module"},{"title":"Frontic UI","icon":"swatchbook","tag":"Preview","href":"/reference/frontic-ui"}]},{"group":"MCP Server","pages":[{"title":"Frontic Tools","icon":"microchip-ai","href":"/reference/mcp/frontic-tools"},{"title":"Frontic Docs","icon":"book-open","href":"/reference/mcp/frontic-docs"}]},{"group":"Data Model","pages":[{"title":"Storage Field Types","icon":"gif","href":"/reference/storage-field-types"},{"title":"Value Composer","icon":"wand-magic-sparkles","href":"/reference/value-composer"}]},{"group":"Ingest API","pages":[{"title":"Overview","icon":"book-open","href":"/reference/ingest-api"},{"title":"Upsert Record","api":"POST https://ingest-{integration-id}.frontic.com/ingest/{feed-token}/upsert","href":"/reference/ingest-api/upsert"},{"title":"Patch Record","api":"PATCH https://ingest-{integration-id}.frontic.com/ingest/{feed-token}/upsert","href":"/reference/ingest-api/patch"},{"title":"Delete Record","api":"DELETE https://ingest-{integration-id}.frontic.com/ingest/{feed-token}/delete","href":"/reference/ingest-api/delete"},{"title":"Trigger Fetch","api":"POST https://ingest-{integration-id}.frontic.com/ingest/{feed-token}/fetch","href":"/reference/ingest-api/fetch"},{"title":"Trigger Fetch List","api":"POST https://ingest-{integration-id}.frontic.com/ingest/{feed-token}/fetch-list","href":"/reference/ingest-api/fetch-list"}]},{"group":"Fetch API","pages":[{"title":"Overview","icon":"book-open","href":"/reference/fetch-api"},{"title":"Fetch a Block","api":"POST https://fetch-{project-token}.frontic.com/block/{slug}/{key}","playground":"simple","href":"/reference/fetch-api/block"},{"title":"Fetch a Listing","api":"POST https://fetch-{project-token}.frontic.com/listing/{slug}","playground":"simple","href":"/reference/fetch-api/listing"},{"title":"Fetch a Page","api":"GET https://fetch-{project-token}.frontic.com/page/{url}","playground":"simple","description":null,"href":"/reference/fetch-api/page"},{"title":"Fetch a Tree","api":"POST https://fetch-{project-token}.frontic.com/tree/{slug}","playground":"simple","href":"/reference/fetch-api/menu-tree"},{"title":"Fetch a Sitemap","api":"GET https://fetch-{project-token}.frontic.com/sitemap{index}.xml","playground":"simple","description":null,"href":"/reference/fetch-api/sitemap"},{"title":"Get Context","api":"GET https://fetch-{project-token}.frontic.com/context/token","playground":"simple","href":"/reference/fetch-api/get-context"},{"title":"List Contexts","api":"GET https://fetch-{project-token}.frontic.com/context","playground":"simple","href":"/reference/fetch-api/list-contexts"},{"title":"Update Context","api":"PATCH https://fetch-{project-token}.frontic.com/context","playground":"simple","href":"/reference/fetch-api/update-context"}]}]}]},"basePath":"","title":"Fetch a Tree - Frontic Docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js"]}