verifik
Version:
This library is a wrap of the official API found in docs.verifik.co
40 lines (36 loc) • 749 B
JavaScript
const {
requestEndpoint,
} = require('./core');
/**
* get a Panamanian ID
* @param {String} documentType
* @param {String} documentNumber
* @returns Promise
*/
const getID = (documentType, documentNumber) => requestEndpoint('pa/cedula', {
documentType,
documentNumber
});
/**
* get Full Panamanian ID
* @param {String} documentType
* @param {String} documentNumber
* @returns Promise
*/
const getFullID = (documentType, documentNumber) => requestEndpoint('pa/cedula/extra', {
documentType,
documentNumber,
});
/**
*
* @param {String} plate
* @returns Promise
*/
const getVehicle = (plate) => requestEndpoint('pa/vehiculo/placa', {
plate,
});
module.exports = {
getID,
getFullID,
getVehicle,
};