The Brazilian citizen information service allows users to verify the validity of Brazilian CPF (Cadastro de Pessoas Físicas) numbers. The service returns a response that includes the document type, document number, full name, first name, last name, and an array with the individual's first and last names.
Parameters
Name |
Type |
¿Required? |
Description |
Example |
documentType |
String |
True |
Document type. Valid parameter: CPF. |
CPF |
documentNumber |
String |
True |
Document number of the person to consult. |
123456789 |
dateOfBirth |
String |
True |
Date of birth of the person to consult, valid format: dd/mm/yyyy. |
20/05/2022 |
Implementation
Request
import axios from 'axios';
const options = {
method: 'GET',
url: '<https://api.verifik.co/v2/br/cedula>',
params: {
documentType: 'CPF',
documentNumber: '012.345.678-01',
dateOfBirth: '17/02/2002'
},
headers: {
Accept: 'application/json',
Authorization: 'jwt <tu_token>'
}
};
try {
notFou const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Response 200 - (Successful response)
{
"data": {
"documentType": "CPF",
"documentNumber": "012.345.678-01",
"fullName": "MATEO VERIFIK",
"firstName": "MATEO",
"lastName": "VERIFIK",
"arrayName": [
"MATEO",
"VERIFIK"
],
"dateOfBirth": "2002-02-17T00:00:00.000Z"
},
"signature": {
"dateTime": "March 10, 2023 7:22 PM",
"message": "Certified by Verifik.co"
}
}
Other responses
|
Code |
Description |
Response Body |
404 |
Not Found |
Information not found. |
{ |
"code": "NotFound", |
|
|
|
"message": "Record not found.", |
|
|
|
"signature": { |
|
|
|
"dateTime": "August 31, 2022 3:24 PM", |
|
|
|
"message": "Certified by Verifik.co" |
|
|
|
} |
|
|
|
} |
|
|
|
409 |
Conflict |
Some parameters are missing. |
{ |
"code": "MissingParameter", |
|
|
|
"message": "missing documentType\n. missing documentNumber\n. missing dateOfBirth\n" |
|
|
|
} |
|
|
|
409 |
Conflict |
Invalid documentType for this query. |
{ |
"code": "MissingParameter", |
|
|
|
"message": "documentType must be one of: [CPF]" |
|
|
|
} |
|
|
|
409 |
Conflict |
Invalid date format. |
{ |
"code": "MissingParameter", |
|
|
|
"message": "dateOfBirth format required: DD/MM/YYYY\n" |
|
|
|
} |
|
|
|