Dim marcaFilter As List
' marcaFilter = Array As String("España", "Lanco", "Holcim") ' uncomment this line if you want to filter results by Marca
Wait For (ApiCall("cemento", 10, "Products_Descrip_asc", marcaFilter)) complete (Result As Map)
Dim hits As List = Result.Get("hits")
If hits.Size > 0 Then
For Each m As Map In hits
' You can extract as much information as you need.
' Sample data:
' {
' "Descripcion":"Cemento gris Fuerte saco 50 kg Holcim",
' "Articulo":"04421",
' "CodBarras":"7441086600006",
' "Departamento":"Obra Gris",
' "Categoria":"Obra Gris > Cemento",
' "Subcategoria":"Cemento Gris",
' "Marca":"Holcim",
' "Otros":"Gris",
' "Image":"https://www.construplaza.com/Content/Thumbnails/04421.png",
' "Precio":6450.00000026,
' "PrecioDescuento":6450.0,
' "Descuento":0.0,
' "TieneDescuento":False,
' "Unidad":"unidad",
' "MultiploVenta":1.0,
' "OrdenMinima":1.0,
' "Frecuencia":3461,
' "MontoRank":602901370.678194,
' "Ribbon":Null,
' "Origen":0,
' "objectID":"04421",
' "_highlightResult":{
' "Descripcion":{
' "value":"__ais-highlight__Cemento__/ais-highlight__ gris Fuerte saco 50 kg Holcim",
' "matchLevel":"full",
' "fullyHighlighted":False,
' "matchedWords":[
' "cemento"
' ]
' },
' "Articulo":{
' "value":"04421",
' "matchLevel":"none",
' "matchedWords":[
'
' ]
' },
' "CodBarras":{
' "value":"7441086600006",
' "matchLevel":"none",
' "matchedWords":[
'
' ]
' },
' "Marca":{
' "value":"Holcim",
' "matchLevel":"none",
' "matchedWords":[
'
' ]
' }
' }
' }
LogColor($"Foto: ${m.Get("Image")}"$, Colors.Blue)
LogColor($"Marca: ${m.Get("Marca")}"$, Colors.Magenta)
LogColor($"Desc: ${m.Get("Descripcion")}"$, Colors.Black)
LogColor($"Price: ${m.Get("Precio")}"$, Colors.Blue)
LogColor($"Price (without fractions): $1.0{m.Get("Precio")}"$, Colors.Blue)
Log("--------------------------------------")
Next
Else
Log("No data found")
End If