Saltar al contenido principal

Quickstart

Esta guía te lleva del cero al widget renderizado en tu tienda en 10 minutos. Sin teoría, sin internals. Copy-paste y listo.

Antes de empezar

Necesitas una sola cosa: tu Shop API Key (sk_…). Si aún no la tienes, ve a Cómo obtener tu Shop API Key (3 minutos) y vuelve aquí.

export NEUROON_API_KEY=sk_tu_clave_aqui
export NEUROON_SHOP_ID=shop_tu_id_aqui

1. Sincroniza tu primer producto

Desde tu servidor:

curl -X POST https://api.neuroon.ai/api/plugin/shops/$NEUROON_SHOP_ID/products/sync \
-H "X-Shop-API-Key: $NEUROON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"syncType": "INCREMENTAL",
"products": [{
"externalId": "demo-001",
"name": "Camiseta básica negra",
"price": 19.99,
"currency": "EUR",
"url": "https://tutienda.com/p/demo-001"
}]
}'

Respuesta (200):

{ "totalReceived": 1, "newProducts": 1, "updatedProducts": 0, "failed": 0 }

El producto está disponible para búsqueda en 2 a 5 segundos. Repite el POST con tu catálogo en lotes de hasta 500 productos.

2. Genera un Widget Token

También desde tu servidor:

curl -X POST https://api.neuroon.ai/api/shops/$NEUROON_SHOP_ID/widget-token \
-H "X-Shop-API-Key: $NEUROON_API_KEY"

Respuesta (200):

{ "token": "c2hvcF9hYmM6MTcxNTAwMDAwMDoxYTJiM2M..." }

Cachea este token en tu servidor durante 24 horas. Pasado ese tiempo, vuelve a llamar al endpoint.

3. Embebe el widget en tu tienda

En la plantilla HTML de tu tienda (cualquier framework: Next.js, Razor, PHP, Express, Rails…):

<div id="neuroon-search"></div>
<script
src="https://cdn.neuroon.ai/widget.js"
data-token="EL_TOKEN_DEL_PASO_2"
data-container="#neuroon-search"
data-theme="auto"
data-locale="es">
</script>

Sustituye EL_TOKEN_DEL_PASO_2 por la sintaxis de tu motor de plantillas.

4. Prueba

Abre tu tienda. El widget se monta dentro del contenedor #neuroon-search. Escribe "camiseta" en el cuadro de búsqueda y aparecen tus productos.

Si algo no funciona, ve a Troubleshooting.

Siguientes pasos