# RUC

La información se actualiza en nuestra base de datos diariamente con información oficial según disponibilidad del padrón reducido publicado por SUNAT.

## GET /ruc/{ruc}

> Consulta RUC

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"Ruc":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"nombre_o_razon_social":{"type":"string"},"estado_del_contribuyente":{"type":"string"},"condicion_de_domicilio":{"type":"string"},"ubigeo":{"type":"string"},"tipo_de_via":{"type":"string"},"nombre_de_via":{"type":"string"},"codigo_de_zona":{"type":"string"},"tipo_de_zona":{"type":"string"},"numero":{"type":"string"},"interior":{"type":"string"},"lote":{"type":"string"},"dpto":{"type":"string"},"manzana":{"type":"string"},"kilometro":{"type":"string"},"distrito":{"type":"string"},"provincia":{"type":"string"},"departamento":{"type":"string"},"direccion_simple":{"type":"string"},"direccion":{"type":"string"},"actualizado_en":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}":{"get":{"summary":"Consulta RUC","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ruc"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

{% hint style="info" %}
Actualizado al 28/05/2026
{% endhint %}

## GET /ruc/{ruc}/actividad-economica

> Consulta RUC con actividad económica

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"ActividadEconomica":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"estado":{"type":"string"},"condicion":{"type":"string"},"tipo":{"type":"string"},"actividad_economica_rev3_principal":{"type":"string"},"actividad_economica_rev3_secundaria":{"type":"string"},"actividad_economica_rev4_principal":{"type":"string"},"numero_trabajadores":{"type":"string"},"tipo_facturacion":{"type":"string"},"tipo_contabilidad":{"type":"string"},"comercio_exterior":{"type":"string"},"periodo":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/actividad-economica":{"get":{"summary":"Consulta RUC con actividad económica","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActividadEconomica"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

{% hint style="info" %}
Actualizado al 10/07/2025
{% endhint %}

## GET /ruc/{ruc}/buen-contribuyente

> Consulta RUC buen contribuyente

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"BuenContribuyente":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"nombre_o_razon_social":{"type":"string"},"a_partir_del":{"type":"string"},"resolucion":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/buen-contribuyente":{"get":{"summary":"Consulta RUC buen contribuyente","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuenContribuyente"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

{% hint style="info" %}
Actualizado al 02/02/2026
{% endhint %}

## GET /ruc/{ruc}/agente-retencion

> Consulta RUC agente de retención

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"AgenteRetencion":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"nombre_o_razon_social":{"type":"string"},"a_partir_del":{"type":"string"},"resolucion":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/agente-retencion":{"get":{"summary":"Consulta RUC agente de retención","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgenteRetencion"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

{% hint style="info" %}
Actualizado al 19/01/2024
{% endhint %}

## GET /ruc/{ruc}/agente-percepcion

> Consulta RUC agente de percepción venta interna

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"AgentePercepcion":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"nombre_o_razon_social":{"type":"string"},"a_partir_del":{"type":"string"},"resolucion":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/agente-percepcion":{"get":{"summary":"Consulta RUC agente de percepción venta interna","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentePercepcion"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

{% hint style="info" %}
Actualizado al 07/04/2026
{% endhint %}

## GET /ruc/{ruc}/entidad-exceptuada-percepcion

> Consulta RUC entidad exceptuada de percepción del IGV

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"EntidadExceptuadaPercepcion":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"nombre_o_razon_social":{"type":"string"},"tipo":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/entidad-exceptuada-percepcion":{"get":{"summary":"Consulta RUC entidad exceptuada de percepción del IGV","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntidadExceptuadaPercepcion"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

## Consulta RUC y actividades económicas

> Consulta RUC que incluye información adicional sobre actividades económicas.\
> \
> La consulta exitosa a esta ruta cuenta como 2 consultas individuales para efectos de límite de uso.<br>

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"RucActividadEconomica":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"nombre_o_razon_social":{"type":"string"},"estado_del_contribuyente":{"type":"string"},"condicion_de_domicilio":{"type":"string"},"ubigeo":{"type":"string"},"tipo_de_via":{"type":"string"},"nombre_de_via":{"type":"string"},"codigo_de_zona":{"type":"string"},"tipo_de_zona":{"type":"string"},"numero":{"type":"string"},"interior":{"type":"string"},"lote":{"type":"string"},"dpto":{"type":"string"},"manzana":{"type":"string"},"kilometro":{"type":"string"},"distrito":{"type":"string"},"provincia":{"type":"string"},"departamento":{"type":"string"},"direccion_simple":{"type":"string"},"direccion":{"type":"string"},"actualizado_en":{"type":"string"},"actividad_economica":{"$ref":"#/components/schemas/ActividadEconomica"}}},"ActividadEconomica":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"estado":{"type":"string"},"condicion":{"type":"string"},"tipo":{"type":"string"},"actividad_economica_rev3_principal":{"type":"string"},"actividad_economica_rev3_secundaria":{"type":"string"},"actividad_economica_rev4_principal":{"type":"string"},"numero_trabajadores":{"type":"string"},"tipo_facturacion":{"type":"string"},"tipo_contabilidad":{"type":"string"},"comercio_exterior":{"type":"string"},"periodo":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc-actividad/{ruc}":{"get":{"summary":"Consulta RUC y actividades económicas","description":"Consulta RUC que incluye información adicional sobre actividades económicas.\n\nLa consulta exitosa a esta ruta cuenta como 2 consultas individuales para efectos de límite de uso.\n","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RucActividadEconomica"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

