Buscar estabelecimentos por CNPJ
curl --request GET \
--url https://api.malvo.io/merchants \
--header 'X-API-KEY: <api-key>'const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.malvo.io/merchants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.malvo.io/merchants"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.malvo.io/merchants",
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-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"foundMerchants": [
{
"businessName": "BANCO EXEMPLO S.A.",
"cnpj": "00000000000191",
"name": "BANCO DO BRASIL",
"cnae": "6422100",
"category": "Banking"
}
],
"notFoundMerchants": [],
"invalidCnpjs": []
}{
"code": 400,
"message": "cnpjs should not be null or undefined"
}{
"code": 500,
"codeDescription": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error"
}Merchants
Buscar estabelecimentos por CNPJ
Resolve uma lista de CNPJs em registros de estabelecimento. Cada CNPJ submetido cai em exatamente um dos três buckets: foundMerchants, notFoundMerchants (CNPJs válidos ausentes da base) ou invalidCnpjs (entradas malformadas).
GET
/
merchants
Buscar estabelecimentos por CNPJ
curl --request GET \
--url https://api.malvo.io/merchants \
--header 'X-API-KEY: <api-key>'const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.malvo.io/merchants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.malvo.io/merchants"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.malvo.io/merchants",
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-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"foundMerchants": [
{
"businessName": "BANCO EXEMPLO S.A.",
"cnpj": "00000000000191",
"name": "BANCO DO BRASIL",
"cnae": "6422100",
"category": "Banking"
}
],
"notFoundMerchants": [],
"invalidCnpjs": []
}{
"code": 400,
"message": "cnpjs should not be null or undefined"
}{
"code": 500,
"codeDescription": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error"
}Authorizations
Chave de API da aplicação. Obrigatória em todos os endpoints. Renove via POST /auth.
Query Parameters
Lista de CNPJs separados por vírgula, somente dígitos (ex.: 00000000000191,60701190000104).
Response
Resultado da busca, particionado em três buckets.
Resposta da busca de estabelecimentos por CNPJ. Cada CNPJ submetido cai em exatamente um dos três buckets.