Buscar Produtos por Nome
curl --request GET \
--url https://mia-gateway.morada.ai/products-by-name \
--header 'x-morada-api-key: <api-key>'import requests
url = "https://mia-gateway.morada.ai/products-by-name"
headers = {"x-morada-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-morada-api-key': '<api-key>'}};
fetch('https://mia-gateway.morada.ai/products-by-name', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mia-gateway.morada.ai/products-by-name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-morada-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mia-gateway.morada.ai/products-by-name"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-morada-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mia-gateway.morada.ai/products-by-name")
.header("x-morada-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mia-gateway.morada.ai/products-by-name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-morada-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"term": "\"imovel teste\"",
"products": [
{
"id": "84320188-1452-4fe8-900e-3bca9d46fb6c",
"name": "[21] imovel teste",
"description": "teste",
"similarityScore": 1
}
],
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}Produtos
Buscar Produto por Nome
Pesquisa produtos pelo nome utilizando fuzzy search, possibilitando encontrar resultados mesmo com variacoes, erros de digitacao ou correspondencias parciais. A consulta e paginada.
GET
/
products-by-name
Buscar Produtos por Nome
curl --request GET \
--url https://mia-gateway.morada.ai/products-by-name \
--header 'x-morada-api-key: <api-key>'import requests
url = "https://mia-gateway.morada.ai/products-by-name"
headers = {"x-morada-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-morada-api-key': '<api-key>'}};
fetch('https://mia-gateway.morada.ai/products-by-name', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mia-gateway.morada.ai/products-by-name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-morada-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mia-gateway.morada.ai/products-by-name"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-morada-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mia-gateway.morada.ai/products-by-name")
.header("x-morada-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mia-gateway.morada.ai/products-by-name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-morada-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"term": "\"imovel teste\"",
"products": [
{
"id": "84320188-1452-4fe8-900e-3bca9d46fb6c",
"name": "[21] imovel teste",
"description": "teste",
"similarityScore": 1
}
],
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}Authorizations
Chave de API do parceiro. Fornecida pelo time da Morada.ai.
Query Parameters
Termo de busca para o nome do produto (fuzzy search)
Numero da pagina (opcional, padrao: 1)
Required range:
x >= 1Quantidade de itens por pagina (opcional, padrao: 10)
Required range:
x >= 1Was this page helpful?