Aadhaar OCR
Aadhaar optical character recognition:
Postman Collection
URL
POST : /v1/service/verification/ocr/aadhaarHeaders
Content-Type (String) required
application/json
application/json
Authorization (String) required
Basic Auth
Basic Auth
Accept (String) required
application/json
application/json
Body Params
clientRefId (String) Required
Unique Reference number (Max Length: 30)
Unique Reference number (Max Length: 30)
aadhaarFront (String) Required
User Aadhaar Card Front Copy (JPEG / PNG / JPG) (Max Length: class URL { constructor(input, base = undefined) { // toUSVString is not needed. input = `${input}`; let base_context; if (base !== undefined) { base_context = new URL(base)[context]; } this[context] = new URLContext(); parse(input, -1, base_context, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } get [special]() { return (this[context].flags & URL_FLAGS_SPECIAL) !== 0; } get [cannotBeBase]() { return (this[context].flags & URL_FLAGS_CANNOT_BE_BASE) !== 0; } // https://url.spec.whatwg.org/#cannot-have-a-username-password-port get [cannotHaveUsernamePasswordPort]() { const { host, scheme } = this[context]; return ((host == null || host === '') || this[cannotBeBase] || scheme === 'file:'); } [inspect.custom](depth, opts) { if (this == null || ObjectGetPrototypeOf(this[context]) !== URLContext.prototype) { throw new ERR_INVALID_THIS('URL'); } if (typeof depth === 'number' && depth < 0) return this; const constructor = getConstructorOf(this) || URL; const obj = ObjectCreate({ constructor }); obj.href = this.href; obj.origin = this.origin; obj.protocol = this.protocol; obj.username = this.username; obj.password = this.password; obj.host = this.host; obj.hostname = this.hostname; obj.port = this.port; obj.pathname = this.pathname; obj.search = this.search; obj.searchParams = this.searchParams; obj.hash = this.hash; if (opts.showHidden) { obj.cannotBeBase = this[cannotBeBase]; obj.special = this[special]; obj[context] = this[context]; } return `${constructor.name} ${inspect(obj, opts)}`; } [kFormat](options) { if (options) validateObject(options, 'options'); options = { fragment: true, unicode: false, search: true, auth: true, ...options }; const ctx = this[context]; // https://url.spec.whatwg.org/#url-serializing let ret = ctx.scheme; if (ctx.host !== null) { ret += '//'; const has_username = ctx.username !== ''; const has_password = ctx.password !== ''; if (options.auth && (has_username || has_password)) { if (has_username) ret += ctx.username; if (has_password) ret += `:${ctx.password}`; ret += '@'; } ret += options.unicode ? domainToUnicode(ctx.host) : ctx.host; if (ctx.port !== null) ret += `:${ctx.port}`; } if (this[cannotBeBase]) { ret += ctx.path[0]; } else { if (ctx.host === null && ctx.path.length > 1 && ctx.path[0] === '') { ret += '/.'; } if (ctx.path.length) { ret += '/' + ArrayPrototypeJoin(ctx.path, '/'); } } if (options.search && ctx.query !== null) ret += `?${ctx.query}`; if (options.fragment && ctx.fragment !== null) ret += `#${ctx.fragment}`; return ret; } // https://heycam.github.io/webidl/#es-stringifier toString() { return this[kFormat]({}); } get href() { return this[kFormat]({}); } set href(input) { // toUSVString is not needed. input = `${input}`; parse(input, -1, undefined, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } // readonly get origin() { // Refs: https://url.spec.whatwg.org/#concept-url-origin const ctx = this[context]; switch (ctx.scheme) { case 'blob:': if (ctx.path.length > 0) { try { return (new URL(ctx.path[0])).origin; } catch { // Fall through... do nothing } } return kOpaqueOrigin; case 'ftp:': case 'http:': case 'https:': case 'ws:': case 'wss:': return serializeTupleOrigin(ctx.scheme, ctx.host, ctx.port); } return kOpaqueOrigin; } get protocol() { return this[context].scheme; } set protocol(scheme) { // toUSVString is not needed. scheme = `${scheme}`; if (scheme.length === 0) return; const ctx = this[context]; parse(scheme, kSchemeStart, null, ctx, FunctionPrototypeBind(onParseProtocolComplete, this)); } get username() { return this[context].username; } set username(username) { // toUSVString is not needed. username = `${username}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (username === '') { ctx.username = ''; ctx.flags &= ~URL_FLAGS_HAS_USERNAME; return; } ctx.username = encodeAuth(username); ctx.flags |= URL_FLAGS_HAS_USERNAME; } get password() { return this[context].password; } set password(password) { // toUSVString is not needed. password = `${password}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (password === '') { ctx.password = ''; ctx.flags &= ~URL_FLAGS_HAS_PASSWORD; return; } ctx.password = encodeAuth(password); ctx.flags |= URL_FLAGS_HAS_PASSWORD; } get host() { const ctx = this[context]; let ret = ctx.host || ''; if (ctx.port !== null) ret += `:${ctx.port}`; return ret; } set host(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHost, null, ctx, FunctionPrototypeBind(onParseHostComplete, this)); } get hostname() { return this[context].host || ''; } set hostname(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHostname, null, ctx, onParseHostnameComplete.bind(this)); } get port() { const port = this[context].port; return port === null ? '' : String(port); } set port(port) { // toUSVString is not needed. port = `${port}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (port === '') { ctx.port = null; return; } parse(port, kPort, null, ctx, FunctionPrototypeBind(onParsePortComplete, this)); } get pathname() { const ctx = this[context]; if (this[cannotBeBase]) return ctx.path[0]; if (ctx.path.length === 0) return ''; return `/${ArrayPrototypeJoin(ctx.path, '/')}`; } set pathname(path) { // toUSVString is not needed. path = `${path}`; if (this[cannotBeBase]) return; parse(path, kPathStart, null, this[context], onParsePathComplete.bind(this)); } get search() { const { query } = this[context]; if (query === null || query === '') return ''; return `?${query}`; } set search(search) { const ctx = this[context]; search = toUSVString(search); if (search === '') { ctx.query = null; ctx.flags &= ~URL_FLAGS_HAS_QUERY; } else { if (search[0] === '?') search = StringPrototypeSlice(search, 1); ctx.query = ''; ctx.flags |= URL_FLAGS_HAS_QUERY; if (search) { parse(search, kQuery, null, ctx, FunctionPrototypeBind(onParseSearchComplete, this)); } } initSearchParams(this[searchParams], search); } // readonly get searchParams() { return this[searchParams]; } get hash() { const { fragment } = this[context]; if (fragment === null || fragment === '') return ''; return `#${fragment}`; } set hash(hash) { const ctx = this[context]; // toUSVString is not needed. hash = `${hash}`; if (!hash) { ctx.fragment = null; ctx.flags &= ~URL_FLAGS_HAS_FRAGMENT; return; } if (hash[0] === '#') hash = StringPrototypeSlice(hash, 1); ctx.fragment = ''; ctx.flags |= URL_FLAGS_HAS_FRAGMENT; parse(hash, kFragment, null, ctx, FunctionPrototypeBind(onParseHashComplete, this)); } toJSON() { return this[kFormat]({}); } static createObjectURL(obj) { const cryptoRandom = lazyCryptoRandom(); if (cryptoRandom === undefined) throw new ERR_NO_CRYPTO(); // Yes, lazy loading is annoying but because of circular // references between the url, internal/blob, and buffer // modules, lazy loading here makes sure that things work. const blob = lazyBlob(); if (!blob.isBlob(obj)) throw new ERR_INVALID_ARG_TYPE('obj', 'Blob', obj); const id = cryptoRandom.randomUUID(); storeDataObject(id, obj[blob.kHandle], obj.size, obj.type); return `blob:nodedata:${id}`; } static revokeObjectURL(url) { url = `${url}`; try { const parsed = new URL(url); const split = StringPrototypeSplit(parsed.pathname, ':'); if (split.length === 2) revokeDataObject(split[1]); } catch { // If there's an error, it's ignored. } } })
User Aadhaar Card Front Copy (JPEG / PNG / JPG) (Max Length: class URL { constructor(input, base = undefined) { // toUSVString is not needed. input = `${input}`; let base_context; if (base !== undefined) { base_context = new URL(base)[context]; } this[context] = new URLContext(); parse(input, -1, base_context, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } get [special]() { return (this[context].flags & URL_FLAGS_SPECIAL) !== 0; } get [cannotBeBase]() { return (this[context].flags & URL_FLAGS_CANNOT_BE_BASE) !== 0; } // https://url.spec.whatwg.org/#cannot-have-a-username-password-port get [cannotHaveUsernamePasswordPort]() { const { host, scheme } = this[context]; return ((host == null || host === '') || this[cannotBeBase] || scheme === 'file:'); } [inspect.custom](depth, opts) { if (this == null || ObjectGetPrototypeOf(this[context]) !== URLContext.prototype) { throw new ERR_INVALID_THIS('URL'); } if (typeof depth === 'number' && depth < 0) return this; const constructor = getConstructorOf(this) || URL; const obj = ObjectCreate({ constructor }); obj.href = this.href; obj.origin = this.origin; obj.protocol = this.protocol; obj.username = this.username; obj.password = this.password; obj.host = this.host; obj.hostname = this.hostname; obj.port = this.port; obj.pathname = this.pathname; obj.search = this.search; obj.searchParams = this.searchParams; obj.hash = this.hash; if (opts.showHidden) { obj.cannotBeBase = this[cannotBeBase]; obj.special = this[special]; obj[context] = this[context]; } return `${constructor.name} ${inspect(obj, opts)}`; } [kFormat](options) { if (options) validateObject(options, 'options'); options = { fragment: true, unicode: false, search: true, auth: true, ...options }; const ctx = this[context]; // https://url.spec.whatwg.org/#url-serializing let ret = ctx.scheme; if (ctx.host !== null) { ret += '//'; const has_username = ctx.username !== ''; const has_password = ctx.password !== ''; if (options.auth && (has_username || has_password)) { if (has_username) ret += ctx.username; if (has_password) ret += `:${ctx.password}`; ret += '@'; } ret += options.unicode ? domainToUnicode(ctx.host) : ctx.host; if (ctx.port !== null) ret += `:${ctx.port}`; } if (this[cannotBeBase]) { ret += ctx.path[0]; } else { if (ctx.host === null && ctx.path.length > 1 && ctx.path[0] === '') { ret += '/.'; } if (ctx.path.length) { ret += '/' + ArrayPrototypeJoin(ctx.path, '/'); } } if (options.search && ctx.query !== null) ret += `?${ctx.query}`; if (options.fragment && ctx.fragment !== null) ret += `#${ctx.fragment}`; return ret; } // https://heycam.github.io/webidl/#es-stringifier toString() { return this[kFormat]({}); } get href() { return this[kFormat]({}); } set href(input) { // toUSVString is not needed. input = `${input}`; parse(input, -1, undefined, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } // readonly get origin() { // Refs: https://url.spec.whatwg.org/#concept-url-origin const ctx = this[context]; switch (ctx.scheme) { case 'blob:': if (ctx.path.length > 0) { try { return (new URL(ctx.path[0])).origin; } catch { // Fall through... do nothing } } return kOpaqueOrigin; case 'ftp:': case 'http:': case 'https:': case 'ws:': case 'wss:': return serializeTupleOrigin(ctx.scheme, ctx.host, ctx.port); } return kOpaqueOrigin; } get protocol() { return this[context].scheme; } set protocol(scheme) { // toUSVString is not needed. scheme = `${scheme}`; if (scheme.length === 0) return; const ctx = this[context]; parse(scheme, kSchemeStart, null, ctx, FunctionPrototypeBind(onParseProtocolComplete, this)); } get username() { return this[context].username; } set username(username) { // toUSVString is not needed. username = `${username}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (username === '') { ctx.username = ''; ctx.flags &= ~URL_FLAGS_HAS_USERNAME; return; } ctx.username = encodeAuth(username); ctx.flags |= URL_FLAGS_HAS_USERNAME; } get password() { return this[context].password; } set password(password) { // toUSVString is not needed. password = `${password}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (password === '') { ctx.password = ''; ctx.flags &= ~URL_FLAGS_HAS_PASSWORD; return; } ctx.password = encodeAuth(password); ctx.flags |= URL_FLAGS_HAS_PASSWORD; } get host() { const ctx = this[context]; let ret = ctx.host || ''; if (ctx.port !== null) ret += `:${ctx.port}`; return ret; } set host(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHost, null, ctx, FunctionPrototypeBind(onParseHostComplete, this)); } get hostname() { return this[context].host || ''; } set hostname(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHostname, null, ctx, onParseHostnameComplete.bind(this)); } get port() { const port = this[context].port; return port === null ? '' : String(port); } set port(port) { // toUSVString is not needed. port = `${port}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (port === '') { ctx.port = null; return; } parse(port, kPort, null, ctx, FunctionPrototypeBind(onParsePortComplete, this)); } get pathname() { const ctx = this[context]; if (this[cannotBeBase]) return ctx.path[0]; if (ctx.path.length === 0) return ''; return `/${ArrayPrototypeJoin(ctx.path, '/')}`; } set pathname(path) { // toUSVString is not needed. path = `${path}`; if (this[cannotBeBase]) return; parse(path, kPathStart, null, this[context], onParsePathComplete.bind(this)); } get search() { const { query } = this[context]; if (query === null || query === '') return ''; return `?${query}`; } set search(search) { const ctx = this[context]; search = toUSVString(search); if (search === '') { ctx.query = null; ctx.flags &= ~URL_FLAGS_HAS_QUERY; } else { if (search[0] === '?') search = StringPrototypeSlice(search, 1); ctx.query = ''; ctx.flags |= URL_FLAGS_HAS_QUERY; if (search) { parse(search, kQuery, null, ctx, FunctionPrototypeBind(onParseSearchComplete, this)); } } initSearchParams(this[searchParams], search); } // readonly get searchParams() { return this[searchParams]; } get hash() { const { fragment } = this[context]; if (fragment === null || fragment === '') return ''; return `#${fragment}`; } set hash(hash) { const ctx = this[context]; // toUSVString is not needed. hash = `${hash}`; if (!hash) { ctx.fragment = null; ctx.flags &= ~URL_FLAGS_HAS_FRAGMENT; return; } if (hash[0] === '#') hash = StringPrototypeSlice(hash, 1); ctx.fragment = ''; ctx.flags |= URL_FLAGS_HAS_FRAGMENT; parse(hash, kFragment, null, ctx, FunctionPrototypeBind(onParseHashComplete, this)); } toJSON() { return this[kFormat]({}); } static createObjectURL(obj) { const cryptoRandom = lazyCryptoRandom(); if (cryptoRandom === undefined) throw new ERR_NO_CRYPTO(); // Yes, lazy loading is annoying but because of circular // references between the url, internal/blob, and buffer // modules, lazy loading here makes sure that things work. const blob = lazyBlob(); if (!blob.isBlob(obj)) throw new ERR_INVALID_ARG_TYPE('obj', 'Blob', obj); const id = cryptoRandom.randomUUID(); storeDataObject(id, obj[blob.kHandle], obj.size, obj.type); return `blob:nodedata:${id}`; } static revokeObjectURL(url) { url = `${url}`; try { const parsed = new URL(url); const split = StringPrototypeSplit(parsed.pathname, ':'); if (split.length === 2) revokeDataObject(split[1]); } catch { // If there's an error, it's ignored. } } })
aadhaarBack (String) Required
User Aadhaar Card Back Copy (JPEG / PNG / JPG) (Max Length: class URL { constructor(input, base = undefined) { // toUSVString is not needed. input = `${input}`; let base_context; if (base !== undefined) { base_context = new URL(base)[context]; } this[context] = new URLContext(); parse(input, -1, base_context, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } get [special]() { return (this[context].flags & URL_FLAGS_SPECIAL) !== 0; } get [cannotBeBase]() { return (this[context].flags & URL_FLAGS_CANNOT_BE_BASE) !== 0; } // https://url.spec.whatwg.org/#cannot-have-a-username-password-port get [cannotHaveUsernamePasswordPort]() { const { host, scheme } = this[context]; return ((host == null || host === '') || this[cannotBeBase] || scheme === 'file:'); } [inspect.custom](depth, opts) { if (this == null || ObjectGetPrototypeOf(this[context]) !== URLContext.prototype) { throw new ERR_INVALID_THIS('URL'); } if (typeof depth === 'number' && depth < 0) return this; const constructor = getConstructorOf(this) || URL; const obj = ObjectCreate({ constructor }); obj.href = this.href; obj.origin = this.origin; obj.protocol = this.protocol; obj.username = this.username; obj.password = this.password; obj.host = this.host; obj.hostname = this.hostname; obj.port = this.port; obj.pathname = this.pathname; obj.search = this.search; obj.searchParams = this.searchParams; obj.hash = this.hash; if (opts.showHidden) { obj.cannotBeBase = this[cannotBeBase]; obj.special = this[special]; obj[context] = this[context]; } return `${constructor.name} ${inspect(obj, opts)}`; } [kFormat](options) { if (options) validateObject(options, 'options'); options = { fragment: true, unicode: false, search: true, auth: true, ...options }; const ctx = this[context]; // https://url.spec.whatwg.org/#url-serializing let ret = ctx.scheme; if (ctx.host !== null) { ret += '//'; const has_username = ctx.username !== ''; const has_password = ctx.password !== ''; if (options.auth && (has_username || has_password)) { if (has_username) ret += ctx.username; if (has_password) ret += `:${ctx.password}`; ret += '@'; } ret += options.unicode ? domainToUnicode(ctx.host) : ctx.host; if (ctx.port !== null) ret += `:${ctx.port}`; } if (this[cannotBeBase]) { ret += ctx.path[0]; } else { if (ctx.host === null && ctx.path.length > 1 && ctx.path[0] === '') { ret += '/.'; } if (ctx.path.length) { ret += '/' + ArrayPrototypeJoin(ctx.path, '/'); } } if (options.search && ctx.query !== null) ret += `?${ctx.query}`; if (options.fragment && ctx.fragment !== null) ret += `#${ctx.fragment}`; return ret; } // https://heycam.github.io/webidl/#es-stringifier toString() { return this[kFormat]({}); } get href() { return this[kFormat]({}); } set href(input) { // toUSVString is not needed. input = `${input}`; parse(input, -1, undefined, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } // readonly get origin() { // Refs: https://url.spec.whatwg.org/#concept-url-origin const ctx = this[context]; switch (ctx.scheme) { case 'blob:': if (ctx.path.length > 0) { try { return (new URL(ctx.path[0])).origin; } catch { // Fall through... do nothing } } return kOpaqueOrigin; case 'ftp:': case 'http:': case 'https:': case 'ws:': case 'wss:': return serializeTupleOrigin(ctx.scheme, ctx.host, ctx.port); } return kOpaqueOrigin; } get protocol() { return this[context].scheme; } set protocol(scheme) { // toUSVString is not needed. scheme = `${scheme}`; if (scheme.length === 0) return; const ctx = this[context]; parse(scheme, kSchemeStart, null, ctx, FunctionPrototypeBind(onParseProtocolComplete, this)); } get username() { return this[context].username; } set username(username) { // toUSVString is not needed. username = `${username}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (username === '') { ctx.username = ''; ctx.flags &= ~URL_FLAGS_HAS_USERNAME; return; } ctx.username = encodeAuth(username); ctx.flags |= URL_FLAGS_HAS_USERNAME; } get password() { return this[context].password; } set password(password) { // toUSVString is not needed. password = `${password}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (password === '') { ctx.password = ''; ctx.flags &= ~URL_FLAGS_HAS_PASSWORD; return; } ctx.password = encodeAuth(password); ctx.flags |= URL_FLAGS_HAS_PASSWORD; } get host() { const ctx = this[context]; let ret = ctx.host || ''; if (ctx.port !== null) ret += `:${ctx.port}`; return ret; } set host(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHost, null, ctx, FunctionPrototypeBind(onParseHostComplete, this)); } get hostname() { return this[context].host || ''; } set hostname(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHostname, null, ctx, onParseHostnameComplete.bind(this)); } get port() { const port = this[context].port; return port === null ? '' : String(port); } set port(port) { // toUSVString is not needed. port = `${port}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (port === '') { ctx.port = null; return; } parse(port, kPort, null, ctx, FunctionPrototypeBind(onParsePortComplete, this)); } get pathname() { const ctx = this[context]; if (this[cannotBeBase]) return ctx.path[0]; if (ctx.path.length === 0) return ''; return `/${ArrayPrototypeJoin(ctx.path, '/')}`; } set pathname(path) { // toUSVString is not needed. path = `${path}`; if (this[cannotBeBase]) return; parse(path, kPathStart, null, this[context], onParsePathComplete.bind(this)); } get search() { const { query } = this[context]; if (query === null || query === '') return ''; return `?${query}`; } set search(search) { const ctx = this[context]; search = toUSVString(search); if (search === '') { ctx.query = null; ctx.flags &= ~URL_FLAGS_HAS_QUERY; } else { if (search[0] === '?') search = StringPrototypeSlice(search, 1); ctx.query = ''; ctx.flags |= URL_FLAGS_HAS_QUERY; if (search) { parse(search, kQuery, null, ctx, FunctionPrototypeBind(onParseSearchComplete, this)); } } initSearchParams(this[searchParams], search); } // readonly get searchParams() { return this[searchParams]; } get hash() { const { fragment } = this[context]; if (fragment === null || fragment === '') return ''; return `#${fragment}`; } set hash(hash) { const ctx = this[context]; // toUSVString is not needed. hash = `${hash}`; if (!hash) { ctx.fragment = null; ctx.flags &= ~URL_FLAGS_HAS_FRAGMENT; return; } if (hash[0] === '#') hash = StringPrototypeSlice(hash, 1); ctx.fragment = ''; ctx.flags |= URL_FLAGS_HAS_FRAGMENT; parse(hash, kFragment, null, ctx, FunctionPrototypeBind(onParseHashComplete, this)); } toJSON() { return this[kFormat]({}); } static createObjectURL(obj) { const cryptoRandom = lazyCryptoRandom(); if (cryptoRandom === undefined) throw new ERR_NO_CRYPTO(); // Yes, lazy loading is annoying but because of circular // references between the url, internal/blob, and buffer // modules, lazy loading here makes sure that things work. const blob = lazyBlob(); if (!blob.isBlob(obj)) throw new ERR_INVALID_ARG_TYPE('obj', 'Blob', obj); const id = cryptoRandom.randomUUID(); storeDataObject(id, obj[blob.kHandle], obj.size, obj.type); return `blob:nodedata:${id}`; } static revokeObjectURL(url) { url = `${url}`; try { const parsed = new URL(url); const split = StringPrototypeSplit(parsed.pathname, ':'); if (split.length === 2) revokeDataObject(split[1]); } catch { // If there's an error, it's ignored. } } })
User Aadhaar Card Back Copy (JPEG / PNG / JPG) (Max Length: class URL { constructor(input, base = undefined) { // toUSVString is not needed. input = `${input}`; let base_context; if (base !== undefined) { base_context = new URL(base)[context]; } this[context] = new URLContext(); parse(input, -1, base_context, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } get [special]() { return (this[context].flags & URL_FLAGS_SPECIAL) !== 0; } get [cannotBeBase]() { return (this[context].flags & URL_FLAGS_CANNOT_BE_BASE) !== 0; } // https://url.spec.whatwg.org/#cannot-have-a-username-password-port get [cannotHaveUsernamePasswordPort]() { const { host, scheme } = this[context]; return ((host == null || host === '') || this[cannotBeBase] || scheme === 'file:'); } [inspect.custom](depth, opts) { if (this == null || ObjectGetPrototypeOf(this[context]) !== URLContext.prototype) { throw new ERR_INVALID_THIS('URL'); } if (typeof depth === 'number' && depth < 0) return this; const constructor = getConstructorOf(this) || URL; const obj = ObjectCreate({ constructor }); obj.href = this.href; obj.origin = this.origin; obj.protocol = this.protocol; obj.username = this.username; obj.password = this.password; obj.host = this.host; obj.hostname = this.hostname; obj.port = this.port; obj.pathname = this.pathname; obj.search = this.search; obj.searchParams = this.searchParams; obj.hash = this.hash; if (opts.showHidden) { obj.cannotBeBase = this[cannotBeBase]; obj.special = this[special]; obj[context] = this[context]; } return `${constructor.name} ${inspect(obj, opts)}`; } [kFormat](options) { if (options) validateObject(options, 'options'); options = { fragment: true, unicode: false, search: true, auth: true, ...options }; const ctx = this[context]; // https://url.spec.whatwg.org/#url-serializing let ret = ctx.scheme; if (ctx.host !== null) { ret += '//'; const has_username = ctx.username !== ''; const has_password = ctx.password !== ''; if (options.auth && (has_username || has_password)) { if (has_username) ret += ctx.username; if (has_password) ret += `:${ctx.password}`; ret += '@'; } ret += options.unicode ? domainToUnicode(ctx.host) : ctx.host; if (ctx.port !== null) ret += `:${ctx.port}`; } if (this[cannotBeBase]) { ret += ctx.path[0]; } else { if (ctx.host === null && ctx.path.length > 1 && ctx.path[0] === '') { ret += '/.'; } if (ctx.path.length) { ret += '/' + ArrayPrototypeJoin(ctx.path, '/'); } } if (options.search && ctx.query !== null) ret += `?${ctx.query}`; if (options.fragment && ctx.fragment !== null) ret += `#${ctx.fragment}`; return ret; } // https://heycam.github.io/webidl/#es-stringifier toString() { return this[kFormat]({}); } get href() { return this[kFormat]({}); } set href(input) { // toUSVString is not needed. input = `${input}`; parse(input, -1, undefined, undefined, FunctionPrototypeBind(onParseComplete, this), FunctionPrototypeBind(onParseError, this, input)); } // readonly get origin() { // Refs: https://url.spec.whatwg.org/#concept-url-origin const ctx = this[context]; switch (ctx.scheme) { case 'blob:': if (ctx.path.length > 0) { try { return (new URL(ctx.path[0])).origin; } catch { // Fall through... do nothing } } return kOpaqueOrigin; case 'ftp:': case 'http:': case 'https:': case 'ws:': case 'wss:': return serializeTupleOrigin(ctx.scheme, ctx.host, ctx.port); } return kOpaqueOrigin; } get protocol() { return this[context].scheme; } set protocol(scheme) { // toUSVString is not needed. scheme = `${scheme}`; if (scheme.length === 0) return; const ctx = this[context]; parse(scheme, kSchemeStart, null, ctx, FunctionPrototypeBind(onParseProtocolComplete, this)); } get username() { return this[context].username; } set username(username) { // toUSVString is not needed. username = `${username}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (username === '') { ctx.username = ''; ctx.flags &= ~URL_FLAGS_HAS_USERNAME; return; } ctx.username = encodeAuth(username); ctx.flags |= URL_FLAGS_HAS_USERNAME; } get password() { return this[context].password; } set password(password) { // toUSVString is not needed. password = `${password}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (password === '') { ctx.password = ''; ctx.flags &= ~URL_FLAGS_HAS_PASSWORD; return; } ctx.password = encodeAuth(password); ctx.flags |= URL_FLAGS_HAS_PASSWORD; } get host() { const ctx = this[context]; let ret = ctx.host || ''; if (ctx.port !== null) ret += `:${ctx.port}`; return ret; } set host(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHost, null, ctx, FunctionPrototypeBind(onParseHostComplete, this)); } get hostname() { return this[context].host || ''; } set hostname(host) { const ctx = this[context]; // toUSVString is not needed. host = `${host}`; if (this[cannotBeBase]) { // Cannot set the host if cannot-be-base is set return; } parse(host, kHostname, null, ctx, onParseHostnameComplete.bind(this)); } get port() { const port = this[context].port; return port === null ? '' : String(port); } set port(port) { // toUSVString is not needed. port = `${port}`; if (this[cannotHaveUsernamePasswordPort]) return; const ctx = this[context]; if (port === '') { ctx.port = null; return; } parse(port, kPort, null, ctx, FunctionPrototypeBind(onParsePortComplete, this)); } get pathname() { const ctx = this[context]; if (this[cannotBeBase]) return ctx.path[0]; if (ctx.path.length === 0) return ''; return `/${ArrayPrototypeJoin(ctx.path, '/')}`; } set pathname(path) { // toUSVString is not needed. path = `${path}`; if (this[cannotBeBase]) return; parse(path, kPathStart, null, this[context], onParsePathComplete.bind(this)); } get search() { const { query } = this[context]; if (query === null || query === '') return ''; return `?${query}`; } set search(search) { const ctx = this[context]; search = toUSVString(search); if (search === '') { ctx.query = null; ctx.flags &= ~URL_FLAGS_HAS_QUERY; } else { if (search[0] === '?') search = StringPrototypeSlice(search, 1); ctx.query = ''; ctx.flags |= URL_FLAGS_HAS_QUERY; if (search) { parse(search, kQuery, null, ctx, FunctionPrototypeBind(onParseSearchComplete, this)); } } initSearchParams(this[searchParams], search); } // readonly get searchParams() { return this[searchParams]; } get hash() { const { fragment } = this[context]; if (fragment === null || fragment === '') return ''; return `#${fragment}`; } set hash(hash) { const ctx = this[context]; // toUSVString is not needed. hash = `${hash}`; if (!hash) { ctx.fragment = null; ctx.flags &= ~URL_FLAGS_HAS_FRAGMENT; return; } if (hash[0] === '#') hash = StringPrototypeSlice(hash, 1); ctx.fragment = ''; ctx.flags |= URL_FLAGS_HAS_FRAGMENT; parse(hash, kFragment, null, ctx, FunctionPrototypeBind(onParseHashComplete, this)); } toJSON() { return this[kFormat]({}); } static createObjectURL(obj) { const cryptoRandom = lazyCryptoRandom(); if (cryptoRandom === undefined) throw new ERR_NO_CRYPTO(); // Yes, lazy loading is annoying but because of circular // references between the url, internal/blob, and buffer // modules, lazy loading here makes sure that things work. const blob = lazyBlob(); if (!blob.isBlob(obj)) throw new ERR_INVALID_ARG_TYPE('obj', 'Blob', obj); const id = cryptoRandom.randomUUID(); storeDataObject(id, obj[blob.kHandle], obj.size, obj.type); return `blob:nodedata:${id}`; } static revokeObjectURL(url) { url = `${url}`; try { const parsed = new URL(url); const split = StringPrototypeSplit(parsed.pathname, ':'); if (split.length === 2) revokeDataObject(split[1]); } catch { // If there's an error, it's ignored. } } })
Request
cURL
curl --location --request POST '/v1/service/verification/ocr/aadhaar' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic e3tsb2NfdXNlcn19Ont7bG9jX3Bhc3N9fQ==' \
--data-raw '{
"clientRefId" : "aadhaarIDs333",
"aadhaarFront": "https://example.com/aadhaasrFront.jpg",
"aadhaarBack": "https://example.com/aadhaarBack.jpg"
}'
Response Samples
- SUCCESS
- FAILED
{
"code": "0x0200",
"message": "Record fetched successfully.",
"status": "SUCCESS",
"data": {
"ocrRefId": "OCA80245647548293232E",
"ocrStatus": "completed",
"clientRefId": "OCRAAC123456",
"extractionOutput": {
"address": "/3 , S/O Rajbabu Pal , ,/ Area/Locality/Sector TURANG , , Village/ Town/City Turang , District , Puruliya , P.O. Bijoydih , State , West Benga , PinCode",
"dateOfBirth": "",
"district": "Puruliya",
"fatherName": "Rajbabu Pal",
"gender": "",
"houseNumber": "",
"idNumber": "434541045032",
"nameOnCard": "Ajay Pal",
"pincode": "723128",
"state": "West Bengal",
"streetAddress": "",
"yearOfBirth": ""
},
"qrOutput": {
"address": null,
"dateOfBirth": null,
"district": null,
"gender": null,
"houseNumber": null,
"idNumber": null,
"nameOnCard": null,
"pincode": null,
"state": null,
"streetAddress": null,
"yearOfBirth": null
}
}
}
{
"code": "0x0202",
"status": "FAILURE",
"message": "Record not fetched.",
}
Response Code
| Status Code | Status | Message |
|---|---|---|
| 0x0200 | SUCCESS | TRANSACTION SUCCESSFULL |
| 0x0201 | UNAUTHORIZED | UNAUTHORIZED USER |
| 0x0202 | FAILURE | FAILURE USER |
| 0x0203 | MISSING_PARAMETER | MISSING PARAMETER |
| 0x0204 | CONNECTION_TIMEOUT | CONNECTION TIMEOUT |
| 0x0205 | SOMETHING_WENT_WRONG | SOMETHING WENT WRONG |
| 0x0206 | PENDING | TRANSACTION PENDING |
| 0x0208 | 2FA | TWO FACTOR AUNTHENTICATION |