Step 4: Get Document Types

GlobalGateway supports different document types in each country. In order to see what documents are supported for a specific country you can run the Get Document Types request.

Request

GET <<endpoint>>/configuration/v1/documentTypes/US
Authorization: Basic ACCESS_TOKEN
//Example Username: JoeNapoli_API_Demo, Example Password: 05uZuPRCyPi!6
var truliooClient = new TruliooApiClient("JoeNapoli_API_Demo", "05uZuPRCyPi!6");
Dictionary<string, IList<string>> record = await truliooClient.Configuration.GetDocumentTypesAsync("AU");
//Example Username: JoeNapoli_API_Demo, Example Password: 05uZuPRCyPi!6
ApiClient apiClient = new ApiClient();
apiClient.setUsername("JoeNapoli_API_Demo");
apiClient.setPassword("05uZuPRCyPi!6");
ConfigurationApi configurationClient = new ConfigurationApi(apiClient);
//getDocumentTypes
Map<String, List<String>> documentTypes = configurationClient.getDocumentTypes("AU");


//getDocumentTypesAsync
configurationClient.getDocumentTypesAsync("AU", new ApiCallback<Map<String, List<String>>>() {
    @Override
    public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
        Logger.getLogger(SdkJavaV1Sample.class.getName()).log(Level.SEVERE, null, e);
    }
    @Override
    public void onSuccess(Map<String, List<String>> result, int statusCode, Map<String, List<String>> responseHeaders) {
        System.out.println(result);
    }
    @Override
    public void onUploadProgress(long bytesWritten, long contentLength, boolean done) {
        //To change body of generated methods, choose Tools | Templates.
    }
    @Override
    public void onDownloadProgress(long bytesRead, long contentLength, boolean done) {
        //To change body of generated methods, choose Tools | Templates.
    }
});

Response

{
  "US": [
    "DrivingLicence",
    "IdentityCard",
    "ResidencePermit",
    "Passport"
  ]
}

The request will return an array containing the names of the supported document types for the specified country.


Did this page help you?