Optical Character Recognition (OCR) Response Object

Applies to: Direct | Capture

This JSON response is returned for an OCR scan on passport books, passport cards, and other forms of identification.

👍

This response is returned by /get-results if you include the ocr_scan signal in the /start endpoint.

{
  "OCR": {
    "type": "object",
    "description": "Optical character recognition (OCR) signal (`ocr`) response.",
    "properties": {
      "success": {
        "type": "boolean",
        "description": "True if the API call was successful; false otherwise."
      },
      "result": {
        "type": "boolean",
        "description": "True if data was returned in the data object; false otherwise."
      },
      "message": {
        "type": "string",
        "description": "A description of the result output. For example, \"success\" or and error message."
      },
      "imageQualityFindings": {
        "type": "array",
        "description": "Array of image quality detection response codes with messages. Each member contains one code and one message.",
        "items": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "description": "Image quality detection response code."
            },
            "message": {
              "type": "string",
              "description": "Image quality detection response message."
            }
          }
        }
      },
      "data": {
        "type": "object",
        "description": "Contains the OCR signal elements returned as a JSON object.",
        "properties": {
          "fullDocumentImageBase64": {
            "deprecated": true,
            "type": "string",
            "description": "Deprecated. Currently not populated. Set /start return_images to true, and then see the images object in get-results."
          },
          "faceImageBase64": {
            "deprecated": true,
            "type": "string",
            "description": "Deprecated. Currently not populated. Set /start return_images to true, and then see the images object in get-results."
          },
          "firstName": {
            "type": "string",
            "description": "First name printed on the front of the identification or driver license document."
          },
          "lastName": {
            "type": "string",
            "description": "Last name printed on the front of the identification or driver license document."
          },
          "fullName": {
            "type": "string",
            "description": "fullName is derived from the front of the identification or driver license document. Certain documents, such as a Michigan State driver license, may not return values in the firstName and lastName name fields for OCR results. The API instead returns a fullName field, which can be used to process the name. The fullName field is the entire name. This change is required because the OCR scan cannot separate names as they appear on certain IDs (for example, Michigan issued driver licenses)."
          },
          "address": {
            "type": "string",
            "description": "Address printed on the front of the identification or driver license document."
          },
          "documentNumber": {
            "type": "string",
            "description": "Identification number printed on the front of the identification or driver license document."
          },
          "documentRecognized": {
            "type": "integer",
            "description": "0 = not recognized. 1 = recognized. 2 = not processed.",
            "enums":[
              "0",
              "1",
              "2"
            ]
          },
          "countryCode": {
            "type": "string",
            "description": "Three-letter code of the document issuing country (from third to fifth characters in the first MRZ string)."
          },
          "dateOfExpiry": {
            "type": "string",
            "description": "Contains the expiration date of the processed document, typically in yyyy-mm-dd format or the word NEVER for documents that do not expire. When a partial expiration date is encoded on the document, the fields that are unknown will be filled in with ? characters. For example: ????-01-12 will be returned for a document that does not encode the expiration year."
          },
          "dateOfExpiryFormatted": {
            "type": "string",
            "description": "Contains the expiration date of the processed document in mm/dd/yyyy format or the word NEVER for documents that do not expire. When a partial expiration date is encoded on the document, the fields that are unknown will be filled in with ? characters. For example: 01/12/???? will be returned for a document that does not encode the expiration year."
          },
          "dateOfIssue": {
            "type": "string",
            "description": "Contains the date of issuance of the document, typically in yyyy-mm-dd format."
          },
          "dateOfIssueFormatted": {
            "type": "string",
            "description": "Contains the date of issuance of the document in MM/DD/YYYY format."
          },
          "age": {
            "type": "string",
            "description": "Contains the age."
          },
          "expirationDate": {
            "deprecated": true,
            "type": "string",
            "description": "Contains the expiration date of the processed document in MM/DD/YYYY format or the word NEVER for documents that do not expire. When a partial expiration date is encoded on the document, the fields that are unknown will be filled in with ? characters. For example: 01/12/???? will be returned for a document that does not encode the expiration year."
          },
          "issueDate": {
            "deprecated": true,
            "type": "string",
            "description": "Contains the date of issuance of the document in MM/DD/YYYY format."
          },
          "dateOfBirth": {
            "type": "string",
            "description": "Contains the date of birth, typically in yyyy-mm-dd format. When a partial birth date is encoded on the document, the fields that are unknown will be filled in with ? characters. For example: ????-01-12 will be returned for a document that does not encode the birth date year."
          },
          "dateOfBirthFormatted": {
            "type": "string",
            "description": "Contains the date of birth in mm/dd/yyyy format. When a partial birth date is encoded on the document, the fields that are unknown will be filled in with ? characters. For example: 01/12/???? will be returned for a document that does not encode the birth date year."
          },
          "sex": {
            "type": "string",
            "description": "Contains the gender. Either Male or Female."
          },
          "height": {
            "type": "string",
            "description": "Contains the height in centimeters."
          },
          "eyeColor": {
            "type": "string",
            "description": "Contains the eye color. If the jurisdiction code for eye color is known, the color’s name is returned, for example, brown, blue, hazel. If the code is not recognized, the code that is encoded on the document is returned."
          },
          "dlClass": {
            "type": "string",
            "description": "Contains the driver class codes encoded on the document."
          },
          "dlEndorsement": {
            "type": "string",
            "description": "Contains the endorsement codes encoded on the document."
          },
          "dlRestrictions": {
            "type": "string",
            "description": "Contains the restriction codes encoded on the document."
          },
          "isRealID": {
            "type": "string",
            "description": "Contains the document REAL ID status. Values are Yes, No, or empty. Yes means the document was issued in compliance with United States Department of Homeland Security (DHS) requirements for the REAL ID Act passed by Congress in 2005. No means it was not. An empty value means the document did not have enough information to determine a result.",
            "enum":
            [
              "Yes",
              "No",
              "{empty}"
            ]                                                    },
          "placeOfBirth": {
            "type": "string",
            "description": "Contains the name of the country or state where the person was born. Results depend on the document."
          },
          "nationality": {
            "type": "string",
            "description": "Contains the nationality of the person. Results depend on the document."
          },
          "issuerName": {
            "type": "string",
            "description": "Contains the name of the issuing jurisdiction state, for example, New York."
          },
          "weightKilograms": {
            "type": "string",
            "description": "Contains the weight in kilograms as specified on the ID."
          },
          "errorMessage": {
            "type": "string",
            "description": "Indicates the cause of failed OCR. Either unable to recognize license or unable to parse data from license."
          }
        }
      }
    }
  }
}