FMM service description
Forma Migratoria MX Services allows to validate a Permanent Resident Card(FMM) by processing an image, verifying its authenticity and responding with information about the document.
~/api/residentcard/validate
POST
Parameters
Tag |
Type |
Required |
Description |
FrontID |
file |
yes |
Support jpg, jpeg or png images. |
BackID |
file |
yes |
Support jpg, jpeg or png images. |
Tag |
Type |
Required |
Description |
apiKey |
string |
yes |
Customer key. |
Answers document
Name |
Type |
Description |
Result: |
|
|
valid |
boolean |
True or False result of global verification. |
data: |
|
|
status |
string |
Status verification of the image and optical scanner. |
graphics fields |
string |
Document image scan result. |
text fields |
string |
Document image scan result. |
document images |
string |
Cropping of the official document. |
document type |
string |
Type of document. |
image quality |
string |
Image quality of the official document. |
warnings: |
|
|
code |
string |
Error code |
message |
string |
Error message |
Description about answers document
Result name |
Result type |
Description |
Status |
33 |
The statuses of all verifications performed. |
Text |
36 |
The text data. |
Images |
37 |
The graphic data. |
OneCandidate |
9 |
The information about the document type. |
ImageQualityCheckList |
30 |
The results of image quality checks. |
AuthenticityCheckList |
20 |
The results of document authenticity checks. |
MrzPosition |
61 |
The information about the MRZ position. |
DocumentPosition |
85 |
The information about the document position. |
Containers
Status
This result type contains the statuses of all verifications performed.
Status
├── overallStatus
├── optical
├── rfid
├── detailsOptical
│ ├── overallStatus
│ ├── docType
│ ├── expiry
│ ├── imageQA
│ ├── mrz
│ ├── pagesCount
│ ├── security
│ ├── text
│ └── vds
├── detailsRFID
│ ├── overallStatus
│ ├── BAC
│ ├── PACE
│ ├── CA
│ ├── TA
│ ├── AA
│ └── PA
├── portrait
└── stopList
Parameter |
Description |
overallStatus |
The summary of all checks, one of the CheckResult enumeration values. |
optical |
The summary of all optical checks. Same as detailsOptical.overallStatus, one of the CheckResult enumeration values. |
rfid |
The summary of all RFID checks. Same as detailsRFID.overallStatus, one of the CheckResult enumeration values. |
detailsOptical.overallStatus |
The summary of all optical checks. Same as optical, one of the CheckResult enumeration values. |
detailsOptical.docType |
The check status if document type was recognized or not, one of the CheckResult enumeration values. |
detailsOptical.expiry |
The document validity period verification status, one of the CheckResult enumeration values. |
detailsOptical.imageQA |
The input images quality verification status, one of the CheckResult enumeration values. |
detailsOptical.mrz |
MRZ verification: values validity, dates, checkdigits verification, one of the CheckResult enumeration values. |
detailsOptical.pagesCount |
The number of scanned document pages, integer. |
detailsOptical.security |
The authenticity verification status, one of the CheckResult enumeration values. |
detailsOptical.text |
Text fields status: values validity for specific fields, cross-comparison of values from different sources, dates & checkdigits verification, one of the CheckResult enumeration values. |
detailsOptical.vds |
The Visible Digital Seal verification status, one of the CheckResult enumeration values. |
detailsRFID.overallStatus |
The summary of all RFID checks. Same as rfid, one of the CheckResult enumeration values. |
detailsRFID.BAC |
The Basic Access Control status, one of the CheckResult enumeration values. |
detailsRFID.PACE |
The Password Authenticated Connection Establishment status, one of the CheckResult enumeration values. |
detailsRFID.CA |
The Chip Authentication status, one of the CheckResult enumeration values. |
detailsRFID.TA |
The Terminal Authentication status, one of the CheckResult enumeration values. |
detailsRFID.AA |
The Active Authentication status, one of the CheckResult enumeration values. |
detailsRFID.PA |
The Passive Authentication status, one of the CheckResult enumeration values. |
portrait |
The comparison status for portrait in the document against the live or external image, one of the CheckResult enumeration values. |
stopList |
The verification status for the document data against the database, one of the CheckResult enumeration values. |
Text
This result type contains the text data.
Text
├── availableSourceList
│ ├── containerType
│ ├── source
│ └── validityStatus
├── comparisonStatus
├── dateFormat
├── fieldList
│ ├── comparisonList
│ ├── comparisonStatus
│ ├── fieldName
│ ├── fieldType
│ ├── lcid
│ ├── lcidName
│ ├── status
│ ├── validityList
│ │ ├── source
│ │ └── status
│ ├── validityStatus
│ ├── value
│ ├── valueList
│ │ ├── containerType
│ │ ├── fieldRect
│ │ │ ├── bottom
│ │ │ ├── left
│ │ │ ├── right
│ │ │ └── top
│ │ ├── originalSymbols
│ │ │ ├── code
│ │ │ ├── probability
│ │ │ ├── rect
│ │ │ │ ├── bottom
│ │ │ │ ├── left
│ │ │ │ ├── right
│ │ │ │ └── top
│ │ ├── originalValidity
│ │ ├── pageIndex
│ │ ├── probability
│ │ ├── source
│ │ └── value
├── status
└── validityStatus
Parameter |
Description |
availableSourceList |
The list of available sources. |
availableSourceList.containerType |
The source type, integer representation, one of the Result enumeration values. |
availableSourceList.source |
The source name, string representation. |
availableSourceList.validityStatus |
The verification result, one of the CheckResult enumeration values. |
comparisonStatus |
The comparison result, one of the CheckResult enumeration values. |
dateFormat |
The date format. |
fieldList |
The list of available text fields. |
fieldList.comparisonList |
The list of available comparisons in the given text field. |
fieldList.comparisonStatus |
The comparison status in the given text field, one of the CheckResult enumeration values. |
fieldList.fieldName |
The text field name, string representation. |
fieldList.fieldType |
The text field type, integer representation, one of the TextFieldType enumeration values. |
fieldList.lcid |
The LCID type, integer representation, one of the LCID enumeration values. |
fieldList.lcidName |
The LCID name, string representation. |
fieldList.status |
The overall result of the given text field that combines comparsion and verification results, one of the CheckResult enumeration values. |
fieldList.validityList |
The list of verification results. |
fieldList.validityStatus |
The verification result of the text field, one of the CheckResult enumeration values. |
fieldList.value |
The single text field value. |
fieldList.valueList |
The list of all available values in the given text field. |
fieldList.valueList.containerType |
The source typ of the value, integer representation, one of the Result enumeration values. |
fieldList.valueList.fieldRect |
The text field value rectangular area coordinates on the image. |
fieldList.valueList.originalSymbols |
Original symbols. |
fieldList.valueList.originalValidity |
Original validity. |
fieldList.valueList.pageIndex |
The page index. |
fieldList.valueList.probability |
The symbol recognition probability. |
fieldList.valueList.source |
The source name of the value, string representation. |
fieldList.valueList.value |
The single text field value. |
status |
The overall result of all available text fields that combines comparsion and verification results, one of the CheckResult enumeration values. |
validityStatus |
The overall verification result of all available text fields, one of the CheckResult enumeration values. |
Images
This result type contains the graphic data.
Images
├── availableSourceList
│ ├── containerType
│ └── source
├── fieldList
│ ├── fieldName
│ ├── fieldType
│ ├── valueList
│ │ ├── value
│ │ ├── containerType
│ │ ├── source
│ │ ├── lightIndex
│ │ ├── fieldRect
│ │ │ ├── bottom
│ │ │ ├── left
│ │ │ ├── right
│ │ │ └── top
│ │ ├── originalPageIndex
│ │ └── pageIndex
Parameter |
Description |
availableSourceList |
The list of available sources. |
availableSourceList.containerType |
The source type, integer representation, one of the Result enumeration values. |
availableSourceList.source |
The source name, string representation. |
fieldList |
The list of available graphic fields. |
fieldList.fieldName |
The graphic field name, string representation. |
fieldList.fieldType |
The graphic field type, integer representation, one of the GraphicFieldType enumeration values. |
fieldList.valueList |
The list of graphic field values. |
fieldList.valueList.value |
The image value, Base64 format. |
fieldList.valueList.containerType |
The source type which the value belongs to, integer representation, one of the Result enumeration values. |
fieldList.valueList.source |
The source name which the value belongs to, string representation. |
fieldList.valueList.lightIndex |
The lightning scheme, one of the Light enumeration values. |
fieldList.valueList.fieldRect |
The field rectangular area coordinates on the image. |
fieldList.valueList.originalPageIndex |
Original page index. |
fieldList.valueList.pageIndex |
The page index. |
Document Type
This result type contains information about the document type.
OneCandidate
├── AuthenticityNecessaryLights
├── CheckAuthenticity
├── DocumentName
├── FDSIDList
│ ├── Count
│ ├── ICAOCode
│ ├── List
│ ├── dCountryName
│ ├── dFormat
│ ├── dMRZ
│ ├── dType
│ └── dYear
├── ID
├── NecessaryLights
├── OVIExp
├── P
├── RFID_Presence
├── Rotated180
├── RotationAngle
└── UVExp
Parameter |
Description |
AuthenticityNecessaryLights |
The combination of identifiers of necessary lighting schemes to perform authenticity check for the given document type. |
CheckAuthenticity |
Set of authenticity check options provided for the given document type. |
DocumentName |
The document type name. |
FDSIDList |
Additional document information and its link to IRS document(s). |
FDSIDList.Count |
Number of elements in the array. |
FDSIDList.ICAOCode |
The document issuing country ICAO Code. |
FDSIDList.List |
The array of IRS document identifiers. |
FDSIDList.dCountryName |
The name of the country that issued the document. |
FDSIDList.dFormat |
The document format. |
FDSIDList.dMRZ |
A flag for MRZ presence on the document. |
FDSIDList.dType |
The document type, one of the DocumentType enumeration values. |
FDSIDList.dYear |
The year the document was issued. |
ID |
The document type numeric code. |
NecessaryLights |
The combination of identifiers of necessary lighting schemes to perform OCR for the given document type. |
OVIExp |
The camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme. |
P |
Estimation of correct recognition probability when analyzing the given document type. |
RFID_Presence |
Presence of RFID chip in the document. |
Rotated180 |
true if the document of the given type is rotated by 180 degrees. |
UVExp |
The camera exposure value necessary when obtaining document images of the given type for UV lighting scheme. |
Image Quality
This result type contains results of image quality checks.
ImageQualityCheckList
├── Count
├── List
│ ├── type
│ ├── featureType
│ ├── result
│ ├── areas
│ │ ├── Count
│ │ ├── List
│ │ │ ├── bottom
│ │ │ ├── left
│ │ │ ├── right
│ │ │ └── top
│ │ └── Points
│ ├── mean
│ ├── probability
│ └── std_dev
└── result
Parameter |
Description |
Count |
The number of results in the array. |
List |
The list of single check result pointers. |
List.type |
The check result type, one of the ImageQualityCheckType enumeration values. |
List.featureType |
The area examined, one of the SecurityFeatureType enumeration values. |
List.result |
The check result, one of the CheckResult enumeration values. |
List.areas |
Anomalous image areas. |
List.mean |
The check mean value. |
List.probability |
The check probability. |
List.std_dev |
The check deviation. |
result |
The overall check result, one of the CheckResult enumeration values. |
Authenticity
This result type contains results of document authenticity checks.
There are several groups of results within the Authenticity checks that differ in the structure:
- Security Feature Check. This group includes the following types of Authenticity checks:
- UV luminescence check
- IR B900
- Axial protection
- Photo embedding type
- Photo area
- Barcode format check
- Extended OCR check
- Extended MRZ check
- Ident Result. This group includes the following types of Authenticity checks:
- Image patterns
- IR visibility
- OVI
- Comparison of the portraits
- Kinegram
- LetterScreen check
- Holograms
- Comparison of the fingerprints
- Liveness
- Fibers Check. This group includes the following types of Authenticity checks:
- UV security fibers
- OCR Security Text Result. This group includes the following types of Authenticity checks:
- OCR Security text
- Photo Ident Check. This group includes the following types of Authenticity checks:
- IPI (invisible personal information)
Security Feature Check
AuthenticityCheckList
├── Type
├── Result
├── List
│ ├── ElementType
│ ├── ElementResult
│ ├── ElementDiagnose
│ ├── ElementRect
│ │ ├── left
│ │ ├── top
│ │ ├── right
│ │ └── bottom
Ident Result
AuthenticityCheckList
├── Type
├── Result
├── List
│ ├── ElementType
│ ├── ElementResult
│ ├── ElementDiagnose
│ ├── Image
│ ├── EtalonImage
│ ├── PercentValue
│ ├── LightIndex
│ ├── Area
│ │ ├── left
│ │ ├── top
│ │ ├── right
│ │ └── bottom
Fibers Check
AuthenticityCheckList
├── Type
├── Result
├── List
│ ├── ElementResult
│ ├── ElementDiagnose
│ ├── RectArray
│ │ ├── left
│ │ ├── top
│ │ ├── right
│ │ └── bottom
OCR Security Text Result
AuthenticityCheckList
├── Type
├── Result
├── List
│ ├── ElementResult
│ ├── ElementDiagnose
│ ├── EtalonFieldType
│ ├── LightType
│ ├── FieldRect
│ │ ├── left
│ │ ├── top
│ │ ├── right
│ │ └── bottom
Photo Ident Check
AuthenticityCheckList
├── Type
├── Result
├── List
│ ├── ElementResult
│ ├── ElementDiagnose
│ ├── ResultImages
│ ├── SourceImage
│ ├── LightIndex
│ ├── Area
│ │ ├── left
│ │ ├── top
│ │ ├── right
│ │ └── bottom
Parameter |
Description |
Type |
The type of the preforemed check, one of the AuthenticityResultType enumeration values. |
Result |
The overall result of all checked elements that are in the List, one of the CheckResult enumeration values. |
List |
The list of elements that are checked. |
ElementResult |
The verification status of the element, one of the CheckResult enumeration values. |
ElementDiagnose |
Contains the reason why the verification failed, one of the CheckDiagnose enumeration values. |
ResultImages |
The array of the output images. |
SourceImage |
The array of the source images. |
LightIndex |
The lightning scheme, one of the Light enumeration values. |
Area |
The coordinates of the checked fragment. |
MRZ Position
This result type contains tinformation about the MRZ position.
MrzPosition
├── Angle
├── Center
│ ├── x
│ └── y
├── Dpi
├── Height
├── Inverse
├── LeftBottom
│ ├── x
│ └── y
├── LeftTop
│ ├── x
│ └── y
├── ObjArea
├── ObjIntAngleDev
├── PerspectiveTr
├── ResultStatus
├── RightBottom
│ ├── x
│ └── y
├── RightTop
│ ├── x
│ └── y
├── Width
└── docFormat
Parameter |
Description |
Angle |
The document rotation angle. |
Center |
The document center coordinates. |
Dpi |
Resolution in dots per inch. |
Height |
The document height. |
Inverse |
Internal use parameter. |
LeftBottom |
Document left bottom corner coordinates. |
LeftTop |
Document left top corner coordinates. |
ObjArea |
Internal use parameter. |
ObjIntAngleDev |
Internal use parameter. |
PerspectiveTr |
Internal use parameter. |
ResultStatus |
Internal use parameter. |
RightBottom |
The document right bottom corner coordinates. |
RightTop |
The document right top corner coordinates. |
Width |
The document width. |
docFormat |
The document format. |
JSON
{
"valid": "boolean",
"containerList": {
"status": "string",
"graphicsfields": "string",
"textfields": "string",
"documentimages": "string",
"documenttype": "string",
"imagequality": "string"
},
"warningMessage": [
{
"docType": "string",
"expiry": "string",
"imageQA": "string",
"mrz": "string",
"pagesCount": "string",
"security": "string",
"text": "string"
}
]
}
Error response
JSON
"warning":
[
{
"code": "string",
"message": "string"
}
]
Service messages
Code |
Message |
Description |
FMM001 |
The apiKey is required. |
The apikey is required in the request to the api. |
FMM002 |
The apiKey is not valid. |
The apikey is invalid or does not exist in the database record. |
FMM003 |
Internal server error |
I We got a unspected error and will be fixed as soon as posible. |
FMM004 |
Both files are required |
Both files are required. |
FMM006 |
The file front is required |
The file front of the id is required. |
FMMOO7 |
Format file invalid |
The service it allows jpg, jpeg and png file formats. |
FMM008 |
The Image exceed the range |
The resolution for the image must be 3840 x 2160. |
FMM009 |
The back file has invalid format |
The service it allows jpg, jpeg and png file formats. |
FMM010 |
The back Image exceed the range |
The resolution for the image must be 3840 x 2160. |
FMM011 |
Server FMM don't response |
Server FMM has problems to response |
FMM012 |
It is not a valid FMM document |
It is not a valid FMM document |