CedulaVE API is a script written in PHP to consult personal data of Venezuelan residents registered in the CNE through their Identity Card.
Contributions, issues and feature requests are welcome. Feel free to check out the issues if you want to contribute.
The easiest way to install CedulaVE API is through Composer
composer require megacreativo/cedulave-api
The info method is available to execute the query, the response is obtained by default in JSON format
To see more examples go to examples
/**
* Estructura de parametros
*
* @param string $nac Tipo de Nacionalidad. Valores permitidos [V|E]. Cualquier otro valor producirá un Error 301
* @param string $cedula Número de Cédula de Identidad a consultar
* @param boolean $json (Opcional) Si es true devolver JSON como respuesta, en caso contrario devuelve un ARRAY. Valor por defecto TRUE
* @param boolean $pretty (Opcional) Se devuelve un JSON, este parametro establece si se aplica JSON_PRETTY_PRINT. Valor por defecto FALSE
*/
function info( string $ nac , string $ cedula , bool $ json = true , bool $ pretty = false )
/**
* Ejemplos de uso
**/
// Retorna un JSON
CedulaVE:: info ( ' V ' , ' 12345678 ' );
// Retorna un Array
CedulaVE:: info ( ' V ' , ' 12345678 ' , false );
// Retorna un JSON formateado
vCedulaVE:: info ( ' V ' , ' 12345678 ' , true , true );
{
"status" : 200 ,
"version" : " 1.1.1 " ,
"website" : " https://api.megacreativo.com/public/cedula-ve/v1 " ,
"response" :
{
"nac" : " V " , /* Nacionalidad. [V|E] */
"dni" : " 12345678 " , /* Cédula de identidad */
"name" : " Jhon Alfred " , /* Primer y segundo nombre */
"lastname" : " Doe Law " , /* Primer y segundo apellido */
"fullname" : " Jhon Alfred Doe Law " , /* Nombre completo */
"state" : " Estado " , /* Estado donde se encuentra el Centro de votación */
"municipality" : " Municipio " , /* Municipio del Centro de votación */
"parish" : " Parroquia " , /* Parroquia del Centro de votación */
"voting" : " Centro de votación " , /* Nombre del Centro de votación */
"address" : " Direccion " /* Dirección del Centro de votación */
}
}
Array
(
[status] => 200
[version] => 1.1 . 1
[api] => https: //api.megacreativo.com/public/cedula-ve/v1
[data] => Array
(
[nac] => V
[dni] => 12345678
[name] => JHON ALFRED
[lastname] => DOE LAW
[fullname] => JHON ALFRED DOE LAW
[state] => ESTADO
[municipality] => MUNICIPIO
[parish] => PARROQUIA
[voting] => CENTRO DE VOTACION
[address] => DIRECCION DEL CENTRO
)
)
Error 404 The consulted ID is not registered in the CNE
{
"status" : 404 ,
"version" : " 1.1.1 " ,
"api" : " https://api.megacreativo.com/public/cedula-ve/v1 " ,
"data" : {
"code" : 404 ,
"message" : " No se encontró la cédula de identidad "
}
}
Error 301 The data received is not correct, Error in nationality. Allowed values [V|E]
{
"status" : 301 ,
"version" : " 1.1.1 " ,
"api" : " https://api.megacreativo.com/public/cedula-ve/v1 " ,
"data" : {
"code" : 301 ,
"message" : " Los datos recibidos no son correctos, Error en la nacionalidad. Valores permitidos [V|E] "
}
}
Error 302 The data received is not correct. A non-numeric character was entered
{
"status" : 302 ,
"version" : " 1.1.1 " ,
"api" : " https://api.megacreativo.com/public/cedula-ve/v1 " ,
"data" : {
"code" : 302 ,
"message" : " Los datos recibidos no son correctos. Se introdujo un caracter no numerico "
}
}
Error 303 The data received is not correct. A non-numeric character was entered
{
"status" : 303 ,
"version" : " 1.1.1 " ,
"api" : " https://api.megacreativo.com/public/cedula-ve/v1 " ,
"data" : {
"code" : 303 ,
"message" : " Debe ingresar una cedula de indetidad válida. Sólo se permiten caracteres numéricos "
}
}
Brayan Rincon
We use SemVer for versioninWg. For all available versions, look at the tags in this repository.
The software is distributed under the MIT license. Copyright © 2018-2020. Made with ❤️ by Brayan Rincon & MegaCreativo https://megacreativo.com