Class Profile

java.lang.Object
com.idanalyzer.Profile

public class Profile extends Object
Builds a KYC profile / profileOverride object that can be attached to scan, biometric and docupass calls, or used to create/update a stored profile via ProfileApi. All mutators return this for chaining.
  • Field Details

    • SECURITY_NONE

      public static final String SECURITY_NONE
      Built-in profile preset that applies no security checks.
      See Also:
    • SECURITY_LOW

      public static final String SECURITY_LOW
      Built-in profile preset that applies a low level of security checks.
      See Also:
    • SECURITY_MEDIUM

      public static final String SECURITY_MEDIUM
      Built-in profile preset that applies a medium level of security checks.
      See Also:
    • SECURITY_HIGH

      public static final String SECURITY_HIGH
      Built-in profile preset that applies a high level of security checks.
      See Also:
  • Constructor Details

    • Profile

      public Profile(String profileId)
      Creates a Profile. If profileId is null/empty, SECURITY_NONE is used.
      Parameters:
      profileId - the stored profile id or a built-in security preset; null/empty selects SECURITY_NONE.
  • Method Details

    • getProfileId

      public String getProfileId()
      Returns the profile id this profile was created with.
      Returns:
      the profile id (or SECURITY_NONE if none was supplied).
    • getOverride

      public Map<String,Object> getOverride()
      Returns the accumulated profileOverride map of settings applied to this profile.
      Returns:
      the mutable override map; empty when no overrides have been set.
    • loadFromJson

      public Profile loadFromJson(Map<String,Object> config)
      Bulk-load override settings from a map (e.g. a previously exported profile).
      Parameters:
      config - the settings to merge into this profile's override map.
      Returns:
      this profile, for chaining.
    • canvasSize

      public Profile canvasSize(int pixels)
      Set the working canvas size, in pixels, used during image processing.
      Parameters:
      pixels - the canvas size in pixels.
      Returns:
      this profile, for chaining.
    • orientationCorrection

      public Profile orientationCorrection(boolean enabled)
      Enable or disable automatic orientation correction of input images.
      Parameters:
      enabled - true to auto-correct orientation.
      Returns:
      this profile, for chaining.
    • objectDetection

      public Profile objectDetection(boolean enabled)
      Enable or disable object detection on the document image.
      Parameters:
      enabled - true to enable object detection.
      Returns:
      this profile, for chaining.
    • aamvaBarcodeParsing

      public Profile aamvaBarcodeParsing(boolean enabled)
      Enable or disable parsing of AAMVA barcodes (US/Canada driver licenses).
      Parameters:
      enabled - true to enable AAMVA barcode parsing.
      Returns:
      this profile, for chaining.
    • outputSize

      public Profile outputSize(int pixels)
      Set the maximum output image size, in pixels.
      Parameters:
      pixels - the output image size in pixels.
      Returns:
      this profile, for chaining.
    • inferFullName

      public Profile inferFullName(boolean enabled)
      Enable or disable inferring the full name from name components.
      Parameters:
      enabled - true to infer the full name.
      Returns:
      this profile, for chaining.
    • splitFirstName

      public Profile splitFirstName(boolean enabled)
      Enable or disable splitting the first name into separate name fields.
      Parameters:
      enabled - true to split the first name.
      Returns:
      this profile, for chaining.
    • transactionAuditReport

      public Profile transactionAuditReport(boolean enabled)
      Enable or disable generation of a transaction audit report.
      Parameters:
      enabled - true to generate a transaction audit report.
      Returns:
      this profile, for chaining.
    • setTimezone

      public Profile setTimezone(String timezone)
      Set the timezone used for date/time fields in the transaction.
      Parameters:
      timezone - the timezone identifier (e.g. "UTC").
      Returns:
      this profile, for chaining.
    • obscure

      public Profile obscure(List<String> fieldKeys)
      Obscure (redact) the given result field keys in the output.
      Parameters:
      fieldKeys - the list of field keys to obscure.
      Returns:
      this profile, for chaining.
    • webhook

      public Profile webhook(String url)
      Set the webhook URL that result notifications are posted to.
      Parameters:
      url - the webhook URL.
      Returns:
      this profile, for chaining.
    • saveResult

      public Profile saveResult(boolean saveTransaction, boolean saveImages)
      Configure whether the transaction and its images are saved.
      Parameters:
      saveTransaction - true to persist the transaction result.
      saveImages - true to persist images; only applied when saveTransaction is true.
      Returns:
      this profile, for chaining.
    • outputImage

      public Profile outputImage(boolean enable, String format)
      Configure whether a processed output image is returned, and its format.
      Parameters:
      enable - true to return an output image.
      format - the output image format; only applied when enable is true.
      Returns:
      this profile, for chaining.
    • autoCrop

      public Profile autoCrop(boolean crop, boolean advancedCrop)
      Configure automatic cropping of the document from the image.
      Parameters:
      crop - true to enable cropping.
      advancedCrop - true to enable advanced cropping.
      Returns:
      this profile, for chaining.
    • threshold

      public Profile threshold(String key, double value)
      Set an individual decision threshold value.
      Parameters:
      key - the threshold key.
      value - the threshold value.
      Returns:
      this profile, for chaining.
    • decisionTrigger

      public Profile decisionTrigger(double reviewTrigger, double rejectTrigger)
      Set the overall decision-trigger scores that move a transaction to review or reject.
      Parameters:
      reviewTrigger - the score at or above which the decision becomes "review".
      rejectTrigger - the score at or above which the decision becomes "reject".
      Returns:
      this profile, for chaining.
    • setWarning

      public Profile setWarning(String code, boolean enabled, double reviewThreshold, double rejectThreshold, double weight)
      Configure how a specific warning code influences the decision.
      Parameters:
      code - the warning code to configure.
      enabled - true to enable this warning.
      reviewThreshold - the score contribution at which this warning triggers a review.
      rejectThreshold - the score contribution at which this warning triggers a reject.
      weight - the weight applied to this warning in scoring.
      Returns:
      this profile, for chaining.
    • restrictDocumentCountry

      public Profile restrictDocumentCountry(String countryCodes)
      Restrict accepted documents to the given issuing country code(s).
      Parameters:
      countryCodes - comma-separated ISO country code(s) to accept.
      Returns:
      this profile, for chaining.
    • restrictDocumentState

      public Profile restrictDocumentState(String states)
      Restrict accepted documents to the given issuing state(s)/province(s).
      Parameters:
      states - comma-separated state/province code(s) to accept.
      Returns:
      this profile, for chaining.
    • restrictDocumentType

      public Profile restrictDocumentType(String documentType)
      Restrict accepted documents to the given document type(s).
      Parameters:
      documentType - the document type(s) to accept (e.g. "P" passport, "D" driver license).
      Returns:
      this profile, for chaining.