CATALOG service
Action: getDropdownData
Request
No payload required.Must be
"getDropdownData".Response
Always
"success" on success.Retrieve all dropdown option lists used in the vehicle entry and search forms.
CATALOG service
Action: getDropdownData
"getDropdownData"."success" on success.Show dropdowns properties
"Automóviles", "Camionetas")."Toyota", "Chevrolet")."Bomba de Combustible", "Corte de Ición", "Señal al Botón", "Apertura de Puertas")."Convencional", "Push Button").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);
});
}