cURL
curl --request GET \ --url https://api.example.com/search
{ "products": [ { "_id": "<string>", "brand": "<string>", "name": "<string>", "stock": 123, "price": 123, "normalizedName": "<string>" } ] }
curl "http://localhost:3000/search?q=mouse" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"
{ "products": [ { "_id": "507f1f77bcf86cd799439011", "brand": "TechCorp", "name": "Wireless Mouse", "stock": 150, "price": 29.99, "normalizedName": "wireless mouse" }, { "_id": "507f1f77bcf86cd799439013", "brand": "GameTech", "name": "Gaming Mouse RGB", "stock": 85, "price": 59.99, "normalizedName": "gaming mouse rgb" } ] }
{ "message": "⚠️ No se encontraron productos..." }
{ "message": "❌ Error al buscar productos...", "error": "Search query failed" }