The ZOLOZ Face Capture initialize API is used to initialize the face capture process in ZOLOZ. A unique transaction ID is generated for the process and used in all the subsequent interactions with the ZOLOZ server. This API is not idempotent.
Required. A unique business ID for tracing purpose. For example，the sequence ID from the merchant's business-related database.
Note: The ZOLOZ server does not perform uniqueness check on the value of this field. For better tracking, it is strongly recommended to enable the merchant server to guarantee the uniqueness of the business ID.
Required. The meta information about the SDK and the user's device. The value of this field is returned from the ZOLOZ SDK in the JSON string format, for example:
Note: Do not modify the returned value as it only needs to be passed through directly. Set to "MOB_H5" if it is in H5 mode.
Optional. Merchant user ID, or other identifiers that can be used to identify a specific user, for example, mobile phone number, email address and so on. It is strongly recommended to pre-desensitize the value of the userId field, for example, by hashing the value.
|Optional. Specifies the configuration settings for H5 mode. For more information，refer below to the h5ModeConfig section.|
Optional. Specifies the service level for face liveness check and user action detection. The following values are supported:
Required. The API request result, which contains information about the result of the API request, such as status and error codes.
Optional. A unique transaction ID that is generated by the ZOLOZ server for the Face Capture process. This ID will be used as an input parameter for the Face Capture checkresult API request.
Note: when an error occurs during the process, for example, invalid argument, no transaction ID is returned.
Optional. The client configuration information, including parameters about SDK connection and behavior. The value of this field is specified only when the result.resultStatus field is
Result process logic
For different request results, different actions are to be performed. See the following for details:
- If the value of the result.resultStatus is
S, the ZOLOZ Face Capture initialize API is invoked successfully and a unique transaction ID is returned.
- If the value of the result.resultStatus is
F, the invocation of the ZOLOZ Face Capture initialize API fails. Check the error code and message for more information about the possible reasons. Error codes
Common error codes
For the full list of common error codes, see the Common error codes section in the Error handling topic.
API-specific error codes
The following table shows the possible error codes that are specific for the Connect initialize API.
The API call is successful.
High risks are detected. The user account is strategically cooled down by the risk engine.
The device type is not supported.
The operating system of the device is not supported.
The version of the ZOLOZ SDK is not supported.
Input parameters are invalid. For more information about which parameter is invalid, check the result message or the related log.
Other internal errors. For more information about the error details, check the result message that is returned and the related log.
For different integration modes, the request structures are a little different. When the face capture process is initiated in the H5 mode, additionally, an object called h5ModeConfig must be specified. Refer to the following two request samples for the detailed information.
Native RealId Request Sample
The following sample shows what a request that the merchant server sends looks like.
H5 RealId Request Sample
The following sample shows what a request looks like if the face capture process is initiated in the H5 mode.
The following sample shows what a response that the ZOLOZ server returns looks like.
The following table shows the fields that can be specified in the h5ModeConfig Object.
Optional. An identifier that is used to recover the customer's context. You can set this field to any String value. The value is then passed as a parameter when the ZOLOZ SDK calls back to the merchant's application. If the value is not set, the value of the transactionId field is used.
Required. Specifies the callback URL where the browser is redicted when the whole identity proofing process is completed.
Required. Specifies the callback URL where the browser is redirected when the process is interrupted.
Optional. If the Web Page need to be open in Iframe, this param should be set as Y.
Supported Value: Y / N
Optional. Language of the web page, only support: en/ id now