Skip to main content
Returns lightweight navigation metadata used to render the catalog’s sidebar and filter controls. Unlike getCatalogData, this action does not return full corte records — only the counts and brand lists needed to build navigation. Endpoint: CATALOG service Action: getNavigationData

Request

No payload required.
action
string
required
Must be "getNavigationData".

Response

status
string
required
Always "success" on success.
source
string
Indicates the data source. Either "cache" or "spreadsheet".
data
object

Example

const CATALOG_ENDPOINT = 'https://script.google.com/macros/s/AKfycbxenVjZe9C8-0RiYKLxpGfQtobRzydBke44IM4NdNNjh5VRdlB91Ce9dWvQ2xnDFXk0/exec';

const response = await fetch(CATALOG_ENDPOINT, {
  method: 'POST',
  headers: { 'Content-Type': 'text/plain' },
  body: JSON.stringify({ action: 'getNavigationData', payload: {} }),
  redirect: 'follow'
});

const result = await response.json();
if (result.status === 'success') {
  const { categoryCounts, marcas, sortedCategories } = result.data;

  // Render category tabs with counts
  sortedCategories.forEach(cat => {
    console.log(`${cat}: ${categoryCounts[cat]} records`);
  });

  // Populate brand filter dropdown
  console.log('Available makes:', marcas);
}

Build docs developers (and LLMs) love