Barcode Result
Defined in framework ScanditIdCapture
- BarcodeResult
open class BarcodeResult : NSObject
Added in version 7.0.0
This class represents the data extracted from a document’s barcode. It aggregates information from various barcode types supported by the library. Some properties may not apply to certain document types and will be set to null if the corresponding data is not encoded in the barcode. For a complete overview of supported barcode types, refer to our supported documents.
- aamvaVersion
open var aamvaVersion: NSNumber? { get }
Added in version 7.0.0
The version level of the PDF417 barcode format. See the AAMVA DL/ID Card Design Standard for more details.
- aliasFamilyName
open var aliasFamilyName: String? { get }
Added in version 7.0.0
Other family name by which cardholder is known.
- aliasGivenName
open var aliasGivenName: String? { get }
Added in version 7.0.0
Other given name by which cardholder is known.
- aliasSuffixName
open var aliasSuffixName: String? { get }
Added in version 7.0.0
Other suffix name by which cardholder is known.
- bloodType
open var bloodType: String? { get }
Added in version 7.0.0
The blood type of the holder in the Rh system (A+, A-, B+, B-, O+, O-, AB+ or AB-).
- branchOfService
open var branchOfService: String? { get }
Added in version 7.0.0
The holder’s branch of service.
- cardInstanceIdentifier
open var cardInstanceIdentifier: String? { get }
Added in version 7.0.0
Machine-generated code that is used for security purposes.
- cardRevisionDate
open var cardRevisionDate: DateResult? { get }
Added in version 7.0.0
Card revision date.
- categories
open var categories: Array<String> { get }
Added in version 7.0.0
Driving license categories.
- champusEffectiveDate
open var champusEffectiveDate: DateResult? { get }
Added in version 7.0.0
The CHAMPUS effective date.
- champusExpiryDate
open var champusExpiryDate: DateResult? { get }
Added in version 7.0.0
The CHAMPUS expiration date.
- citizenshipStatus
open var citizenshipStatus: String? { get }
Added in version 7.0.0
Whether the holder is a citizen or a permanent resident.
- civilianHealthCareFlagCode
open var civilianHealthCareFlagCode: String? { get }
Added in version 7.0.0
The code of the civilian health care privilege/benefit flag.
- civilianHealthCareFlagDescription
open var civilianHealthCareFlagDescription: String? { get }
Added in version 7.0.0
The description of the civilian health care privilege/benefit flag.
- commissaryFlagCode
open var commissaryFlagCode: String? { get }
Added in version 7.0.0
The code of the commissary privilege/benefit flag.
- commissaryFlagDescription
open var commissaryFlagDescription: String? { get }
Added in version 7.0.0
The description of the commissary privilege/benefit flag.
- countryOfBirth
open var countryOfBirth: String? { get }
Added in version 7.0.0
The human-readable name of the holder’s country of birth.
- countryOfBirthIso
open var countryOfBirthIso: String? { get }
Added in version 7.0.0
The three-letter country code (ISO 3166-1) of the holder’s country of birth.
- deersDependentSuffixCode
open var deersDependentSuffixCode: NSNumber? { get }
Added in version 7.0.0
The code of the relationship of a dependent to his or her sponsor.
- deersDependentSuffixDescription
open var deersDependentSuffixDescription: String? { get }
Added in version 7.0.0
The description of the relationship of a dependent to his or her sponsor.
- directCareFlagCode
open var directCareFlagCode: String? { get }
Added in version 7.0.0
The code of the direct care privilege/benefit flag.
- directCareFlagDescription
open var directCareFlagDescription: String? { get }
Added in version 7.0.0
The description of the direct care privilege/benefit flag.
- documentCopy
open var documentCopy: String? { get }
Added in version 7.0.0
Identifies if the document has been duplicated.
- documentDiscriminatorNumber
open var documentDiscriminatorNumber: String? { get }
Added in version 7.0.0
The document discriminator number.
- driverNamePrefix
open var driverNamePrefix: String? { get }
Added in version 7.0.0
The name prefix of the card holder.
- driverNameSuffix
open var driverNameSuffix: String? { get }
Added in version 7.0.0
The name suffix of the card holder.
- driverRestrictionCodes
open var driverRestrictionCodes: Array<NSNumber> { get }
Added in version 7.0.0
The driver restriction codes. Empty array means that there is no restrictions. Number 1 stands for glasses/contact lenses. Number 2 stands for artificial limbs.
- ediPersonIdentifier
open var ediPersonIdentifier: String? { get }
Added in version 7.0.0
The holder’s DEERS-assigned numeric identifier.
- endorsementsCode
open var endorsementsCode: String? { get }
Added in version 7.0.0
The endorsement code.
- exchangeFlagCode
open var exchangeFlagCode: String? { get }
Added in version 7.0.0
The code of the exchange privilege/benefit flag.
- exchangeFlagDescription
open var exchangeFlagDescription: String? { get }
Added in version 7.0.0
The description of the exchange privilege/benefit flag.
- familySequenceNumber
open var familySequenceNumber: NSNumber? { get }
Added in version 7.0.0
Used to distinguish among sponsors who have the same SSN.
- firstNameTruncation
open var firstNameTruncation: String? { get }
Added in version 7.0.0
The first name truncation. A code that indicates whether a field has been truncated (‘T’), has not been truncated (‘N’), unknown whether truncated (‘U’), or the information is not present in the document (null).
- firstNameWithoutMiddleName
open var firstNameWithoutMiddleName: String? { get }
Added in version 7.0.0
The first name of the document holder. It doesn’t contain middle name(s).
- genevaConventionCategory
open var genevaConventionCategory: String? { get }
Added in version 7.0.0
The sponsor’s appropriate Geneva Convention Category.
- heightCm
open var heightCm: NSNumber? { get }
Added in version 7.0.0
The height of the card holder in centimeters.
- heightInch
open var heightInch: NSNumber? { get }
Added in version 7.0.0
The height of the card holder in inches.
- iin
open var iin: String? { get }
Added in version 7.0.0
The Issuer Identification Number which uniquely identifies the issuing jurisdiction.
- identificationType
open var identificationType: String? { get }
Added in version 7.0.0
The identification type of the driver’s license.
- issuingJurisdiction
open var issuingJurisdiction: String? { get }
Added in version 7.0.0
The human readable name of the issuing jurisdiction (for example: an issuing state, territory or federal district for USA, or an issuing province or territory for Canada).
- issuingJurisdictionIso
open var issuingJurisdictionIso: String? { get }
Added in version 7.0.0
The ISO code of the issuing jurisdiction (for example: an issuing state, territory or federal district for USA, or an issuing province or territory for Canada).
- jpegData
open var jpegData: String? { get }
Added in version 7.0.0
A compressed version of the photograph printed on the front of the card.
- jurisdictionVersion
open var jurisdictionVersion: NSNumber? { get }
Added in version 7.0.0
The jurisdiction specific version number of the implementation.
- lastNameTruncation
open var lastNameTruncation: String? { get }
Added in version 7.0.0
The last name truncation. A code that indicates whether a field has been truncated (‘T’), has not been truncated (‘N’), unknown whether truncated (‘U’), or the information is not present in the document (null).
- licenseCountryOfIssue
open var licenseCountryOfIssue: String? { get }
Added in version 7.0.0
The name of the country, where the Driver’s License was issued.
- middleName
open var middleName: String? { get }
Added in version 7.0.0
The middle name of the card holder.
- middleNameTruncation
open var middleNameTruncation: String? { get }
Added in version 7.0.0
The middle name truncation. A code that indicates whether a field has been truncated (‘T’), has not been truncated (‘N’), unknown whether truncated (‘U’), or the information is not present in the document (null).
- mwrFlagCode
open var mwrFlagCode: String? { get }
Added in version 7.0.0
The code of the Morale, Welfare & Recreation (MWR) privilege/benefit flag.
- mwrFlagDescription
open var mwrFlagDescription: String? { get }
Added in version 7.0.0
The description of the Morale, Welfare & Recreation (MWR) privilege/benefit flag.
- payGrade
open var payGrade: String? { get }
Added in version 7.0.0
The pay grade of the sponsor. Available since version 2.
- payPlanCode
open var payPlanCode: String? { get }
Added in version 7.0.0
The holder’s pay plan code.
- payPlanGradeCode
open var payPlanGradeCode: String? { get }
Added in version 7.0.0
The holder’s pay plan grade code.
- personDesignatorDocument
open var personDesignatorDocument: NSNumber? { get }
Added in version 7.0.0
The person’s designator identifier (usually, the cardholder’s SSN).
- personDesignatorTypeCode
open var personDesignatorTypeCode: String? { get }
Added in version 7.0.0
The card’s person designator type code.
- personMiddleInitial
open var personMiddleInitial: String? { get }
Added in version 7.0.0
The holder’s middle name initial.
- personalIdNumber
open var personalIdNumber: String? { get }
Added in version 7.0.0
The personal ID number of this Driver’s License holder.
- personalIdNumberType
open var personalIdNumberType: String? { get }
Added in version 7.0.0
The kind of personal ID number used - “02” means the number of the South Africa ID card.
- personnelCategoryCode
open var personnelCategoryCode: String? { get }
Added in version 7.0.0
The holder’s personnel category code.
- personnelEntitlementConditionType
open var personnelEntitlementConditionType: String? { get }
Added in version 7.0.0
The holder’s personnel entitlement condition type code.
- placeOfBirth
open var placeOfBirth: String? { get }
Added in version 7.0.0
The place of birth of the card holder.
- professionalDrivingPermit
open var professionalDrivingPermit: ProfessionalDrivingPermit? { get }
Added in version 7.0.0
Whether the holder of this License is allowed to transport goods, dangerous goods or passengers for an income.
- relationshipCode
open var relationshipCode: String? { get }
Added in version 7.0.0
The code of the dependent’s relationship to the sponsor.
- relationshipDescription
open var relationshipDescription: String? { get }
Added in version 7.0.0
The description of the dependent’s relationship to the sponsor.
- restrictionsCode
open var restrictionsCode: String? { get }
Added in version 7.0.0
The restriction code.
- sponsorFlag
open var sponsorFlag: String? { get }
Added in version 7.0.0
Indicates whether the card holder is sponsor or dependent.
- sponsorPersonDesignatorIdentifier
open var sponsorPersonDesignatorIdentifier: NSNumber? { get }
Added in version 7.0.0
The sponsor’s designator identifier (Usually, the cardholder’s SSN).
- statusCodeDescription
open var statusCodeDescription: String? { get }
Added in version 7.0.0
The description of the the code of the status of the sponsor.
- vehicleClass
open var vehicleClass: String? { get }
Added in version 7.0.0
The vehicle classification.
- vehicleRestrictions
open var vehicleRestrictions: Array<VehicleRestriction> { get }
Added in version 7.0.0
The categories of motor vehicles that the holder of this License is permitted to drive.
- weightKg
open var weightKg: NSNumber? { get }
Added in version 7.0.0
The weight of the card holder in kilograms.
- weightLbs
open var weightLbs: NSNumber? { get }
Added in version 7.0.0
Thw weight of the card holder in pounds.
- isRealId
open var isRealId: NSNumber? { get }
Added in version 7.0.0
Returns true if the document is a Real ID.
- firstName
open var firstName: String? { get }
Added in version 7.2.0
The first name of the document holder.
- lastName
open var lastName: String? { get }
Added in version 7.2.0
The last name of the document holder.
- fullName
open var fullName: String { get }
Added in version 7.2.0
The full name of the document holder.
- dateOfBirth
open var dateOfBirth: DateResult? { get }
Added in version 7.2.0
The date of birth of the document holder.
- nationality
open var nationality: String? { get }
Added in version 7.2.0
The nationality of the document holder.
- address
open var address: String? { get }
Added in version 7.2.0
The address of the document holder.
- documentNumber
open var documentNumber: String? { get }
Added in version 7.2.0
The document number of the ID.
- dateOfExpiry
open var dateOfExpiry: DateResult? { get }
Added in version 7.2.0
The expiry date of the document.
- dateOfIssue
open var dateOfIssue: DateResult? { get }
Added in version 7.2.0
The issue date of the document.
- barcodeDataElements
open var barcodeDataElements: Dictionary<String, String> { get }
Added in version 7.0.0
The mappings between all the barcode data element IDs and their values. The keys of this collection are the element IDs as defined in the AAMVA Driver License/Identification specification. For example, the specification defines a data element “Customer First Name” with the ID “DAC”. Therefore if a scanned barcode contains a string “DACMICHAEL”, then this collection will contain a mapping with “DAC” as the key and “MICHAEL” as the value. This collection contains all the data elements of the barcode - including those that are exposed also explicitly as fields of this class.
See Barcode Data Elements for all the possible keys and their meaning.
Barcode Data Elements
Mandatory Fields for spec version 1 (2000)
Following data fields are always present in a version 1 code:
Data Element ID |
Meaning |
Parsed Content |
|---|---|---|
DAA |
Driver License Name |
|
DAG |
Driver Mailing Street Address 1 |
|
DAI |
Driver Mailing City |
|
DAJ |
Driver Mailing Jurisdiction Code |
|
DAK |
Driver Mailing Postal Code |
A ZIP code is parsed as a dictionary with following key/value pairs:
Note that only certain jurisdictions encode the full 9-digit ZIP codes. Therefore the ‘9digit’ field is often empty or contains the padded 5-digit codes. Generally you will want to use the 5-digit code as it is reliably present. Both fields may be empty. |
DAQ |
Driver License/ID Number |
|
DAR |
Driver License Classification Code |
|
DAS |
Driver License Restriction Code |
|
DAT |
Driver License Endorsements Code |
|
DBA |
Driver License Expiration Date |
A date is parsed as a dictionary with following key/value pairs:
where DD, MM and YYYY are two-digit, respectively four-digit integers. Can be null because some versions do not follow the AAMVA specification and do not provide this field. |
DBB |
Date of Birth |
the same as ‘DBA’ |
DBC |
Driver Sex (‘F’ or ‘M’) |
|
DBD |
Driver License or ID Document Issue Date |
the same as ‘DBA’ |
Optional Fields for spec version 1 (2000)
Following data fields are sometimes present in a version 1 code:
Data Element ID |
Meaning |
Parsed Content |
|---|---|---|
DAU |
Height (in feet and inches) |
A dictionary with following key/value pairs:
where X is the heigth in inches and Y is the height in cm. |
DAW |
Weight (in pounds) |
Integer |
DAY |
Eye Color |
|
DAZ |
Hair Color |
|
DBK |
Social Security Number |
|
PAA |
Driver Permit Classification Code |
|
PAB |
Driver Permit Expiration Date |
see ‘DBA’ |
PAC |
Permit Identifier |
|
PAD |
Driver Permit Issue Date |
see ‘DBA’ |
PAE |
Driver Permit Restriction Code |
|
PAF |
Driver Permit Endorsement Code |
|
DAB |
Driver Last Name |
|
DAC |
Driver First Name |
|
DAD |
Driver Middle Name or Initial |
|
DAE |
Driver Name Suffix |
|
DAF |
Driver Name Prefix |
|
DAH |
Driver Mailing Street Address 2 |
|
DAL |
Driver Residence Street Address 1 |
|
DAM |
Driver Residence Street Address 2 |
|
DAN |
Driver Residence City |
|
DAO |
Driver Residence Jurisdiction Code |
|
DAP |
Driver Residence Postal Code |
see ‘DAK’ |
DAV |
Height (in cm, format state-dependent) |
see ‘DAU’ |
DAX |
Weight (in kg) |
|
DBE |
Issue Timestamp |
|
DBF |
Number of Duplicates |
Integer |
DBG |
Medical Indicator/Codes |
|
DBH |
Organ Donor |
|
DBI |
Non-Resident Indicator |
|
DBJ |
Unique Customer Identifier |
|
DBL |
Driver ‘AKA’ Date Of Birth |
see ‘DBA’ |
DBM |
Driver ‘AKA’ Social Security Number |
|
DBN |
Driver ‘AKA’ Name |
|
DBO |
Driver ‘AKA’ Last Name |
|
DBP |
Driver ‘AKA’ First Name |
|
DBQ |
Driver ‘AKA’ Middle Name |
|
DBR |
Driver ‘AKA’ Suffix |
|
DBS |
Driver ‘AKA’ Prefix |
Mandatory Fields for spec version 2 and later (2003+)
Following data fields are sometimes present in a version >=2 code:
Data Element ID |
Meaning |
Present in Versions |
Parsed Content |
|---|---|---|---|
DCA |
Jurisdiction-specific vehicle class/group code |
>=2 |
|
DCB |
Jurisdiction-specific codes that represent restrictions to driving privileges |
>=2 |
|
DCD |
Jurisdiction-specific codes that represent additional privileges granted to the cardholder beyond the vehicle class |
>=2 |
|
DBA |
Expiration Date |
>=2 |
A date is parsed as a dictionary with following key/value pairs:
where DD, MM and YYYY are two-digit, respectively four-digit integers. Can be null because some versions do not follow the AAMVA specification and do not provide this field. |
DCS |
Family name |
>=2 |
|
DCT |
Given name (all names other than the family name) |
2 and 3 |
|
DAC |
First name |
>=4 |
|
DAD |
Middle Name(s), separated by a comma |
>=4 |
|
DBD |
Date on which the document was issued. |
>=2 |
see ‘DBA’ |
DBB |
Date of Birth Date |
>=2 |
see ‘DBA’ |
DBC |
Gender of the cardholder |
>=2 |
String. One of the following:
|
DAY |
Eye color |
>=2 |
One of the following:
|
DAU |
Height of cardholder. |
>=2 |
A dictionary with following key/value pairs:
where X is the heigth in inches and Y is the height in cm. |
DAG |
Street portion of the cardholder address. |
>=2 |
|
DAI |
City portion of the cardholder address. |
>=2 |
|
DAJ |
State portion of the cardholder address. |
>=2 |
|
DAK |
Postal code portion of the cardholder address. |
>=2 |
A ZIP code is parsed as a dictionary with following key/value pairs:
Note that only certain jurisdictions encode the full 9-digit ZIP codes. Therefore the ‘9digit’ field is often empty or contains the padded 5-digit codes. Generally you will want to use the 5-digit code as it is reliably present. Both fields may be empty. |
DAQ |
Customer ID |
>=2 |
|
DCF |
Document Discriminator Number |
>=2 |
|
DCG |
Country (‘USA’ or ‘CAN’) |
>=2 |
|
DCH |
Federal Commercial Vehicle Codes |
2 and 3 |
|
DDE |
Family name truncation. A code that indicates whether a field has been truncated (‘T’), has not been truncated (‘N’), or unknown whether truncated (‘U’). |
>=4 |
|
DDF |
First name truncation. A code that indicates whether a field has been truncated (‘T’), has not been truncated (‘N’), or unknown whether truncated (‘U’). |
>=4 |
|
DDG |
Middle name truncation. A code that indicates whether a field has been truncated (‘T’), has not been truncated (‘N’), or unknown whether truncated (‘U’). |
>=4 |
Optional Fields for spec version 2 and later (2003+)
Following data fields are sometimes present in a version >=2 code:
Data Element ID |
Meaning |
Parsed Content |
|---|---|---|
DAH |
Second line of street portion of the cardholder address. |
|
DAZ |
Hair color |
|
DCI |
Place of birth |
|
DCJ |
Audit information |
|
DCK |
Inventory control number |
|
DBN |
Alias/AKA Family Name |
|
DBG |
Alias/AKA Given Name |
|
DBS |
Alias/AKA Suffix Name |
|
DCU |
Name Suffix (can be ‘JR’, ‘SR’, ‘1ST’, ‘2ND’, ‘3RD’, ‘4TH’, ‘5TH’, ‘6TH’, ‘7TH’, ‘8TH’, ‘9TH’, ‘I’, ‘II’, ‘III’, ‘IV’, ‘V’, ‘VI’, ‘VII’, ‘VIII’ or ‘IX’) |
|
DCE |
Weight Range
|
Integer |
DCL |
D-20 Code for Race/Ethnicity |
|
DCM |
Standard vehicle classification |
|
DCN |
Standard endorsement code |
|
DCO |
Standard restriction code |
|
DCP |
Jurisdiction-specific vehicle classification description |
|
DCQ |
Jurisdiction-specific endorsement code description |
|
DCR |
Jurisdiction-specific restriction code description |
|
DDA |
Compliance Type, ‘F’ = fully compliant and ‘N’ = non-compliant. |
|
DDB |
Card Revision Date |
see ‘DBA’ |
DDC |
Date on which the hazardous material endorsement granted by the document is no longer valid |
see ‘DBA’ |
DDD |
Indicator that the cardholder has temporary lawful status, can be ‘true’ or ‘false’. |
String |
DAW |
Weight in pounds |
Integer |
DAX |
Weight in kilograms |
Integer |
DDH |
Date on which the cardholder turns 18 |
see ‘DBA’ |
DDI |
Date on which the cardholder turns 19 |
see ‘DBA’ |
DDJ |
Date on which the cardholder turns 21 |
see ‘DBA’ |
DDK |
Indicator that the cardholder is an organ donor, can be ‘1’ or ‘0’ |
Integer |
DDL |
Indicator that the cardholder is a veteran, can be ‘1’ or ‘0’ |
Integer |
Jurisdiction-Specific Fields
Different jurisdictions can include custom data elements if desired. These data element must have an id starting with the letter ‘Z’. The Scandit parsing library also exposes these fields without any parsing.