Skip to main content
Returns the controlled vocabulary lists used to populate form dropdowns throughout the GPSpedia UI — including categories, makes, cut types, ignition types, and relay configurations. Endpoint: CATALOG service Action: getDropdownData

Request

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

Response

status
string
required
Always "success" on success.
dropdowns
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: 'getDropdownData', payload: {} }),
  redirect: 'follow'
});

const result = await response.json();
if (result.status === 'success') {
  const { categoria, marca, tipoDeCorte, tipoDeEncendido, configRelay } = result.dropdowns;

  // Populate a <select> element
  const select = document.getElementById('marca-select');
  marca.forEach(m => {
    const option = document.createElement('option');
    option.value = m;
    option.textContent = m;
    select.appendChild(option);
  });
}

Build docs developers (and LLMs) love