enroll

    POST /api/v1/zoloz/connect/enroll

    The ZOLOZ Connect enroll API is used to enroll a pre-captured face image of one user for subsequent usage of Connect Face Verify. This face image could come from the result of Real ID or Face capture.


    #Structure

    #Request parameters


    Field name

    Data  type

    Max Length

    Description

    bizId

    String

    32

    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.

    userId

    String

    64

    Required. 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. 

    base64ImageContent

    String

    1MB

    Required. Face image content encoded in Base64. 


    #Response parameters

    Field name

    Data type

    Description

    result

    Result

    Required. The API request result, which contains information about the result of the API request, such as status and error codes. 

    transactionId

    String

    Optional. A unique transaction ID that is generated by the ZOLOZ server.

    Note: when an error occurs during the process, for example, invalid argument, no transaction ID is returned.


    #Result

    #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 Connect enroll 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 Connect enroll 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 enroll API.


    resultCode

    resultStatus

    Description

    SUCCESS

    S

    The API call is successful.

    UNABLE_GET_IMAGE

    F

    Cannot extract face feature from requested image.

    INVALID_ARGUMENT

    F

    Input parameters are invalid. For more information about which parameter is invalid, check the result message or the related log. 

    SYSTEM_ERROR

    F

    Other internal errors. For more information about the error details, check the result message that is returned and the related log. 



    #Sample

    #Request Sample

    The following sample shows what a request that the merchant server sends looks like.

    copy
    {
        "bizId":"2017839040588699",
        "userId":"merchant side user id", 
        "base64ImageContent":"xxxxxxxxxxxxxxxxx"
    }


    #Response Sample

    The following sample shows what a response that the ZOLOZ server returns looks like.

    copy
    {
        "transactionId": "G006600016CN20190114000000009572520355",
        "result": {
            "resultStatus": "S",
            "resultCode": "SUCCESS",
            "resultMessage": "Success"
        }
    }