Actions13
Category → Get Tree
AI-generatedSummary
Fetch a category tree up to a specified depth
Inputs
- levels — Number of category levels to retrieve
Output shape
A hierarchical JSON object representing the category tree
The response contains nested category objects up to the configured depth; defaults to 3 levels when not set; errors are returned as standard VTEX error envelopes.
Examples
Example 1: Get the first three levels of the category tree
Resource = Category, Operation = Get Tree, Levels = 3 (default)
Example 2: Retrieve a deeper hierarchy of five levels
Resource = Category, Operation = Get Tree, Levels = 5
Example 3: Use the default depth to fetch the category tree
Resource = Category, Operation = Get Tree, Levels = (default 3)