Package com.yoti.api.client.docs
Class DocScanClient
java.lang.Object
com.yoti.api.client.docs.DocScanClient
Client used for communication with the Yoti Doc Scan service
The DocScanClient facilitates requests to the Yoti Doc Scan service
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DocScanClient.Builderbuilder()createFaceCaptureResource(String sessionId, CreateFaceCaptureResourcePayload createFaceCaptureResourcePayload) Creates a Face Capture resource, that will be linked using the supplied requirement IDcreateSession(SessionSpec sessionSpec) Creates a Doc Scan session using the supplied session specificationvoiddeleteMediaContent(String sessionId, String mediaId) Deletes media related to a Yoti Doc Scan session based on the supplied media IDvoiddeleteSession(String sessionId) Deletes a previously created Yoti Doc Scan session and all of its related resourcesfetchInstructionsContactProfile(String sessionId) Fetches the associated instructions contact profile for the given In-Branch Verification sessiongetIbvInstructions(String sessionId) Fetches any currently set instructions for an IBV session.getIbvInstructionsPdf(String sessionId) Fetches the instructions PDF associated with an In-Branch Verification session.getMediaContent(String sessionId, String mediaId) Retrieves media related to a Yoti Doc Scan session based on the supplied media IDgetSession(String sessionId) Retrieves the state of a previously created Yoti Doc Scan sessiongetSessionConfiguration(String sessionId) Fetches the configuration for the given sessionID.Gets a list of supported documents only with latin documents.getSupportedDocuments(boolean includeNonLatin) Gets a list of supported documents.voidputIbvInstructions(String sessionId, Instructions instructions) Sets the IBV instructions for the given sessionvoidtriggerIbvEmailNotification(String sessionId) Triggers an email notification for the IBV instructions at-home flow.voiduploadFaceCaptureImage(String sessionId, String resourceId, UploadFaceCaptureImagePayload uploadFaceCaptureImagePayload) Uploads an image to the specified Face Capture resource
-
Method Details
-
builder
-
createSession
Creates a Doc Scan session using the supplied session specification- Parameters:
sessionSpec- the Doc Scan session specification- Returns:
CreateSessionResultthe session creation result- Throws:
DocScanException- if an error has occurred
-
getSession
Retrieves the state of a previously created Yoti Doc Scan session- Parameters:
sessionId- the session ID- Returns:
GetSessionResultthe session state- Throws:
DocScanException- if an error has occurred
-
deleteSession
Deletes a previously created Yoti Doc Scan session and all of its related resources- Parameters:
sessionId- the session ID- Throws:
DocScanException- if an error has occurred
-
getMediaContent
Retrieves media related to a Yoti Doc Scan session based on the supplied media ID- Parameters:
sessionId- the session IDmediaId- the media ID- Returns:
Mediathe media- Throws:
DocScanException- if an error has occurred
-
deleteMediaContent
Deletes media related to a Yoti Doc Scan session based on the supplied media ID- Parameters:
sessionId- the session IDmediaId- the media ID- Throws:
DocScanException- if an error has occurred
-
putIbvInstructions
Sets the IBV instructions for the given session- Parameters:
sessionId- the session IDinstructions- the instructions- Throws:
DocScanException- if an error has occurred
-
getIbvInstructionsPdf
Fetches the instructions PDF associated with an In-Branch Verification session.- Parameters:
sessionId- the sessionID- Returns:
- the PDF media
- Throws:
DocScanException- if an error has occurred
-
fetchInstructionsContactProfile
public ContactProfileResponse fetchInstructionsContactProfile(String sessionId) throws DocScanException Fetches the associated instructions contact profile for the given In-Branch Verification session- Parameters:
sessionId- the session ID- Returns:
- the contact profile
- Throws:
DocScanException- if an error has occurred
-
createFaceCaptureResource
public CreateFaceCaptureResourceResponse createFaceCaptureResource(String sessionId, CreateFaceCaptureResourcePayload createFaceCaptureResourcePayload) throws DocScanException Creates a Face Capture resource, that will be linked using the supplied requirement ID- Parameters:
sessionId- the session IDcreateFaceCaptureResourcePayload- theCreateFaceCaptureResourcePayload- Returns:
- the response
- Throws:
DocScanException- if an error has occurred
-
uploadFaceCaptureImage
public void uploadFaceCaptureImage(String sessionId, String resourceId, UploadFaceCaptureImagePayload uploadFaceCaptureImagePayload) throws DocScanException Uploads an image to the specified Face Capture resource- Parameters:
sessionId- the session IDuploadFaceCaptureImagePayload- the Face Capture image payload- Throws:
DocScanException- if an error has occurred
-
getSupportedDocuments
public SupportedDocumentsResponse getSupportedDocuments(boolean includeNonLatin) throws DocScanException Gets a list of supported documents.- Parameters:
includeNonLatin- the includeNonLatin flag- Returns:
- the supported documents
- Throws:
DocScanException- if an error has occurred
-
getSupportedDocuments
Gets a list of supported documents only with latin documents.- Returns:
- the supported documents
- Throws:
DocScanException- if an error has occurred
-
getIbvInstructions
Fetches any currently set instructions for an IBV session.- Returns:
- the instructions
- Throws:
DocScanException- if an error has occurred
-
triggerIbvEmailNotification
Triggers an email notification for the IBV instructions at-home flow. This will be one of: - an email sent directly to the end user, using the email provided in the ContactProfile - if requested, a backend notification using the configured notification endpoint- Parameters:
sessionId- the session ID- Throws:
DocScanException- if an error has occurred
-
getSessionConfiguration
public SessionConfigurationResponse getSessionConfiguration(String sessionId) throws DocScanException Fetches the configuration for the given sessionID.- Parameters:
sessionId- the session ID- Returns:
- the session configuration
- Throws:
DocScanException- if an error has occurred
-