## GET /ruc/{ruc}/anexos

> Consulta RUC locales anexos

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"LocalAnexo":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LocalAnexoItem"}}}},"LocalAnexoItem":{"type":"object","properties":{"ruc":{"type":"string"},"ubigeo":{"type":"string"},"tipo_de_via":{"type":"string"},"nombre_de_via":{"type":"string"},"codigo_de_zona":{"type":"string"},"tipo_de_zona":{"type":"string"},"numero":{"type":"string"},"interior":{"type":"string"},"lote":{"type":"string"},"dpto":{"type":"string"},"manzana":{"type":"string"},"kilometro":{"type":"string"},"distrito":{"type":"string"},"provincia":{"type":"string"},"departamento":{"type":"string"},"direccion":{"type":"string"},"actualizado_en":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/anexos":{"get":{"summary":"Consulta RUC locales anexos","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalAnexo"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

{% hint style="warning" %}
Recomendamos usar esta url como método alternativo solo si detecta que las consultas RUC no devuelven datos actualizados desde nuestra base de datos.
{% endhint %}

## Consulta RUC desde SUNAT

> La consulta RUC se hace en tiempo real desde los servidores SUNAT. Puede presentar mayor latencia y/o errores de conexión.

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"RucSunat":{"type":"object","properties":{"success":{"type":"boolean"},"ruc":{"type":"string"},"nombre_o_razon_social":{"type":"string"},"tipo_contribuyente":{"type":"string"},"nombre_comercial":{"type":"string"},"fecha_inscripcion":{"type":"string"},"fecha_inicio_actividades":{"type":"string"},"estado_del_contribuyente":{"type":"string"},"condicion_de_domicilio":{"type":"string"},"departamento":{"type":"string"},"provincia":{"type":"string"},"distrito":{"type":"string"},"direccion":{"type":"string"},"sistema_emision_comprobante":{"type":"string"},"actividad_comercio_exterior":{"type":"string"},"sistema_contabilidad":{"type":"string"},"actividades_economicas":{"type":"array","items":{"type":"string"}},"sistema_emision_electronica":{"type":"array","items":{"type":"string"}},"emisor_electronico_desde":{"type":"string"},"afiliado_ple_desde":{"type":"string"},"padrones":{"type":"array","items":{"type":"string"}}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/sunat":{"get":{"summary":"Consulta RUC desde SUNAT","description":"La consulta RUC se hace en tiempo real desde los servidores SUNAT. Puede presentar mayor latencia y/o errores de conexión.","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RucSunat"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

## Consulta representantes legales desde SUNAT

> La consulta RUC se hace en tiempo real desde los servidores SUNAT. Puede presentar mayor latencia y/o errores de conexión.

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"RepresentanteLegal":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RepresentanteLegalItem"}}}},"RepresentanteLegalItem":{"type":"object","properties":{"documento":{"type":"string"},"dni":{"type":"string"},"nombre":{"type":"string"},"cargo":{"type":"string"},"fecha":{"type":"string"},"ruc":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/representantes-legales":{"get":{"summary":"Consulta representantes legales desde SUNAT","description":"La consulta RUC se hace en tiempo real desde los servidores SUNAT. Puede presentar mayor latencia y/o errores de conexión.","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepresentanteLegal"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

## Consulta deuda coactiva desde SUNAT

> La consulta RUC se hace en tiempo real desde los servidores SUNAT. Puede presentar mayor latencia y/o errores de conexión.

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"ruc"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"DeudaCoactiva":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DeudaCoactivaItem"}}}},"DeudaCoactivaItem":{"type":"object","properties":{"monto_deuda":{"type":"string"},"periodo_tributario":{"type":"string"},"fecha_inicio_cobranza":{"type":"string"},"entidad_asociada":{"type":"string"},"ruc":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}},"responses":{"ForbiddenResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}}}},"paths":{"/ruc/{ruc}/deuda-coactiva":{"get":{"summary":"Consulta deuda coactiva desde SUNAT","description":"La consulta RUC se hace en tiempo real desde los servidores SUNAT. Puede presentar mayor latencia y/o errores de conexión.","tags":["ruc"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"ruc","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeudaCoactiva"}}}},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.migo.pe/v2/ruc/ruc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
