# Fetch ocr data for second id

`GET /omni/get/ocr-data-second-id`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Returns data about user read from the second id.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | string |  | Id of onboarding for which data are requested. If not present, it will be extracted from token. |
| `api-version` | header | string | yes |  |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | object |  |  |
| `name.fullName` | string |  |  |
| `name.fullNameNativeScript` | string |  |  |
| `name.firstNameNativeScript` | string |  |  |
| `name.paternalLastNameNativeScript` | string |  |  |
| `name.maternalLastNameNativeScript` | string |  |  |
| `name.machineReadableFullName` | string |  | Full name from Barcode or MRZ |
| `name.firstName` | string |  |  |
| `name.middleName` | string |  |  |
| `name.givenName` | string |  |  |
| `name.givenNameMrz` | string |  |  |
| `name.nameSuffix` | string |  |  |
| `name.paternalLastName` | string |  |  |
| `name.maternalLastName` | string |  |  |
| `name.lastNameMrz` | string |  |  |
| `name.familyName` | string |  |  |
| `address` | string |  | Address as read from id. Address can have two or three lines. Lines are separated by \n |
| `addressFields` | object |  |  |
| `addressFields.street` | string |  | Street line in the way it is read from address string. |
| `addressFields.streetName` | string |  | Street name without exterior and interior numbers. |
| `addressFields.colony` | string |  | Colony line the way it is read from address string. (Not applicable for all countries) |
| `addressFields.postalCode` | string |  | Postal code in the way it is read from address string. |
| `addressFields.city` | string |  | City in the way it is read from address string. |
| `addressFields.state` | string |  | State in the way it is read from address string. |
| `addressFields.stateName` | string |  | Full StateName. |
| `addressFields.district` | string |  | District in the way it is read from address string. |
| `addressFields.stateCode` | string |  | State code if applicable. |
| `addressFields.addressCountryCode` | string |  | Address country code if applicable. |
| `addressFields.label` | string |  | Full address label. |
| `addressFields.exteriorNumber` | string |  | Exterior street number. |
| `addressFields.interiorNumber` | string |  | Interior street number. |
| `addressFields.addressLine1` | string |  | The primary line in the address that contains the most essential details for locating a place. |
| `addressFields.streetType` | string |  | Street type |
| `fullAddress` | boolean |  | This field is set to true if address from id is full (has three lines) or not (For Mexican Voter IDs only). |
| `invalidAddress` | boolean |  | This field checks for a valid street, numeric postal code with 5 digits, and that both colony and city have values. (Only checked for Mexican IDs) |
| `checkedAddress` | string |  | Address as obtained after processing with geocoder geolocation api. |
| `checkedAddressBean` | object |  |  |
| `checkedAddressBean.street` | string |  | Street line in the way it is read from address string. |
| `checkedAddressBean.streetName` | string |  | Street name without exterior and interior numbers. |
| `checkedAddressBean.colony` | string |  | Colony line the way it is read from address string. (Not applicable for all countries) |
| `checkedAddressBean.postalCode` | string |  | Postal code in the way it is read from address string. |
| `checkedAddressBean.city` | string |  | City in the way it is read from address string. |
| `checkedAddressBean.state` | string |  | State in the way it is read from address string. |
| `checkedAddressBean.stateName` | string |  | Full StateName. |
| `checkedAddressBean.district` | string |  | District in the way it is read from address string. |
| `checkedAddressBean.stateCode` | string |  | State code if applicable. |
| `checkedAddressBean.addressCountryCode` | string |  | Address country code if applicable. |
| `checkedAddressBean.label` | string |  | Full address label. |
| `checkedAddressBean.exteriorNumber` | string |  | Exterior street number. |
| `checkedAddressBean.interiorNumber` | string |  | Interior street number. |
| `checkedAddressBean.addressLine1` | string |  | The primary line in the address that contains the most essential details for locating a place. |
| `checkedAddressBean.streetType` | string |  | Street type |
| `exteriorNumber` | string |  | Exterior street number. |
| `interiorNumber` | string |  | Interior street number. |
| `addressFromStatement` | string |  | Address as read from address statement. Lines are separated by \n. |
| `addressFieldsFromStatement` | object |  |  |
| `addressFieldsFromStatement.street` | string |  | Street line in the way it is read from address string. |
| `addressFieldsFromStatement.streetName` | string |  | Street name without exterior and interior numbers. |
| `addressFieldsFromStatement.colony` | string |  | Colony line the way it is read from address string. (Not applicable for all countries) |
| `addressFieldsFromStatement.postalCode` | string |  | Postal code in the way it is read from address string. |
| `addressFieldsFromStatement.city` | string |  | City in the way it is read from address string. |
| `addressFieldsFromStatement.state` | string |  | State in the way it is read from address string. |
| `addressFieldsFromStatement.stateName` | string |  | Full StateName. |
| `addressFieldsFromStatement.district` | string |  | District in the way it is read from address string. |
| `addressFieldsFromStatement.stateCode` | string |  | State code if applicable. |
| `addressFieldsFromStatement.addressCountryCode` | string |  | Address country code if applicable. |
| `addressFieldsFromStatement.label` | string |  | Full address label. |
| `addressFieldsFromStatement.exteriorNumber` | string |  | Exterior street number. |
| `addressFieldsFromStatement.interiorNumber` | string |  | Interior street number. |
| `addressFieldsFromStatement.addressLine1` | string |  | The primary line in the address that contains the most essential details for locating a place. |
| `addressFieldsFromStatement.streetType` | string |  | Street type |
| `invalidAddressFromStatement` | boolean |  | This field checks for a valid street, numeric postal code with 5 digits, and tha both colony and city have values. (Only checked for Mexican POA) |
| `addressStatementEmissionDate` | integer (int64) |  | Issue date of address statement. The value is presented in UTC milliseconds. |
| `documentType` | string |  | Type of address statement document. Possible values: - Mexico: liverpool, citibanamex, cfe, telcel, izzi, axtel, telmex, oapas, sacmex, opdm, naturgy, drenaje, totalplay, dhc, att, cea, smapa, megacable, jmas, amicsa, caev - Bolivia: cre - Uruguay: ute - Unknown document: otherPoa Enum: `a1`, `aggm`, `apg`, `energieAg`, `cre`, `aforeAzteca`, `amd`, `amicsa`, `att`, `axtel`, `bancoppel`, `bancoAzteca`, `banorte`, `bbva`, `cab`, `caev`, `capa`, `cea`, `cfe`, `citibanamex`, `cmapa`, `cmapaGrande`, `cmapas`, `cmas`, `cmasBlue`, `comapa`, `comapaRed`, `coppel`, `dapa`, `dhc`, `drenaje`, `ecogas`, `engie`, `gasNatural`, `h`, `hsbc`, `inbursa`, `infonavit`, `interapas`, `isagas`, `izzi`, `jad`, `japam`, `japama`, `japami`, `japay`, `jiapaz`, `jmas`, `jras`, `jumapac`, `jumapam`, `lerdo`, `liverpool`, `mas`, `megacable`, `naturgy`, `oapas`, `odapas`, `ooapas`, `opdm`, `oroapa`, `sacmex`, `sacmexCdmx`, `santander`, `sapa`, `sapal`, `sapamuy`, `sapasa`, `sapasma`, `scotiabank`, `seapal`, `siapa`, `simapag`, `simapas`, `simas`, `smapa`, `smapac`, `smapam`, `smapas`, `spectrum`, `stori`, `sura`, `tam`, `telcel`, `telmex`, `totalplay`, `veolia`, `victoria`, `wizz`, `asylumSeeker`, `refugeeId`, `refugeeStatus`, `ute`, `telkom`, `tmobile`, `verizon`, `xfinity`, `aforeCoppel`, `americanExpress`, `ap`, `telnor`, `wellsFargo`, `otherPoa` |
| `addressStatementTimestamps` | array[AddressStatementDate] |  |  |
| `addressStatementTimestamps.get_version` | integer (int64) |  |  |
| `addressStatementTimestamps.dateType` | string |  | Description of timestamp. |
| `addressStatementTimestamps.addressStatementTimestamp` | integer (int64) |  | UTC timestamp. |
| `poaName` | string |  | Extracted name from address statement. |
| `typeOfId` | string |  | Enum: `Unknown`, `Passport`, `Visa`, `DriversLicense`, `IdentificationCard`, `Permit`, `Currency`, `ResidenceDocument`, `TravelDocument`, `BirthCertificate`, `VehicleRegistration`, `Other`, `WeaponLicense`, `TribalIdentification`, `VoterIdentification`, `Military`, `TaxIdentification`, `FederalID`, `MedicalCard` |
| `documentFrontSubtype` | string |  | Additional info about ID type (front side) |
| `documentBackSubtype` | string |  | Additional info about ID type (back side) |
| `issueFront` | integer (int32) |  | Issue year (per classification model) of the ID (front side) |
| `issueBack` | integer (int32) |  | Issue year (per classification model) of the ID (back side) |
| `birthDate` | integer (int64) |  | Date of birth is presented in UTC milliseconds. |
| `gender` | string |  | Gender values are presented in English. "M" for male, "F" for female and "X" for non-binary. Enum: `M`, `F`, `X` |
| `claveDeElector` | string |  | Clave de elector as read from id. For Mexican IDs only. |
| `curp` | string |  | Curp as read form id. For Mexican IDs only. |
| `numeroEmisionCredencial` | string |  | Numero Emision Credencial as read from id. (For Mexican IDs only). |
| `cic` | string |  | Cic as read from id. (This field is read from back side of id; For Mexican IDs only). |
| `ocr` | string |  | Ocr as read from id. (This field is read from back side of id; For Mexican IDs only). |
| `documentNumber` | string |  | Document number. |
| `documentNumberSource` | string |  | Document number source. Enum: `FORM`, `OCR` |
| `personalNumber` | string |  | Personal number. |
| `nationalNumber` | string |  | National number. |
| `refNumber` | string |  | Document Reference Number. |
| `taxIdNumber` | string |  | Personal tax identification number. |
| `nue` | string |  | NUE number as read from id. (for Resident Cards) |
| `externalId` | string |  | External user id. |
| `issuedAt` | string |  | Date of issue UTC timestamp. |
| `expireAt` | string |  | Expiration date UTC timestamp. |
| `expirationDate` | integer (int32) |  | Expiration year of id. |
| `issueDate` | integer (int32) |  | Issue year of id. |
| `registrationDate` | integer (int32) |  | Registration date read from id. |
| `dlClassDetails` | array[DLClassDetails] |  |  |
| `dlClassDetails.dlClass` | string |  | Driver's license class. |
| `dlClassDetails.validFromDate` | integer (int64) |  | DL class valid from UTC timestamp |
| `dlClassDetails.validToDate` | integer (int64) |  | DL class valid to UTC timestamp. |
| `dlClassDetails.additionalCodes` | string |  | Additional codes associated with DL class. |
| `dlClassDetails.restrictions` | array[string] |  | Restriction codes associated with DL class. |
| `issuingCountry` | string |  | Issuing country of document. |
| `issuingState` | string |  | Issuing state of document. |
| `birthPlace` | string |  | Birth place as read from id. |
| `issuingAuthority` | string |  | Issuing Authority as read from id. |
| `height` | string |  | Person's height as read from id. |
| `weight` | string |  | Person's weight. |
| `eyeColor` | string |  | Person's eye color. |
| `hairColor` | string |  | Person's hair color. |
| `religion` | string |  | Person's religion. |
| `bloodType` | string |  | Person's blood type. |
| `maritalStatus` | string |  | Person's marital status. |
| `nationality` | string |  | Person's nationality. |
| `race` | string |  | Person's race. |
| `nationalityMrz` | string |  | Person's nationality as it appears in MRZ (if present). |
| `nationalityAlpha3` | string |  | Person's nationality Alpha3 code format. Only for Brazilian IDs. |
| `governmentComparisonResults` | object |  | Government validation data. Only for supported government validation countries. |
| `governmentComparisonResults.paternalLastNameValid` | boolean |  | Indicates validity of person's paternal last name through government validation apis. |
| `governmentComparisonResults.maternalLastNameValid` | boolean |  | Indicates validity of person's maternal last name through government validation apis. |
| `governmentComparisonResults.firstNameValid` | boolean |  | Indicates validity of person's first name through government validation apis. |
| `governmentComparisonResults.curpValid` | boolean |  | Indicates CURP validity through RENAPO/CURP provider validation. |
| `governmentComparisonResults.ineCurpValid` | boolean |  | Indicates CURP validity through INE government validation (separate from RENAPO). |
| `governmentComparisonResults.ocrValid` | boolean |  | Indicates ocr validity through government validation apis. |
| `governmentComparisonResults.claveDeElectorValid` | boolean |  | Indicates "clave de elector" validity through government validation apis. |
| `governmentComparisonResults.numeroEmisionCredencialValid` | boolean |  | Indicates "numero emision credencial" validity through government validation apis. |
| `governmentComparisonResults.registrationDateValid` | boolean |  | Indicates registration date validity through government validation apis. |
| `governmentComparisonResults.issueDateValid` | boolean |  | Indicates issue date validity through government validation apis. |
| `notExtracted` | integer (int32) |  | Number of not extracted OCR fields. Only for Mexican IDs. |
| `notExtractedDetails` | array[string] |  |  |
| `classes` | string |  | Person's driver licence classes. |
| `cond` | string |  | Person's driver licence conditions. |
| `mentions` | string |  | Person's driver licence mentions. |
| `restrictions` | string |  | Person's driver licence restrictions. |
| `mrz1` | string |  | First MRZ line. |
| `mrz2` | string |  | Second MRZ line. |
| `mrz3` | string |  | Third MRZ line. |
| `fullNameMrz` | string |  | Person's full name read from MRZ. |
| `documentNumberCheckDigit` | string |  | Document number check digit read from MRZ. |
| `dateOfBirthCheckDigit` | string |  | Date of birth check digit read from MRZ. |
| `expirationDateCheckDigit` | string |  | Expiration date check digit read from MRZ. |
| `barcodeRawData` | string |  | Full unformatted data read from 2D barcode. |
| `fathersName` | string |  | Person's father's name. Only for Brazilian and Indian IDs. |
| `mothersName` | string |  | Person's mother's name. Only for Brazilian IDs. |
| `fathersIdNumber` | string |  | Person's father's Id Number. In the context of minors identity validation. |
| `mothersIdNumber` | string |  | Person's mother's Id Number. In the context of minors identity validation. |
| `spouseName` | string |  | Person's spouse's name. |
| `federalRevenueNumber` | string |  | Federal revenue number. Only for Brazilian IDs. |
| `originDocumentId` | string |  | Origin document ID. Only for Brazilian IDs. |
| `driversLicenseCategory` | string |  | Driver's licence category. Only for Brazilian IDs. |
| `controlNumber` | string |  | Control number. Only for Brazilian IDs. |
| `renach` | string |  | Renach. Only for Brazilian IDs. |
| `additionalAttrs` | array[string] |  | Additional document attributes. |
| `ocrDataConfidence` | object |  | Structure containing ocr reliability confidence for each extracted ocr field. Confidence values are Floats between 0 and 1. |
| `ocrDataConfidence.birthDateConfidence` | number (float) |  |  |
| `ocrDataConfidence.nameConfidence` | number (float) |  |  |
| `ocrDataConfidence.nameNativeScriptConfidence` | number (float) |  |  |
| `ocrDataConfidence.firstNameNativeScriptConfidence` | number (float) |  |  |
| `ocrDataConfidence.paternalLastNameNativeScriptConfidence` | number (float) |  |  |
| `ocrDataConfidence.maternalLastNameNativeScriptConfidence` | number (float) |  |  |
| `ocrDataConfidence.givenNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.firstNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.middleNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.nameSuffixConfidence` | number (float) |  |  |
| `ocrDataConfidence.mothersSurnameConfidence` | number (float) |  |  |
| `ocrDataConfidence.fathersSurnameConfidence` | number (float) |  |  |
| `ocrDataConfidence.nickNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.fullNameMrzConfidence` | number (float) |  |  |
| `ocrDataConfidence.mothersNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.fathersNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.mothersIdNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.fathersIdNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.spouseNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.birthNameConfidence` | number (float) |  |  |
| `ocrDataConfidence.addressConfidence` | number (float) |  |  |
| `ocrDataConfidence.streetConfidence` | number (float) |  |  |
| `ocrDataConfidence.colonyConfidence` | number (float) |  |  |
| `ocrDataConfidence.postalCodeConfidence` | number (float) |  |  |
| `ocrDataConfidence.cityConfidence` | number (float) |  |  |
| `ocrDataConfidence.stateConfidence` | number (float) |  |  |
| `ocrDataConfidence.districtConfidence` | number (float) |  |  |
| `ocrDataConfidence.stateCodeConfidence` | number (float) |  |  |
| `ocrDataConfidence.countryCodeConfidence` | number (float) |  |  |
| `ocrDataConfidence.genderConfidence` | number (float) |  |  |
| `ocrDataConfidence.issueDateConfidence` | number (float) |  |  |
| `ocrDataConfidence.expirationDateConfidence` | number (float) |  |  |
| `ocrDataConfidence.issuedAtConfidence` | number (float) |  |  |
| `ocrDataConfidence.expireAtConfidence` | number (float) |  |  |
| `ocrDataConfidence.issuingAuthorityConfidence` | number (float) |  |  |
| `ocrDataConfidence.mrz1Confidence` | number (float) |  |  |
| `ocrDataConfidence.mrz2Confidence` | number (float) |  |  |
| `ocrDataConfidence.mrz3Confidence` | number (float) |  |  |
| `ocrDataConfidence.mrzFullConfidence` | number (float) |  |  |
| `ocrDataConfidence.documentNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.backNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.personalNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.nationalNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.claveDeElectorConfidence` | number (float) |  |  |
| `ocrDataConfidence.numeroEmisionCredencialConfidence` | number (float) |  |  |
| `ocrDataConfidence.curpConfidence` | number (float) |  |  |
| `ocrDataConfidence.nueConfidence` | number (float) |  |  |
| `ocrDataConfidence.registrationDateConfidence` | number (float) |  |  |
| `ocrDataConfidence.heightConfidence` | number (float) |  |  |
| `ocrDataConfidence.birthPlaceConfidence` | number (float) |  |  |
| `ocrDataConfidence.bloodTypeConfidence` | number (float) |  |  |
| `ocrDataConfidence.eyeColorConfidence` | number (float) |  |  |
| `ocrDataConfidence.classesConfidence` | number (float) |  |  |
| `ocrDataConfidence.condConfidence` | number (float) |  |  |
| `ocrDataConfidence.mentionsConfidence` | number (float) |  |  |
| `ocrDataConfidence.refNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.weightConfidence` | number (float) |  |  |
| `ocrDataConfidence.hairConfidence` | number (float) |  |  |
| `ocrDataConfidence.restrictionsConfidence` | number (float) |  |  |
| `ocrDataConfidence.nationalityConfidence` | number (float) |  |  |
| `ocrDataConfidence.nationalityMrzConfidence` | number (float) |  |  |
| `ocrDataConfidence.nationalityAlpha3Confidence` | number (float) |  |  |
| `ocrDataConfidence.maritalStatusConfidence` | number (float) |  |  |
| `ocrDataConfidence.raceConfidence` | number (float) |  |  |
| `ocrDataConfidence.taxIdNumberConfidence` | number (float) |  |  |
| `ocrDataConfidence.jurisdictionCodeConfidence` | number (float) |  |  |
| `additionalDocumentAttempts` | array[AdditionalDocumentAttemptDto] |  |  |
| `additionalDocumentAttempts.status` | string |  | Enum: `SUCCESS`, `VALIDATION_ERROR`, `FAIL` |
| `additionalDocumentAttempts.attemptTimestamp` | integer (int64) |  |  |
| `additionalDocumentAttempts.imagesUrl` | array[string] |  |  |
| `additionalDocumentAttempts.attemptType` | string |  | Enum: `POA`, `DOCUMENT_CAPTURE` |
| `additionalDocumentAttempts.documentType` | string | yes |  |
| `documentSubmissionMethod` | string |  | Method used to submit the document. Enum: `CAPTURED_DOCUMENT`, `UPLOADED_FILE`, `IMPORTED_CREDENTIAL` |
| `credentialsProvider` | string |  | Credentials provider used when documentSubmissionMethod is IMPORTED_CREDENTIAL. Enum: `APPLE`, `GOOGLE`, `DIGILOCKER`, `SAMSUNG` |

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |
