Empresas
curl --request POST \
--url https://api.verifica.id/v2/consulta/empresas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ruc": "<string>"
}
'import requests
url = "https://api.verifica.id/v2/consulta/empresas"
payload = { "ruc": "<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({ruc: '<string>'})
};
fetch('https://api.verifica.id/v2/consulta/empresas', 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.verifica.id/v2/consulta/empresas",
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([
'ruc' => '<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.verifica.id/v2/consulta/empresas"
payload := strings.NewReader("{\n \"ruc\": \"<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.verifica.id/v2/consulta/empresas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ruc\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verifica.id/v2/consulta/empresas")
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 \"ruc\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"status": 123,
"message": "<string>",
"data": {
"ruc": 123,
"razon_social": "<string>",
"tipo_contribuyente": "<string>",
"nombre_comercial": "<string>",
"fecha_inscripcion": "<string>",
"fecha_inicio_actividades": {},
"estado_contribuyente": "<string>",
"condicion_contribuyente": "<string>",
"direccion": "<string>",
"sistema_emision_comprobante": "<string>",
"sistema_contabilidad": {}
}
}Validación de Datos
Empresas
Valida la información de una empresa consultando su número de RUC
POST
/
v2
/
consulta
/
empresas
Empresas
curl --request POST \
--url https://api.verifica.id/v2/consulta/empresas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ruc": "<string>"
}
'import requests
url = "https://api.verifica.id/v2/consulta/empresas"
payload = { "ruc": "<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({ruc: '<string>'})
};
fetch('https://api.verifica.id/v2/consulta/empresas', 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.verifica.id/v2/consulta/empresas",
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([
'ruc' => '<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.verifica.id/v2/consulta/empresas"
payload := strings.NewReader("{\n \"ruc\": \"<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.verifica.id/v2/consulta/empresas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ruc\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verifica.id/v2/consulta/empresas")
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 \"ruc\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"status": 123,
"message": "<string>",
"data": {
"ruc": 123,
"razon_social": "<string>",
"tipo_contribuyente": "<string>",
"nombre_comercial": "<string>",
"fecha_inscripcion": "<string>",
"fecha_inicio_actividades": {},
"estado_contribuyente": "<string>",
"condicion_contribuyente": "<string>",
"direccion": "<string>",
"sistema_emision_comprobante": "<string>",
"sistema_contabilidad": {}
}
}Autenticación
Este endpoint requiere autenticación Bearer. Incluye tu API key en el header Authorization (si aún no sabes cómo obtener y usar tu API key, consulta la página de Autenticación):Authorization: Bearer YOUR_API_KEY
Atributos Requeridos
Número de RUC a validar
Respuesta
Tipo de respuesta (ej: “result”)
Código de estado HTTP de la respuesta (ej: 200)
Mensaje descriptivo del resultado de la validación
Datos de la empresa validada
Show propiedades de data
Show propiedades de data
Número de RUC consultado
Razón social de la empresa
Tipo de contribuyente (ej: “SOCIEDAD ANONIMA CERRADA”)
Nombre comercial de la empresa
Fecha de inscripción (formato DD-MM-YYYY)
Fecha de inicio de actividades (formato DD-MM-YYYY)
Estado del contribuyente (ej: “ACTIVO”)
Condición del contribuyente (ej: “HABIDO”)
Dirección fiscal registrada
Sistema de emisión de comprobantes (ej: “MANUAL/COMPUTARIZADO”)
Sistema de contabilidad
Ejemplo de Solicitud
curl https://api.verifica.id/v2/consulta/empresas \
-H "Authorization: Bearer {TU-API-KEY}" \
-d ruc=20602152532
Ejemplo de Respuesta Exitosa
{
"type": "result",
"status": 200,
"message": "Se ha validado la información correctamente.",
"data": {
"ruc": 20602152532,
"razon_social": "EMPRESA S.A.C.",
"tipo_contribuyente": "SOCIEDAD ANONIMA CERRADA",
"nombre_comercial": "EMPRESA LOCAL",
"fecha_inscripcion": "03-01-2022",
"fecha_inicio_actividades": null,
"estado_contribuyente": "ACTIVO",
"condicion_contribuyente": "HABIDO",
"direccion": "CAL.TRES NRO. 112 URB. SANDIA | LIMA - LIMA - LIMA",
"sistema_emision_comprobante": "MANUAL/COMPUTARIZADO",
"sistema_contabilidad": null
}
}
Códigos de Error
| Código | Descripción |
|---|---|
| 400 | Solicitud inválida - el campo ruc es requerido o tiene un formato incorrecto |
| 401 | Token de autenticación inválido o faltante |
| 429 | Demasiadas solicitudes - se ha excedido el límite de rate |
| 500 | Error interno del servidor |
⌘I