Criar monitoramento
curl --request POST \
--url https://api.lazydata.com.br/v1/monitoring/company \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"tax_id": "<string>",
"sources": [
{}
],
"notification_email": "<string>"
}
'import requests
url = "https://api.lazydata.com.br/v1/monitoring/company"
payload = {
"name": "<string>",
"tax_id": "<string>",
"sources": [{}],
"notification_email": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
tax_id: '<string>',
sources: [{}],
notification_email: '<string>'
})
};
fetch('https://api.lazydata.com.br/v1/monitoring/company', 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://api.lazydata.com.br/v1/monitoring/company",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'tax_id' => '<string>',
'sources' => [
[
]
],
'notification_email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lazydata.com.br/v1/monitoring/company"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"sources\": [\n {}\n ],\n \"notification_email\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lazydata.com.br/v1/monitoring/company")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"sources\": [\n {}\n ],\n \"notification_email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lazydata.com.br/v1/monitoring/company")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"sources\": [\n {}\n ],\n \"notification_email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Monitoramento criado. A checagem inicial será executada em segundo plano.",
"result": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"name": "EMPRESA EXEMPLO LTDA",
"type": "pj",
"status": "active",
"status_label": "Ativo",
"notification_email": "alertas@example.com",
"price_per_check": 0.35,
"checks_count": 0,
"events_count": 0,
"charged_total": 0,
"target": {
"type": "pj",
"label": "Pessoa jurídica",
"name": "EMPRESA EXEMPLO LTDA",
"tax_id": "00000000000000"
},
"sources_count": 1,
"initial_check_queued": true
}
}
{
"code": 409,
"message": "Já existe um monitoramento para este CNPJ.",
"result": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"status": "active"
}
}
Pessoa jurídica
Criar monitoramento
Crie um monitoramento de pessoa jurídica para fontes selecionadas.
POST
https://api.lazydata.com.br/
/
v1
/
monitoring
/
company
Criar monitoramento
curl --request POST \
--url https://api.lazydata.com.br/v1/monitoring/company \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"tax_id": "<string>",
"sources": [
{}
],
"notification_email": "<string>"
}
'import requests
url = "https://api.lazydata.com.br/v1/monitoring/company"
payload = {
"name": "<string>",
"tax_id": "<string>",
"sources": [{}],
"notification_email": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
tax_id: '<string>',
sources: [{}],
notification_email: '<string>'
})
};
fetch('https://api.lazydata.com.br/v1/monitoring/company', 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://api.lazydata.com.br/v1/monitoring/company",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'tax_id' => '<string>',
'sources' => [
[
]
],
'notification_email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lazydata.com.br/v1/monitoring/company"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"sources\": [\n {}\n ],\n \"notification_email\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lazydata.com.br/v1/monitoring/company")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"sources\": [\n {}\n ],\n \"notification_email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lazydata.com.br/v1/monitoring/company")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"sources\": [\n {}\n ],\n \"notification_email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Monitoramento criado. A checagem inicial será executada em segundo plano.",
"result": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"name": "EMPRESA EXEMPLO LTDA",
"type": "pj",
"status": "active",
"status_label": "Ativo",
"notification_email": "alertas@example.com",
"price_per_check": 0.35,
"checks_count": 0,
"events_count": 0,
"charged_total": 0,
"target": {
"type": "pj",
"label": "Pessoa jurídica",
"name": "EMPRESA EXEMPLO LTDA",
"tax_id": "00000000000000"
},
"sources_count": 1,
"initial_check_queued": true
}
}
{
"code": 409,
"message": "Já existe um monitoramento para este CNPJ.",
"result": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"status": "active"
}
}
Cria um monitoramento de pessoa jurídica para um CNPJ e uma ou mais fontes.
Cada fonte recebe sua própria frequência de checagem.
Estrutura de
{
"code": 200,
"message": "Monitoramento criado. A checagem inicial será executada em segundo plano.",
"result": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"name": "EMPRESA EXEMPLO LTDA",
"type": "pj",
"status": "active",
"status_label": "Ativo",
"notification_email": "alertas@example.com",
"price_per_check": 0.35,
"checks_count": 0,
"events_count": 0,
"charged_total": 0,
"target": {
"type": "pj",
"label": "Pessoa jurídica",
"name": "EMPRESA EXEMPLO LTDA",
"tax_id": "00000000000000"
},
"sources_count": 1,
"initial_check_queued": true
}
}
{
"code": 409,
"message": "Já existe um monitoramento para este CNPJ.",
"result": {
"id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"status": "active"
}
}
Corpo da requisição
string
required
Razão social ou nome interno do monitoramento.
string
required
CNPJ da empresa, com ou sem pontuação.
array<object>
required
Fontes que serão monitoradas.
string
required
E-mail que receberá os alertas.
Estrutura de sources[]
| Campo | Tipo | Descrição |
|---|---|---|
source_id | string | ID da fonte retornada em Configuração. |
frequency_id | string | ID da frequência escolhida. |
Exemplo de corpo
{
"name": "EMPRESA EXEMPLO LTDA",
"tax_id": "00000000000000",
"sources": [
{
"source_id": "company_processes",
"frequency_id": "daily"
}
],
"notification_email": "alertas@example.com"
}
Fluxo recomendado
- Consulte Configuração.
- Valide o CNPJ em Validar pessoa jurídica.
- Crie o monitoramento com as fontes desejadas.
- Acompanhe a checagem inicial em Detalhar monitoramento.
⌘I

