Conecta desde tu lenguaje.
Elige la consulta y tu lenguaje. Cada ejemplo incluye la petición y el formato de respuesta JSON.
Cada consulta con datos consume un crédito. Las respuestas sin resultados (404) y los errores no descuentan saldo. La API exige saldo suficiente antes de consultar.
Petición
Terminal
# Define DATELVO_API_KEY y CEDULA en tu entorno.
: "${DATELVO_API_KEY:?Falta tu API Key}"
: "${CEDULA:?Falta la cédula a consultar}"
curl --fail-with-body --request POST \
"https://datelvo.com/api/v1/consulta/cedula" \
--header "Authorization: Bearer $DATELVO_API_KEY" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{\"cedula\":\"$CEDULA\"}"
Node.js · servidor
const apiKey = process.env.DATELVO_API_KEY;
const cedula = process.env.CEDULA;
if (!apiKey || !cedula) {
throw new Error('Configura la clave y el identificador');
}
const response = await fetch('https://datelvo.com/api/v1/consulta/cedula', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({ cedula }),
});
const result = await response.json();
if (!response.ok) {
throw new Error(result.mensaje ?? `HTTP ${response.status}`);
}
console.log(result.datos);
Biblioteca estándar
import json
import os
from urllib.request import Request, urlopen
request = Request(
'https://datelvo.com/api/v1/consulta/cedula',
method='POST',
headers={
'Authorization': f"Bearer {os.environ['DATELVO_API_KEY']}",
'Content-Type': 'application/json',
'Accept': 'application/json',
},
data=json.dumps({'cedula': os.environ['CEDULA']}).encode(),
)
with urlopen(request, timeout=30) as response:
result = json.load(response)
print(result['datos'])
Extensión cURL
<?php
$apiKey = getenv('DATELVO_API_KEY');
$cedula = getenv('CEDULA');
if (!$apiKey || !$cedula) {
throw new RuntimeException('Configura la clave y el identificador');
}
$ch = curl_init('https://datelvo.com/api/v1/consulta/cedula');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['cedula' => $cedula]),
]);
$body = curl_exec($ch);
if ($body === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$result = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
if ($status >= 400) {
throw new RuntimeException($result['mensaje'] ?? "HTTP $status");
}
print_r($result['datos']);
Configura DATELVO_API_KEY con tu clave y CEDULA con el identificador a consultar. Ejecuta estos ejemplos en tu servidor para mantener privada la clave.
Respuesta JSON
{
"codigo": 200,
"exito": true,
"mensaje": "Consulta exitosa",
"datos": {
"cedula": "0000000000",
"nombres": "PERSONA DE EJEMPLO",
"profesion": null,
"fechaNacimiento": "1990-03-12",
"lugarNacimiento": null,
"estadoCivilCodigo": null,
"conyuge": null,
"ubicacion": {
"provincia": "Pichincha",
"canton": "Quito",
"parroquia": null
},
"ruc": null,
"contacto": {
"telefonos": [],
"emails": [],
"direcciones": []
}
},
"metadatos": {
"timestamp": "2026-01-01T00:00:00Z",
"creditos_gastados": 1,
"creditos_restantes": 100,
"fuente": "cache"
}
}
Datos ficticios. Los campos sin información llegan como null y las listas vacías como []; los metadatos indican créditos consumidos, saldo y fuente.
Petición
Terminal
# Define DATELVO_API_KEY y RUC en tu entorno.
: "${DATELVO_API_KEY:?Falta tu API Key}"
: "${RUC:?Falta el RUC a consultar}"
curl --fail-with-body --request POST \
"https://datelvo.com/api/v1/consulta/ruc" \
--header "Authorization: Bearer $DATELVO_API_KEY" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{\"ruc\":\"$RUC\"}"
Node.js · servidor
const apiKey = process.env.DATELVO_API_KEY;
const ruc = process.env.RUC;
if (!apiKey || !ruc) {
throw new Error('Configura la clave y el identificador');
}
const response = await fetch('https://datelvo.com/api/v1/consulta/ruc', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({ ruc }),
});
const result = await response.json();
if (!response.ok) {
throw new Error(result.mensaje ?? `HTTP ${response.status}`);
}
console.log(result.datos);
Biblioteca estándar
import json
import os
from urllib.request import Request, urlopen
request = Request(
'https://datelvo.com/api/v1/consulta/ruc',
method='POST',
headers={
'Authorization': f"Bearer {os.environ['DATELVO_API_KEY']}",
'Content-Type': 'application/json',
'Accept': 'application/json',
},
data=json.dumps({'ruc': os.environ['RUC']}).encode(),
)
with urlopen(request, timeout=30) as response:
result = json.load(response)
print(result['datos'])
Extensión cURL
<?php
$apiKey = getenv('DATELVO_API_KEY');
$ruc = getenv('RUC');
if (!$apiKey || !$ruc) {
throw new RuntimeException('Configura la clave y el identificador');
}
$ch = curl_init('https://datelvo.com/api/v1/consulta/ruc');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['ruc' => $ruc]),
]);
$body = curl_exec($ch);
if ($body === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$result = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
if ($status >= 400) {
throw new RuntimeException($result['mensaje'] ?? "HTTP $status");
}
print_r($result['datos']);
Configura DATELVO_API_KEY con tu clave y RUC con el identificador a consultar. Ejecuta estos ejemplos en tu servidor para mantener privada la clave.
Respuesta JSON
{
"codigo": 200,
"exito": true,
"mensaje": "Consulta exitosa",
"datos": {
"ruc": "0000000000000",
"establecimientos": [
{
"numero": "001",
"razonSocial": "EMPRESA DE EJEMPLO S.A.",
"nombreComercial": null,
"estadoContribuyente": "ACTIVO",
"estadoEstablecimiento": "ABIERTO",
"tipoContribuyente": "SOCIEDADES",
"claseContribuyente": null,
"obligadoContabilidad": false,
"actividadEconomica": {
"codigo": null,
"descripcion": "Actividad de ejemplo"
},
"ubicacion": {
"jurisdiccion": null,
"provincia": "Pichincha",
"canton": "Quito",
"parroquia": null,
"direccion": null
},
"fechas": {
"inicioActividades": null,
"reinicioActividades": null,
"suspensionDefinitiva": null,
"actualizacion": null
},
"agenteRetencion": false,
"contribuyenteEspecial": false,
"artesanoCalificado": false,
"regimenRimpe": null,
"contacto": {
"email": null,
"telefono": null
}
}
]
},
"metadatos": {
"timestamp": "2026-01-01T00:00:00Z",
"creditos_gastados": 1,
"creditos_restantes": 100,
"fuente": "catastro_sri"
}
}
Datos ficticios. Los campos sin información llegan como null y las listas vacías como []; los metadatos indican créditos consumidos, saldo y fuente.