Criar enriquecimento
curl --request POST \
--url https://api.lazydata.com.br/v1/enrichment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"name": "<string>",
"file": {},
"enrichment_id": "<string>"
}
'import requests
url = "https://api.lazydata.com.br/v1/enrichment"
payload = {
"type": "<string>",
"name": "<string>",
"file": {},
"enrichment_id": "<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({type: '<string>', name: '<string>', file: {}, enrichment_id: '<string>'})
};
fetch('https://api.lazydata.com.br/v1/enrichment', 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/enrichment",
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([
'type' => '<string>',
'name' => '<string>',
'file' => [
],
'enrichment_id' => '<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/enrichment"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {},\n \"enrichment_id\": \"<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/enrichment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {},\n \"enrichment_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lazydata.com.br/v1/enrichment")
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 \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {},\n \"enrichment_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Assinatura de upload gerada.",
"result": {
"enrichment_id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"type": "pf",
"name": "Base de clientes",
"status": "waiting_upload",
"upload_url": "https://upload.lazydata.com.br/enrichment",
"signature": "<assinatura_de_upload>",
"signature_expires_at": "2026-06-22T14:00:00+00:00",
"file": {
"name": "base-clientes.csv",
"extension": "csv"
}
}
}
{
"code": 400,
"message": "Um ou mais parâmetros informados são inválidos."
}
{
"code": 401,
"message": "Credencial da API inválida."
}
{
"code": 403,
"message": "A credencial da API não possui permissão para este recurso."
}
{
"code": 409,
"message": "O arquivo deste enriquecimento já foi enviado."
}
Enriquecimento
Criar enriquecimento
Crie ou prepare um enriquecimento e gere a assinatura temporária para upload do arquivo.
POST
https://api.lazydata.com.br/
/
v1
/
enrichment
Criar enriquecimento
curl --request POST \
--url https://api.lazydata.com.br/v1/enrichment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"name": "<string>",
"file": {},
"enrichment_id": "<string>"
}
'import requests
url = "https://api.lazydata.com.br/v1/enrichment"
payload = {
"type": "<string>",
"name": "<string>",
"file": {},
"enrichment_id": "<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({type: '<string>', name: '<string>', file: {}, enrichment_id: '<string>'})
};
fetch('https://api.lazydata.com.br/v1/enrichment', 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/enrichment",
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([
'type' => '<string>',
'name' => '<string>',
'file' => [
],
'enrichment_id' => '<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/enrichment"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {},\n \"enrichment_id\": \"<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/enrichment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {},\n \"enrichment_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lazydata.com.br/v1/enrichment")
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 \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {},\n \"enrichment_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Assinatura de upload gerada.",
"result": {
"enrichment_id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"type": "pf",
"name": "Base de clientes",
"status": "waiting_upload",
"upload_url": "https://upload.lazydata.com.br/enrichment",
"signature": "<assinatura_de_upload>",
"signature_expires_at": "2026-06-22T14:00:00+00:00",
"file": {
"name": "base-clientes.csv",
"extension": "csv"
}
}
}
{
"code": 400,
"message": "Um ou mais parâmetros informados são inválidos."
}
{
"code": 401,
"message": "Credencial da API inválida."
}
{
"code": 403,
"message": "A credencial da API não possui permissão para este recurso."
}
{
"code": 409,
"message": "O arquivo deste enriquecimento já foi enviado."
}
Cria ou prepara um enriquecimento e retorna uma assinatura temporária para enviar o arquivo de entrada no serviço de upload.
Depois de receber
Estrutura de
Estrutura de
upload_url e signature, envie o arquivo em Upload para enriquecimento.
{
"code": 200,
"message": "Assinatura de upload gerada.",
"result": {
"enrichment_id": "9fcb573b-7f62-4774-978b-07e89dfef5f2",
"type": "pf",
"name": "Base de clientes",
"status": "waiting_upload",
"upload_url": "https://upload.lazydata.com.br/enrichment",
"signature": "<assinatura_de_upload>",
"signature_expires_at": "2026-06-22T14:00:00+00:00",
"file": {
"name": "base-clientes.csv",
"extension": "csv"
}
}
}
{
"code": 400,
"message": "Um ou mais parâmetros informados são inválidos."
}
{
"code": 401,
"message": "Credencial da API inválida."
}
{
"code": 403,
"message": "A credencial da API não possui permissão para este recurso."
}
{
"code": 409,
"message": "O arquivo deste enriquecimento já foi enviado."
}
Corpo da requisição
string
required
Tipo da base enviada. Use
pf para CPF ou pj para CNPJ.string
required
Nome do enriquecimento.
object
required
Metadados do arquivo que será enviado no serviço de upload.
string
ID de um enriquecimento existente ainda sem arquivo. Use apenas quando precisar gerar uma nova assinatura para um enriquecimento já criado.
Estrutura de file
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name | string | Sim | Nome do arquivo que será enviado. |
extension | string | Sim | Extensão do arquivo. Valores aceitos: csv, xls ou xlsx. |
Exemplo de corpo
{
"type": "pf",
"name": "Base de clientes",
"file": {
"name": "base-clientes.csv",
"extension": "csv"
}
}
Resposta
integer
required
Código da resposta.
string
required
Mensagem descritiva da operação.
object
required
Dados do enriquecimento criado e assinatura temporária de upload.
Estrutura de result
| Campo | Tipo | Descrição |
|---|---|---|
enrichment_id | string | Identificador do enriquecimento. |
type | string | Tipo do enriquecimento: pf ou pj. |
name | string | Nome do enriquecimento. |
status | string | Status inicial. Normalmente waiting_upload. |
upload_url | string | URL do serviço de upload. |
signature | string | Assinatura temporária usada no header X-LazyData-Upload-Signature. |
signature_expires_at | string | Data de expiração da assinatura em ISO 8601. |
file | object | Metadados do arquivo esperado. |
A assinatura é temporária. Se expirar antes do envio, gere uma nova assinatura usando o mesmo
enrichment_id.Próximo passo
Enviar arquivo
Use
upload_url e signature para enviar o arquivo no serviço de upload.⌘I

