Enterprise Service Usage – GBG IDscan Documentation

Enterprise Service Usage

Make Web Service method call for submitting a scanned document image to the enterprise backend for processing.

Simple Upload Functionality

Method that allows the user to submit an identity or a utility document to the enterprise server.

[IDSEnterpriseService submitDocument:self.imageView.image 
	documentType:type
	overrideUsername:@"username" 
	overridePassword:n@"password" 	
	overrideUrlPrefix:@"https://domain.com"
	progress:nil completion:^(IDSEnterpriseResponse * _Nullable response, NSError * _Nullable error)];

This method includes:

  1. Extracted Document Image
  2. Document Type
    • IDSEnterpriseDocumentTypeIdentity
    • IDSEnterpriseDocumentTypeUtility
  3. Username (can be changed from ‘overrideUsername’ in the method with an appropriate username.)
  4. Password (can be changed from ‘overridePassword’ in the method with an appropriate password.)
  5. URL Prefix (can be changed from ‘overrideUrlPrefix’ in the method with an appropriate enterprise service URL.). The prefix should only contain scheme and a domain name, for example: https://domain.com

Note: Customer Journeys are only supported with “Request Builder for Upload functionality”

Request Builder for Upload functionality

submitDocumentConstructingWithBlock method allows the app to submit an identity document to the enterprise server with the ability to construct request with custom data.

[IDSEnterpriseService submitDocumentConstructingWithBlock:(void 
(^_Nonnull)(IDSEnterpriseSendRequest *_Nonnull request))constructingBlock
	progress:(void (^_Nullable)(NSProgress *_Nonnull uploadProgress))progressHandler 	completion:(void (^_Nonnull)(IDSEnterpriseResponse *_Nullable response, NSError *_Nullable error)) 
	completionHandler;

This method includes:

  • Constructing block that takes single argument and appends custom data for sending request.
    • Setting credentials:
// Init credentials
IDSEnterpriseCredentials *credentials = [[IDSEnterpriseCredentials alloc] 
initWithUsername:kUsername password:kPassword urlPrefix:kURLPrefix 
area:IDSEnterpriseAuthenticationAreaScanning];

// Set credentials for the request 
[request setCredentials: credentials];
  • To send identity document image:
[request addDocument: image];
  • To send utility document image:
// Set document source
[request setDocumentSource: IDSEnterpriseDocumentTypeUtility];

//Add document image 
[request addDocument: image];
  • To send selfie image:
[request addSelfieImage: image];
  • If the backend is setup for Customer Journey, you can send following images by specifying JourneyID
// Set journeyID, which you can get from saved last response from the backend 
[request setJourneyID: self.lastDocumentScanResponse.journeyID];
    null
  • Progress block that returns upload progress of the document being uploaded for UI purposes.
  • Completion block that returns either the response of the server or an error.
Was this page helpful?