Listar Produtos
curl --request GET \
--url https://mia-gateway.morada.ai/products \
--header 'x-morada-api-key: <api-key>'import requests
url = "https://mia-gateway.morada.ai/products"
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', 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",
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"
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")
.header("x-morada-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mia-gateway.morada.ai/products")
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{
"products": [
{
"productId": "49de5ba2-d5a5-436f-843f-5e6ab5ce530a",
"productName": "Apartamento teste",
"status": "Em Obras",
"agents": [
{
"id": 83,
"name": "Iago - Morada.ai (Staging)",
"number": "+55 11 1234-5678"
}
]
},
{
"productId": "0351db1b-3664-4a43-961e-0dc8afed1259",
"productName": "Funcao teste",
"status": "Lancamento",
"agents": []
}
],
"pagination": {
"page": 1,
"size": 10,
"totalItems": 2,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}Produtos
Listar Produtos
Lista produtos de forma paginada.
GET
/
products
Listar Produtos
curl --request GET \
--url https://mia-gateway.morada.ai/products \
--header 'x-morada-api-key: <api-key>'import requests
url = "https://mia-gateway.morada.ai/products"
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', 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",
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"
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")
.header("x-morada-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mia-gateway.morada.ai/products")
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{
"products": [
{
"productId": "49de5ba2-d5a5-436f-843f-5e6ab5ce530a",
"productName": "Apartamento teste",
"status": "Em Obras",
"agents": [
{
"id": 83,
"name": "Iago - Morada.ai (Staging)",
"number": "+55 11 1234-5678"
}
]
},
{
"productId": "0351db1b-3664-4a43-961e-0dc8afed1259",
"productName": "Funcao teste",
"status": "Lancamento",
"agents": []
}
],
"pagination": {
"page": 1,
"size": 10,
"totalItems": 2,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
}
}Authorizations
Chave de API do parceiro. Fornecida pelo time da Morada.ai.
Query Parameters
Numero da pagina (opcional, padrao: 1)
Required range:
x >= 1Quantidade de itens por pagina (opcional, padrao: 10)
Required range:
x >= 1Was this page helpful?