{"id":16154354,"url":"https://github.com/giansalex/peru-consult-api","last_synced_at":"2025-03-16T09:33:41.523Z","repository":{"id":27466296,"uuid":"114035187","full_name":"giansalex/peru-consult-api","owner":"giansalex","description":"API de Consulta de DNI y RUC - Perú (Docker, GraphQL)","archived":false,"fork":false,"pushed_at":"2024-01-02T22:33:13.000Z","size":1126,"stargazers_count":76,"open_issues_count":6,"forks_count":39,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-16T01:11:19.022Z","etag":null,"topics":["api-consulta","dni","docker","graphql","peru","peru-consult","php","reniec","rest-api","ruc","sunat"],"latest_commit_sha":null,"homepage":"https://giansalex.github.io/peru-consult-docs/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giansalex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-12-12T20:19:41.000Z","updated_at":"2025-03-13T07:22:36.000Z","dependencies_parsed_at":"2024-01-03T00:43:25.328Z","dependency_job_id":"274aa4bb-390a-4fa7-9ec8-22eb2282bc39","html_url":"https://github.com/giansalex/peru-consult-api","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fperu-consult-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fperu-consult-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fperu-consult-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giansalex%2Fperu-consult-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giansalex","download_url":"https://codeload.github.com/giansalex/peru-consult-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852432,"owners_count":20358268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-consulta","dni","docker","graphql","peru","peru-consult","php","reniec","rest-api","ruc","sunat"],"created_at":"2024-10-10T01:16:46.599Z","updated_at":"2025-03-16T09:33:41.196Z","avatar_url":"https://github.com/giansalex.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Consulta Ruc y Dni - Perú\n\n[![Github Actions](https://github.com/giansalex/peru-consult-api/workflows/CI/badge.svg)](https://github.com/giansalex/peru-consult-api/actions)\n[![docker](https://github.com/giansalex/peru-consult-api/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/giansalex/peru-consult-api/actions/workflows/docker-publish.yml)\n[![Docker Pulls](https://img.shields.io/docker/pulls/giansalex/peru-consult-api.svg?style=flat-square)](https://hub.docker.com/r/giansalex/peru-consult-api)\n[![GitHub issues](https://img.shields.io/github/issues/giansalex/peru-consult-api.svg?style=flat-square)](https://github.com/giansalex/peru-consult-api/issues)  \nAPI para consultar el DNI y RUC - Perú, empleando [peru-consult](https://github.com/giansalex/peru-consult) package.\n\n\n## Requerimientos\n\n- PHP 7.4 o superior.\n\n## Instalar\n\n### Docker\n\nUsar la imagen desde [Docker Hub](https://hub.docker.com/r/giansalex/peru-consult-api/)\n```bash\ndocker run -d -p 8080:8080 --name peru-consult -e API_TOKEN=your_key giansalex/peru-consult-api\n```\n\n### Construir desde codigo fuente\n\n```\ngit clone https://github.com/giansalex/peru-consult-api.git\ncd peru-consult-api\ncomposer install\nphp -S 0.0.0.0:8080 -t public\n```\n\n## Ejemplos\n\n### GraphQL\nImplementando soporte para [graphql](http://graphql.org/) utilizar el endpoint `/api/graph`   \n\n```\nquery {\n    person(dni: \"48004836\") {\n    \tdni\n    \tnombres\n    },\n    company(ruc: \"20131312955\") {\n    \truc\n    \trazonSocial\n    }\n}\n```\nRespuesta:\n```json\n{\n    \"data\": {\n        \"person\": {\n            \"dni\": \"48004836\",\n            \"nombres\": \"ROBERTO CARLOS\"\n        },\n        \"company\": {\n            \"ruc\": \"20131312955\",\n            \"razonSocial\": \"SUPERINTENDENCIA NACIONAL DE ADUANAS Y DE ADMINISTRACION TRIBUTARIA - SUNAT\"\n        }\n    }\n}\n```\n\n### DNI\nEjecutar usando Curl.\n```bash\ncurl -H \"Accept: application/json\" http://localhost:8080/api/v1/dni/48004836?token=abcxyz\n```\n\nRespuesta:\n\n```json\n{\n  \"dni\": \"48004836\",\n  \"nombres\": \"ROBERTO CARLOS\",\n  \"apellidoPaterno\": \"SULCA\",\n  \"apellidoMaterno\": \"BASILIO\",\n  \"codVerifica\": \"4\"\n}\n```\n\n### RUC\nEjecutar usando Curl.\n```bash\ncurl -H \"Accept: application/json\" http://localhost:8080/api/v1/ruc/20131312955?token=abcxyz\n```\n\nRespuesta:\n\n```json\n{\n  \"ruc\": \"20131312955\",\n  \"razonSocial\": \"SUPERINTENDENCIA NACIONAL DE ADUANAS Y DE ADMINISTRACION TRIBUTARIA - SUNAT\",\n  \"nombreComercial\": \"-\",\n  \"tipo\": \"INSTITUCIONES PUBLICAS\",\n  \"estado\": \"ACTIVO\",\n  \"condicion\": \"HABIDO\",\n  \"direccion\": \"AV. GARCILASO DE LA VEGA NRO. 1472\",\n  \"departamento\":\"LIMA\",\n  \"provincia\":\"LIMA\",\n  \"distrito\":\"LIMA\",\n  \"fechaInscripcion\": \"1993-05-04T00:00:00.000Z\",\n  \"sistEmsion\": \"MANUAL/COMPUTARIZADO\",\n  \"sistContabilidad\": \"COMPUTARIZADO\",\n  \"actExterior\": \"SIN ACTIVIDAD\",\n  \"actEconomicas\": [\n    \"75113 - ACTIV. ADMINIST. PUBLICA EN GENERAL\"\n  ],\n  \"cpPago\": [\n    \"FACTURA\",\n    \"BOLETA DE VENTA\",\n    \"NOTA DE CREDITO\",\n    \"NOTA DE DEBITO\",\n    \"GUIA DE REMISION - REMITENTE\",\n    \"COMPROBANTE DE RETENCION\",\n    \"POLIZA DE ADJUDICACION POR REMATE DE BIENES\"\n  ],\n  \"sistElectronica\": [\n    \"FACTURA PORTAL                      DESDE 07/08/2013\",\n    \"BOLETA PORTAL                       DESDE 01/04/2016\"\n  ],\n  \"fechaEmisorFe\": \"2013-08-07T00:00:00.000Z\",\n  \"cpeElectronico\": [\n    \"FACTURA (desde 07/08/2013)\",\n    \"BOLETA (desde 01/04/2016)\"\n  ],\n  \"fechaPle\": \"2013-01-01T00:00:00.000Z\",\n  \"padrones\": [\n    \"Incorporado al Régimen de Agentes de Retención de IGV (R.S.037-2002) a partir del 01/06/2002\"\n  ],\n  \"fechaBaja\": null,\n  \"profesion\": \"\"\n}\n```\n\n### Consulta Validez Usuario SOL\nEjecutar usando Curl.\n```bash\ncurl http://localhost:8080/api/v1/user-sol/20000000001/GMABCI?token=abcxyz\n```\n\nRespuesta:\n\n```text\ntrue\n```\n\n\n### GraphiQL Tool\nPara mejorar aún más nuestra experiencia en pruebas, sugerimos comenzar a utilizar el cliente GraphiQL.\nEs un Explorador de esquema GraphQL que puede descargar desde Chrome Store. Utilizar el endpoint `/api/v1/graph`, el editor tiene una función de autocompletar y contiene toda la información sobre el esquema actual en el lado derecho en la barra lateral de Documentos:\n![GraphiQL Interface](https://raw.githubusercontent.com/giansalex/peru-consult-api/master/docs/screenshot-graph.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiansalex%2Fperu-consult-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiansalex%2Fperu-consult-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiansalex%2Fperu-consult-api/lists"}