CedulaVE API ist ein in PHP geschriebenes Skript zur Abfrage personenbezogener Daten venezolanischer Einwohner, die über ihren Personalausweis im CNE registriert sind.
Beiträge, Probleme und Funktionswünsche sind willkommen. Schauen Sie sich gerne die Themen an, wenn Sie einen Beitrag leisten möchten.
Der einfachste Weg, CedulaVE API zu installieren, ist über Composer
composer require megacreativo/cedulave-api
Zur Ausführung der Abfrage steht die Info-Methode zur Verfügung, die Antwort wird standardmäßig im JSON-Format erhalten
Weitere Beispiele finden Sie unter Beispiele
/**
* 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
)
)
Fehler 404 Die konsultierte ID ist nicht im CNE registriert
{
"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 "
}
}
Fehler 301 Die empfangenen Daten sind nicht korrekt, Fehler in der Nationalität. Zulässige Werte [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] "
}
}
Fehler 302 Die empfangenen Daten sind nicht korrekt. Es wurde ein nicht numerisches Zeichen eingegeben
{
"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 "
}
}
Fehler 303 Die empfangenen Daten sind nicht korrekt. Es wurde ein nicht numerisches Zeichen eingegeben
{
"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
Wir verwenden SemVer für versioninWg. Alle verfügbaren Versionen finden Sie in den Tags in diesem Repository.
Die Software wird unter der MIT-Lizenz vertrieben. Urheberrecht © 2018-2020. Hergestellt mit ❤️ von Brayan Rincon & MegaCreativo https://megacreativo.com