🇵🇦 PanamaService to query Panamanian citizens using the citizenship card.
Panamanian Citizen Information
GET - https://api.verifik.co/v2/pa/cedula
The Panamanian citizen information provides accurate and reliable data for individuals in Panama. The service returns information about the document type, document number, full name, last name, first name, and an array of additional names.
Implementation
Headers
Query Parameters
Name Type Required Description Example Document type. Allowed value: CCPA.
Document number of the person to be queried.
Date of birth of the owner of the document. in the following format DD/MM/YYYY
Request
JavaScript Python Swift PHP
Copy import axios from 'axios' ;
const options = {
method : 'GET' ,
url : '<https://api.verifik.co/v2/pa/cedula/extra>' ,
params : {documentType : 'CCPA' , documentNumber : 'E-1-234567' , dateOfBirth : '' 02 / 03 / 1992 } ,
headers : {
Accept : 'application/json' ,
Authorization : 'jwt <tu_token>'
}
};
try {
notFou const { data } = await axios .request (options);
console .log (data);
} catch (error) {
console .error (error);
}
Copy import requests
options = {
'method' : 'GET' ,
'url' : 'https://api.verifik.co/v2/pa/cedula/extra' ,
'params' : { 'documentType' : 'CCPA' , 'documentNumber' : 'E-1-234567' , 'dateOfBirth' : '02/03/1999' },
'headers' : {
'Accept' : 'application/json' ,
'Authorization' : 'jwt <tu_token>'
}
}
try :
response = requests.request(options['method'], options['url'], params=options['params'], headers=options['headers'])
data = response . json ()
print (data)
except Exception as error :
print (error)
Copy import Foundation
let url = URL ( string : "https://api.verifik.co/v2/pa/cedula/extra" ) !
var request = URLRequest ( url : url )
request.httpMethod = "GET"
request. setValue ( "application/json" , forHTTPHeaderField : "Accept" )
request. setValue ( "jwt <tu_token>" , forHTTPHeaderField : "Authorization" )
let params: [ String : String ] = [
"documentType" : "CCPA" ,
"documentNumber" : "E-1-234567" ,
"dateOfBirth" : "02/03/1999"
]
let urlComponents = NSURLComponents ( url : url, resolvingAgainstBaseURL : false ) !
urlComponents.queryItems = params. map { URLQueryItem ( name : $0.key, value : $0. value ) }
request. url = urlComponents. url
let task = URLSession.shared. dataTask ( with : request ) { data, response, error in
if let error = error {
print ( error )
return
}
guard let data = data else { return }
do {
let jsonData = try JSONSerialization. jsonObject ( with : data, options : [] )
print ( jsonData )
} catch {
print ( error )
}
}
task. resume ()
Copy <? php
require 'vendor/autoload.php' ;
use GuzzleHttp \ Client ;
$options = [
'method' => 'GET' ,
'query' => [
'documentType' => 'CCPA' ,
'documentNumber' => 'E-1-234567' ,
'dateOfBirth' => '02/03/1999'
] ,
'headers' => [
'Accept' => 'application/json' ,
'Authorization' => 'jwt <tu_token>'
]
];
$client = new Client ();
try {
$response = $client -> request ( $options[ 'method' ] , 'https://api.verifik.co/v2/pa/cedula/extra' , $options ) ;
$data = json_decode ( $response -> getBody (), true ) ;
print_r ( $data ) ;
} catch ( Exception $error) {
echo $error -> getMessage () ;
}
?>
Response
200 404 409 409
Copy {
"data" : {
"arrayName" : [
"JUAN" ,
"MIGUEL" ,
"TREVIÑO" ,
"MORALES"
] ,
"dateOfBirth" : "1999-03-02T00:00:00.000Z" ,
"documentNumber" : "E-8-187192" ,
"documentType" : "CCPA" ,
"firstName" : "JUAN MIGUEL" ,
"fullName" : "JUAN MIGUEL TREVIÑO MORALES" ,
"lastName" : "TREVIÑO MORALES" ,
"audit" : {}
} ,
"signature" : {
"dateTime" : "September 24, 2024 8:20 PM" ,
"message" : "Certified by Verifik.co"
} ,
"id" : "I06UC"
}
Copy {
"code" : "NotFound" ,
"message" : "Record not found." ,
"signature" : {
"dateTime" : "August 31, 2022 3:24 PM" ,
"message" : "Certified by Verifik.co"
}
}
Copy {
"code" : "MissingParameter" ,
"message" : "missing documentType\n. missing documentNumber\n"
}
Copy {
"code" : "MissingParameter" ,
"message" : "documentType must be one of: [CCPA]"
}