Consulta RUC Representantes
Representantes legales registrados del contribuyente.
Consideraciones
- Lista los representantes legales del contribuyente (consulta directa a SUNAT).
- No disponible en el plan gratuito. Consume 2 consultas de tu plan.
Headers
| Name | Type | Description |
|---|---|---|
| Accept | String | application/json |
| Content-Type | string | application/json |
| Authorization | string | Bearer <token>. Genéralo desde tu panel, en Api Tokens. |
Body
| Name | Type | Description |
|---|---|---|
| ruc* | string | Número de RUC de 11 dígitos. |
Ejemplo de solicitud
Copiar
curl -X POST https://api.apiperu.dev/ruc-representantes \
-H "Accept: application/json" \
-H "Authorization: Bearer TU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ruc":"20601234567"}' Copiar
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.apiperu.dev/ruc-representantes',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode([
'ruc' => '20601234567',
]),
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer TU_TOKEN',
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response; Copiar
const response = await fetch('https://api.apiperu.dev/ruc-representantes', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer TU_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
ruc: '20601234567',
}),
});
const data = await response.json();
console.log(data); Copiar
import requests
response = requests.post(
'https://api.apiperu.dev/ruc-representantes',
headers={
'Accept': 'application/json',
'Authorization': 'Bearer TU_TOKEN',
'Content-Type': 'application/json',
},
json={
'ruc': '20601234567',
},
)
print(response.json()) Respuesta
200 OK application/json
{
"success": true,
"data": [
{
"tipo_de_documento": "DNI",
"numero_de_documento": "44556677",
"nombre": "PEREZ GARCIA JUAN CARLOS",
"cargo": "GERENTE GENERAL",
"fecha_desde": "2020-01-15"
}
],
"time": 1.0
}